audit: obsolete audit_context check is removed in audit_filter_rules()
authorMikhail Klementyev <jollheef@riseup.net>
Mon, 25 May 2015 20:20:38 +0000 (23:20 +0300)
committerPaul Moore <pmoore@redhat.com>
Fri, 29 May 2015 20:06:47 +0000 (16:06 -0400)
Signed-off-by: Mikhail Klementyev <jollheef@riseup.net>
[PM: patch applied by hand due to HTML mangling, rewrote subject line]
Signed-off-by: Paul Moore <pmoore@redhat.com>
kernel/auditsc.c

index dc4ae70a74133eabbd52e40e5271202ac28ca9a4..d81424fbec3aaf89750fc51a511bd385078270f3 100644 (file)
@@ -599,9 +599,7 @@ static int audit_filter_rules(struct task_struct *tsk,
                                result = match_tree_refs(ctx, rule->tree);
                        break;
                case AUDIT_LOGINUID:
-                       result = 0;
-                       if (ctx)
-                               result = audit_uid_comparator(tsk->loginuid, f->op, f->uid);
+                       result = audit_uid_comparator(tsk->loginuid, f->op, f->uid);
                        break;
                case AUDIT_LOGINUID_SET:
                        result = audit_comparator(audit_loginuid_set(tsk), f->op, f->val);