mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
51cc83f024
commit
d3ca0344b2
|
@ -1116,17 +1116,8 @@ static int __init audit_enable(char *str)
|
||||||
if (!audit_default)
|
if (!audit_default)
|
||||||
audit_initialized = AUDIT_DISABLED;
|
audit_initialized = AUDIT_DISABLED;
|
||||||
|
|
||||||
printk(KERN_INFO "audit: %s", audit_default ? "enabled" : "disabled");
|
pr_info("audit: %s\n", audit_default ?
|
||||||
|
"enabled (after initialization)" : "disabled (until reboot)");
|
||||||
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");
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue