Commit 8e654fba authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Linus Torvalds

sysctl: fix suid_dumpable and lease-break-time sysctls

Arne de Bruijn points out that commit
76fdbb25 ("coredump masking: bound
suid_dumpable sysctl") mistakenly limits lease-break-time instead of
suid_dumpable.
Signed-off-by: default avatarMatthew Wilcox <matthew@wil.cx>
Reported-by: default avatarArne de Bruijn <kernelbt@arbruijn.dds.nl>
Cc: Kawai, Hidehiro <hidehiro.kawai.ez@hitachi.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 303d379c
...@@ -95,12 +95,9 @@ static int sixty = 60; ...@@ -95,12 +95,9 @@ static int sixty = 60;
static int neg_one = -1; static int neg_one = -1;
#endif #endif
#if defined(CONFIG_MMU) && defined(CONFIG_FILE_LOCKING)
static int two = 2;
#endif
static int zero; static int zero;
static int one = 1; static int one = 1;
static int two = 2;
static unsigned long one_ul = 1; static unsigned long one_ul = 1;
static int one_hundred = 100; static int one_hundred = 100;
...@@ -1373,10 +1370,7 @@ static struct ctl_table fs_table[] = { ...@@ -1373,10 +1370,7 @@ static struct ctl_table fs_table[] = {
.data = &lease_break_time, .data = &lease_break_time,
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler = &proc_dointvec_minmax, .proc_handler = &proc_dointvec,
.strategy = &sysctl_intvec,
.extra1 = &zero,
.extra2 = &two,
}, },
#endif #endif
#ifdef CONFIG_AIO #ifdef CONFIG_AIO
...@@ -1417,7 +1411,10 @@ static struct ctl_table fs_table[] = { ...@@ -1417,7 +1411,10 @@ static struct ctl_table fs_table[] = {
.data = &suid_dumpable, .data = &suid_dumpable,
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler = &proc_dointvec, .proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &zero,
.extra2 = &two,
}, },
#if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE) #if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment