audit: do not panic on invalid boot parameter
authorGreg Edwards <gedwards@ddn.com>
Mon, 5 Mar 2018 22:05:20 +0000 (15:05 -0700)
committerPaul Moore <paul@paul-moore.com>
Tue, 6 Mar 2018 18:50:07 +0000 (13:50 -0500)
commit11dd2666375e191757dd4271d5020820c6d0e4a5
treec1f4f29419c7e4f7a1258bd2dd3815667d548837
parentce423631ce1f20564f818e7de6bc0eee0c01badd
audit: do not panic on invalid boot parameter

If you pass in an invalid audit boot parameter value, e.g. "audit=off",
the kernel panics very early in boot before the regular console is
initialized.  Unless you have earlyprintk enabled, there is no
indication of what the problem is on the console.

Convert the panic() calls to pr_err(), and leave auditing enabled if an
invalid parameter value was passed in.

Modify the parameter to also accept "on" or "off" as valid values, and
update the documentation accordingly.

Signed-off-by: Greg Edwards <gedwards@ddn.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Documentation/admin-guide/kernel-parameters.txt
kernel/audit.c