auditctl: check for a watch before adding perm
PATCH 1/1 auditctl: check for a watch before adding perm
The existing check would never trigger since add and del are defaulted to AUDIT_FILTER_UNSET which is not zero.
Signed-off-by Richard Guy Briggs <[email protected]>
--- src/auditctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/auditctl.c +1 -1
@@ -1020,7 +1020,7 @@ process_keys: }break ;case 'p' : -if (!add && !del) { +if (add ==AUDIT_FILTER_UNSET && del ==AUDIT_FILTER_UNSET ) {audit_msg (LOG_ERR ,"permission option needs a watch given prior to it" ); retval =-1 ;
Signature · 6 lines
2.27.0 -- Linux-audit mailing list [email protected] https://listman.redhat.com/mailman/listinfo/linux-audit
Steve Grubb
AppliedQuoted 2 lines · EDT Richard Guy Briggs
The existing check would never trigger since add and del are defaulted to
AUDIT_FILTER_UNSETwhich is not zero.
Thanks! Applied.
-Steve
Quoted 10 lines
Signed-off-by Richard Guy Briggs <[email protected]>--- src/auditctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/auditctl.c +0
-0
src/auditctl.c process_keys: · line 1026
Quoted 8 lines
src/auditctl.c +1
-1@@ -1020,7 +1020,7 @@ process_keys: }break ;case 'p' : -if (!add && !del) { +if (add ==AUDIT_FILTER_UNSET && del ==AUDIT_FILTER_UNSET ) {audit_msg (LOG_ERR ,"permission option needs a watch given prior to it" ); retval =-1 ;
--
Linux-audit mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/linux-audit