New commands -lfa_flags, -lsattr, -lsattrd, -chattr, -chattr_r, -find test -has_lfa_flags, -find actions lsattrd, chattr
This commit is contained in:
@ -1092,6 +1092,24 @@ int Findjob_set_commit_filter_2(struct FindjoB *o, int flag)
|
||||
}
|
||||
|
||||
|
||||
int Findjob_set_uint64_filter(struct FindjoB *o, int test_type, uint64_t value,
|
||||
int flag)
|
||||
{
|
||||
struct ExprtesT *t;
|
||||
int ret;
|
||||
|
||||
ret= Findjob_default_and(o, 0);
|
||||
if(ret <= 0)
|
||||
return(ret);
|
||||
|
||||
t= o->cursor->test;
|
||||
t->test_type= test_type;
|
||||
t->arg1= calloc(sizeof(uint64_t), 1);
|
||||
*((uint64_t *) t->arg1)= value;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int Findjob_set_arg1(struct FindjoB *o, int test_type, char *arg1, int flag)
|
||||
{
|
||||
struct ExprtesT *t;
|
||||
@ -1174,7 +1192,7 @@ int Findjob_get_action_parms(struct FindjoB *o, char **target, char **text_2,
|
||||
uid_t *user, gid_t *group,
|
||||
mode_t *mode_and, mode_t *mode_or,
|
||||
int *type, time_t *date, struct FindjoB **subjob,
|
||||
int flag)
|
||||
uint64_t *lfa_flags, int flag)
|
||||
{
|
||||
*target= o->target;
|
||||
*text_2= o->text_2;
|
||||
@ -1185,6 +1203,7 @@ int Findjob_get_action_parms(struct FindjoB *o, char **target, char **text_2,
|
||||
*type= o->type;
|
||||
*date= o->date;
|
||||
*subjob= o->subjob;
|
||||
*lfa_flags= o->lfa_flags;
|
||||
return(o->action);
|
||||
}
|
||||
|
||||
@ -1341,3 +1360,13 @@ int Findjob_set_action_found_path(struct FindjoB *o, int flag)
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int Findjob_set_action_chattr(struct FindjoB *o, int action,
|
||||
uint64_t lfa_flags, int operator, int flag)
|
||||
{
|
||||
o->action= action;
|
||||
o->lfa_flags= lfa_flags;
|
||||
o->type= operator;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user