diff options
author | Paul Moore <paul@paul-moore.com> | 2017-09-01 09:44:51 -0400 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2017-11-10 16:07:50 -0500 |
commit | 80ab4df62706b882922c3bb0b05ce2c8ab10828a (patch) | |
tree | 4ff7e335ec3ca32285576be444a62b4644f42aaf | |
parent | be4104abf25c63ccef36e1e06262c73c0df9fd60 (diff) |
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>
-rw-r--r-- | kernel/audit.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index db71c45ea6f8..e75918f79a83 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
@@ -1567,8 +1567,13 @@ postcore_initcall(audit_init); | |||
1567 | /* Process kernel command-line parameter at boot time. audit=0 or audit=1. */ | 1567 | /* Process kernel command-line parameter at boot time. audit=0 or audit=1. */ |
1568 | static int __init audit_enable(char *str) | 1568 | static int __init audit_enable(char *str) |
1569 | { | 1569 | { |
1570 | audit_default = !!simple_strtol(str, NULL, 0); | 1570 | long val; |
1571 | if (!audit_default) | 1571 | |
1572 | if (kstrtol(str, 0, &val)) | ||
1573 | panic("audit: invalid 'audit' parameter value (%s)\n", str); | ||
1574 | audit_default = (val ? AUDIT_ON : AUDIT_OFF); | ||
1575 | |||
1576 | if (audit_default == AUDIT_OFF) | ||
1572 | audit_initialized = AUDIT_DISABLED; | 1577 | audit_initialized = AUDIT_DISABLED; |
1573 | audit_enabled = audit_default; | 1578 | audit_enabled = audit_default; |
1574 | audit_ever_enabled = !!audit_enabled; | 1579 | audit_ever_enabled = !!audit_enabled; |