diff options
Diffstat (limited to 'security/selinux/selinuxfs.c')
-rw-r--r-- | security/selinux/selinuxfs.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index ac1ccc13a704..07a5db69571c 100644 --- a/security/selinux/selinuxfs.c +++ b/security/selinux/selinuxfs.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <linux/seq_file.h> | 27 | #include <linux/seq_file.h> |
28 | #include <linux/percpu.h> | 28 | #include <linux/percpu.h> |
29 | #include <linux/audit.h> | 29 | #include <linux/audit.h> |
30 | #include <asm/uaccess.h> | 30 | #include <linux/uaccess.h> |
31 | 31 | ||
32 | /* selinuxfs pseudo filesystem for exporting the security policy API. | 32 | /* selinuxfs pseudo filesystem for exporting the security policy API. |
33 | Based on the proc code and the fs/nfsd/nfsctl.c code. */ | 33 | Based on the proc code and the fs/nfsd/nfsctl.c code. */ |
@@ -57,14 +57,18 @@ int selinux_compat_net = SELINUX_COMPAT_NET_VALUE; | |||
57 | 57 | ||
58 | static int __init checkreqprot_setup(char *str) | 58 | static int __init checkreqprot_setup(char *str) |
59 | { | 59 | { |
60 | selinux_checkreqprot = simple_strtoul(str, NULL, 0) ? 1 : 0; | 60 | unsigned long checkreqprot; |
61 | if (!strict_strtoul(str, 0, &checkreqprot)) | ||
62 | selinux_checkreqprot = checkreqprot ? 1 : 0; | ||
61 | return 1; | 63 | return 1; |
62 | } | 64 | } |
63 | __setup("checkreqprot=", checkreqprot_setup); | 65 | __setup("checkreqprot=", checkreqprot_setup); |
64 | 66 | ||
65 | static int __init selinux_compat_net_setup(char *str) | 67 | static int __init selinux_compat_net_setup(char *str) |
66 | { | 68 | { |
67 | selinux_compat_net = simple_strtoul(str, NULL, 0) ? 1 : 0; | 69 | unsigned long compat_net; |
70 | if (!strict_strtoul(str, 0, &compat_net)) | ||
71 | selinux_compat_net = compat_net ? 1 : 0; | ||
68 | return 1; | 72 | return 1; |
69 | } | 73 | } |
70 | __setup("selinux_compat_net=", selinux_compat_net_setup); | 74 | __setup("selinux_compat_net=", selinux_compat_net_setup); |