diff options
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r-- | kernel/auditsc.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 9134fe11ff6c..4effe01ebbe2 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -601,12 +601,20 @@ static int audit_filter_rules(struct task_struct *tsk, | |||
601 | } | 601 | } |
602 | break; | 602 | break; |
603 | case AUDIT_WATCH: | 603 | case AUDIT_WATCH: |
604 | if (name) | 604 | if (name) { |
605 | result = audit_watch_compare(rule->watch, name->ino, name->dev); | 605 | result = audit_watch_compare(rule->watch, |
606 | name->ino, | ||
607 | name->dev); | ||
608 | if (f->op == Audit_not_equal) | ||
609 | result = !result; | ||
610 | } | ||
606 | break; | 611 | break; |
607 | case AUDIT_DIR: | 612 | case AUDIT_DIR: |
608 | if (ctx) | 613 | if (ctx) { |
609 | result = match_tree_refs(ctx, rule->tree); | 614 | result = match_tree_refs(ctx, rule->tree); |
615 | if (f->op == Audit_not_equal) | ||
616 | result = !result; | ||
617 | } | ||
610 | break; | 618 | break; |
611 | case AUDIT_LOGINUID: | 619 | case AUDIT_LOGINUID: |
612 | result = audit_uid_comparator(audit_get_loginuid(tsk), | 620 | result = audit_uid_comparator(audit_get_loginuid(tsk), |
@@ -689,9 +697,13 @@ static int audit_filter_rules(struct task_struct *tsk, | |||
689 | break; | 697 | break; |
690 | case AUDIT_PERM: | 698 | case AUDIT_PERM: |
691 | result = audit_match_perm(ctx, f->val); | 699 | result = audit_match_perm(ctx, f->val); |
700 | if (f->op == Audit_not_equal) | ||
701 | result = !result; | ||
692 | break; | 702 | break; |
693 | case AUDIT_FILETYPE: | 703 | case AUDIT_FILETYPE: |
694 | result = audit_match_filetype(ctx, f->val); | 704 | result = audit_match_filetype(ctx, f->val); |
705 | if (f->op == Audit_not_equal) | ||
706 | result = !result; | ||
695 | break; | 707 | break; |
696 | case AUDIT_FIELD_COMPARE: | 708 | case AUDIT_FIELD_COMPARE: |
697 | result = audit_field_compare(tsk, cred, f, ctx, name); | 709 | result = audit_field_compare(tsk, cred, f, ctx, name); |