diff options
author | Gao feng <gaofeng@cn.fujitsu.com> | 2013-10-31 02:31:01 -0400 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2014-01-13 22:28:53 -0500 |
commit | d3ca0344b21f04786219bf0f49647f24e4e17323 (patch) | |
tree | 45e0fea235246245c9161ef8a7da4b92ff0a9f58 /kernel/audit.c | |
parent | 51cc83f024ee51de9da70c17e01ec6de524f5906 (diff) |
audit: remove useless code in audit_enable
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>
Diffstat (limited to 'kernel/audit.c')
-rw-r--r-- | kernel/audit.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index 37ba59936dc5..14324dd186dc 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
@@ -1116,17 +1116,8 @@ static int __init audit_enable(char *str) | |||
1116 | if (!audit_default) | 1116 | if (!audit_default) |
1117 | audit_initialized = AUDIT_DISABLED; | 1117 | audit_initialized = AUDIT_DISABLED; |
1118 | 1118 | ||
1119 | printk(KERN_INFO "audit: %s", audit_default ? "enabled" : "disabled"); | 1119 | pr_info("audit: %s\n", audit_default ? |
1120 | 1120 | "enabled (after initialization)" : "disabled (until reboot)"); | |
1121 | if (audit_initialized == AUDIT_INITIALIZED) { | ||
1122 | audit_enabled = audit_default; | ||
1123 | audit_ever_enabled |= !!audit_default; | ||
1124 | } else if (audit_initialized == AUDIT_UNINITIALIZED) { | ||
1125 | printk(" (after initialization)"); | ||
1126 | } else { | ||
1127 | printk(" (until reboot)"); | ||
1128 | } | ||
1129 | printk("\n"); | ||
1130 | 1121 | ||
1131 | return 1; | 1122 | return 1; |
1132 | } | 1123 | } |