diff options
author | Richard Guy Briggs <rgb@redhat.com> | 2018-06-05 19:20:39 -0400 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2018-06-19 10:43:55 -0400 |
commit | f7859590d97614815b35a755c8213dfb8f2766bd (patch) | |
tree | 94bb23b92b5ce6c2f24fb5acc187a1bbd8318c5f /net | |
parent | d904ac0320d3c4ff4e9d80e4294ca5dde803696f (diff) | |
download | linux-f7859590d97614815b35a755c8213dfb8f2766bd.tar.gz linux-f7859590d97614815b35a755c8213dfb8f2766bd.tar.bz2 linux-f7859590d97614815b35a755c8213dfb8f2766bd.zip |
audit: eliminate audit_enabled magic number comparison
Remove comparison of audit_enabled to magic numbers outside of audit.
Related: https://github.com/linux-audit/audit-kernel/issues/86
Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/xt_AUDIT.c | 2 | ||||
-rw-r--r-- | net/netlabel/netlabel_user.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/xt_AUDIT.c b/net/netfilter/xt_AUDIT.c index f368ee6741db..af883f1b64f9 100644 --- a/net/netfilter/xt_AUDIT.c +++ b/net/netfilter/xt_AUDIT.c @@ -72,7 +72,7 @@ audit_tg(struct sk_buff *skb, const struct xt_action_param *par) struct audit_buffer *ab; int fam = -1; - if (audit_enabled == 0) + if (audit_enabled == AUDIT_OFF) goto errout; ab = audit_log_start(NULL, GFP_ATOMIC, AUDIT_NETFILTER_PKT); if (ab == NULL) diff --git a/net/netlabel/netlabel_user.c b/net/netlabel/netlabel_user.c index 2f328af91a52..4676f5bb16ae 100644 --- a/net/netlabel/netlabel_user.c +++ b/net/netlabel/netlabel_user.c @@ -101,7 +101,7 @@ struct audit_buffer *netlbl_audit_start_common(int type, char *secctx; u32 secctx_len; - if (audit_enabled == 0) + if (audit_enabled == AUDIT_OFF) return NULL; audit_buf = audit_log_start(audit_context(), GFP_ATOMIC, type); |