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 98a416381e61..42f12bd65964 100644 --- a/net/netlabel/netlabel_user.c +++ b/net/netlabel/netlabel_user.c | |||
@@ -46,6 +46,10 @@ | |||
46 | #include "netlabel_cipso_v4.h" | 46 | #include "netlabel_cipso_v4.h" |
47 | #include "netlabel_user.h" | 47 | #include "netlabel_user.h" |
48 | 48 | ||
49 | /* do not do any auditing if audit_enabled == 0, see kernel/audit.c for | ||
50 | * details */ | ||
51 | extern int audit_enabled; | ||
52 | |||
49 | /* | 53 | /* |
50 | * NetLabel NETLINK Setup Functions | 54 | * NetLabel NETLINK Setup Functions |
51 | */ | 55 | */ |
@@ -101,6 +105,9 @@ struct audit_buffer *netlbl_audit_start_common(int type, | |||
101 | char *secctx; | 105 | char *secctx; |
102 | u32 secctx_len; | 106 | u32 secctx_len; |
103 | 107 | ||
108 | if (audit_enabled == 0) | ||
109 | return NULL; | ||
110 | |||
104 | audit_buf = audit_log_start(audit_ctx, GFP_ATOMIC, type); | 111 | audit_buf = audit_log_start(audit_ctx, GFP_ATOMIC, type); |
105 | if (audit_buf == NULL) | 112 | if (audit_buf == NULL) |
106 | return NULL; | 113 | return NULL; |