audit: use audit_set_enabled() in audit_enable()
Use audit_set_enabled() to enable auditing during early boot. This obviously won't emit an audit change record, but it will work anyway and should help prevent in future problems by consolidating the enable/disable code in one function. Reviewed-by: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
Родитель
b3b4fdf6a8
Коммит
5d842a5b77
|
@ -1575,8 +1575,8 @@ static int __init audit_enable(char *str)
|
||||||
|
|
||||||
if (audit_default == AUDIT_OFF)
|
if (audit_default == AUDIT_OFF)
|
||||||
audit_initialized = AUDIT_DISABLED;
|
audit_initialized = AUDIT_DISABLED;
|
||||||
audit_enabled = audit_default;
|
if (audit_set_enabled(audit_default))
|
||||||
audit_ever_enabled = !!audit_enabled;
|
panic("audit: error setting audit state (%d)\n", audit_default);
|
||||||
|
|
||||||
pr_info("%s\n", audit_default ?
|
pr_info("%s\n", audit_default ?
|
||||||
"enabled (after initialization)" : "disabled (until reboot)");
|
"enabled (after initialization)" : "disabled (until reboot)");
|
||||||
|
|
Загрузка…
Ссылка в новой задаче