audit: remove useless code in audit_enable
authorGao feng <gaofeng@cn.fujitsu.com>
Thu, 31 Oct 2013 06:31:01 +0000 (14:31 +0800)
committerEric Paris <eparis@redhat.com>
Tue, 14 Jan 2014 03:28:53 +0000 (22:28 -0500)
Since kernel parameter is operated before
initcall, so the audit_initialized must be
AUDIT_UNINITIALIZED or DISABLED in audit_enable.

Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
kernel/audit.c

index 37ba59936dc5c69eef1e9f67bce36c63adca739c..14324dd186dceaef04db207386e1b6f65f2c4440 100644 (file)
@@ -1116,17 +1116,8 @@ static int __init audit_enable(char *str)
        if (!audit_default)
                audit_initialized = AUDIT_DISABLED;
 
-       printk(KERN_INFO "audit: %s", audit_default ? "enabled" : "disabled");
-
-       if (audit_initialized == AUDIT_INITIALIZED) {
-               audit_enabled = audit_default;
-               audit_ever_enabled |= !!audit_default;
-       } else if (audit_initialized == AUDIT_UNINITIALIZED) {
-               printk(" (after initialization)");
-       } else {
-               printk(" (until reboot)");
-       }
-       printk("\n");
+       pr_info("audit: %s\n", audit_default ?
+               "enabled (after initialization)" : "disabled (until reboot)");
 
        return 1;
 }