]> err.no Git - linux-2.6/blobdiff - net/netlabel/netlabel_user.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[linux-2.6] / net / netlabel / netlabel_user.c
index 98a416381e61251e1986eb176d69492ca2d7a7da..42f12bd65964e3223aa016bfbd044869a6a07a88 100644 (file)
 #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;