diff options
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 701d12c63068..270ee7fadbd8 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -58,6 +58,7 @@ extern int sysctl_overcommit_ratio; | |||
58 | extern int max_threads; | 58 | extern int max_threads; |
59 | extern int sysrq_enabled; | 59 | extern int sysrq_enabled; |
60 | extern int core_uses_pid; | 60 | extern int core_uses_pid; |
61 | extern int suid_dumpable; | ||
61 | extern char core_pattern[]; | 62 | extern char core_pattern[]; |
62 | extern int cad_pid; | 63 | extern int cad_pid; |
63 | extern int pid_max; | 64 | extern int pid_max; |
@@ -950,6 +951,14 @@ static ctl_table fs_table[] = { | |||
950 | .proc_handler = &proc_dointvec, | 951 | .proc_handler = &proc_dointvec, |
951 | }, | 952 | }, |
952 | #endif | 953 | #endif |
954 | { | ||
955 | .ctl_name = KERN_SETUID_DUMPABLE, | ||
956 | .procname = "suid_dumpable", | ||
957 | .data = &suid_dumpable, | ||
958 | .maxlen = sizeof(int), | ||
959 | .mode = 0644, | ||
960 | .proc_handler = &proc_dointvec, | ||
961 | }, | ||
953 | { .ctl_name = 0 } | 962 | { .ctl_name = 0 } |
954 | }; | 963 | }; |
955 | 964 | ||
@@ -991,8 +1000,7 @@ int do_sysctl(int __user *name, int nlen, void __user *oldval, size_t __user *ol | |||
991 | int error = parse_table(name, nlen, oldval, oldlenp, | 1000 | int error = parse_table(name, nlen, oldval, oldlenp, |
992 | newval, newlen, head->ctl_table, | 1001 | newval, newlen, head->ctl_table, |
993 | &context); | 1002 | &context); |
994 | if (context) | 1003 | kfree(context); |
995 | kfree(context); | ||
996 | if (error != -ENOTDIR) | 1004 | if (error != -ENOTDIR) |
997 | return error; | 1005 | return error; |
998 | tmp = tmp->next; | 1006 | tmp = tmp->next; |