diff options
Diffstat (limited to 'net/netlabel/netlabel_user.c')
-rw-r--r-- | net/netlabel/netlabel_user.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/netlabel/netlabel_user.c b/net/netlabel/netlabel_user.c index 98a4163..42f12bd 100644 --- a/net/netlabel/netlabel_user.c +++ b/net/netlabel/netlabel_user.c @@ -46,6 +46,10 @@ #include "netlabel_cipso_v4.h" #include "netlabel_user.h" +/* do not do any auditing if audit_enabled == 0, see kernel/audit.c for + * details */ +extern int audit_enabled; + /* * NetLabel NETLINK Setup Functions */ @@ -101,6 +105,9 @@ struct audit_buffer *netlbl_audit_start_common(int type, char *secctx; u32 secctx_len; + if (audit_enabled == 0) + return NULL; + audit_buf = audit_log_start(audit_ctx, GFP_ATOMIC, type); if (audit_buf == NULL) return NULL; |