mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-01 12:04:08 +00:00
audit: don't use simple_strtol() anymore
The simple_strtol() function is deprecated, use kstrtol() instead. Reviewed-by: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
parent
be4104abf2
commit
80ab4df627
1 changed files with 7 additions and 2 deletions
|
@ -1567,8 +1567,13 @@ postcore_initcall(audit_init);
|
||||||
/* Process kernel command-line parameter at boot time. audit=0 or audit=1. */
|
/* Process kernel command-line parameter at boot time. audit=0 or audit=1. */
|
||||||
static int __init audit_enable(char *str)
|
static int __init audit_enable(char *str)
|
||||||
{
|
{
|
||||||
audit_default = !!simple_strtol(str, NULL, 0);
|
long val;
|
||||||
if (!audit_default)
|
|
||||||
|
if (kstrtol(str, 0, &val))
|
||||||
|
panic("audit: invalid 'audit' parameter value (%s)\n", str);
|
||||||
|
audit_default = (val ? AUDIT_ON : AUDIT_OFF);
|
||||||
|
|
||||||
|
if (audit_default == AUDIT_OFF)
|
||||||
audit_initialized = AUDIT_DISABLED;
|
audit_initialized = AUDIT_DISABLED;
|
||||||
audit_enabled = audit_default;
|
audit_enabled = audit_default;
|
||||||
audit_ever_enabled = !!audit_enabled;
|
audit_ever_enabled = !!audit_enabled;
|
||||||
|
|
Loading…
Add table
Reference in a new issue