audit: put rule existence check in canonical order
authorRichard Guy Briggs <rgb@redhat.com>
Fri, 3 Oct 2014 02:05:18 +0000 (22:05 -0400)
committerEric Paris <eparis@redhat.com>
Fri, 10 Oct 2014 19:03:32 +0000 (15:03 -0400)
Use same rule existence check order as audit_make_tree(), audit_to_watch(),
update_lsm_rule() for legibility.

Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
kernel/auditfilter.c

index 40ed9813d4b2811432c63d35592607ac1390b71e..4a11697cf5b8795bf93809e2d390a113c92706d6 100644 (file)
@@ -163,7 +163,7 @@ static inline int audit_to_inode(struct audit_krule *krule,
                                 struct audit_field *f)
 {
        if (krule->listnr != AUDIT_FILTER_EXIT ||
-           krule->watch || krule->inode_f || krule->tree ||
+           krule->inode_f || krule->watch || krule->tree ||
            (f->op != Audit_equal && f->op != Audit_not_equal))
                return -EINVAL;