audit: fixup: log on errors from filter user rules
authorRichard Guy Briggs <rgb@redhat.com>
Mon, 16 May 2016 02:47:39 +0000 (22:47 -0400)
committerPaul Moore <paul@paul-moore.com>
Tue, 31 May 2016 16:06:59 +0000 (12:06 -0400)
In commit 724e4fcc the intention was to pass any errors back from
audit_filter_user_rules() to audit_filter_user().  Add that code.

Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
kernel/auditfilter.c

index 94ca7b1e5e7eadd1053f1e01185c1a36320f52df..8a8aa3fbc8d828beac730caf0834c068021cd560 100644 (file)
@@ -1339,8 +1339,8 @@ static int audit_filter_user_rules(struct audit_krule *rule, int type,
                        break;
                }
 
-               if (!result)
-                       return 0;
+               if (result <= 0)
+                       return result;
        }
        switch (rule->action) {
        case AUDIT_NEVER:    *state = AUDIT_DISABLED;       break;