Commit 8e654fba4a376f436bdfe361fc5cdbc87ac09b35

Authored by Matthew Wilcox
Committed by Linus Torvalds
1 parent 303d379c54

sysctl: fix suid_dumpable and lease-break-time sysctls

Arne de Bruijn points out that commit
76fdbb25f963de5dc1e308325f0578a2f92b1c2d ("coredump masking: bound
suid_dumpable sysctl") mistakenly limits lease-break-time instead of
suid_dumpable.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Reported-by: Arne 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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 6 additions and 9 deletions Side-by-side Diff

... ... @@ -95,12 +95,9 @@
95 95 static int neg_one = -1;
96 96 #endif
97 97  
98   -#if defined(CONFIG_MMU) && defined(CONFIG_FILE_LOCKING)
99   -static int two = 2;
100   -#endif
101   -
102 98 static int zero;
103 99 static int one = 1;
  100 +static int two = 2;
104 101 static unsigned long one_ul = 1;
105 102 static int one_hundred = 100;
106 103  
... ... @@ -1373,10 +1370,7 @@
1373 1370 .data = &lease_break_time,
1374 1371 .maxlen = sizeof(int),
1375 1372 .mode = 0644,
1376   - .proc_handler = &proc_dointvec_minmax,
1377   - .strategy = &sysctl_intvec,
1378   - .extra1 = &zero,
1379   - .extra2 = &two,
  1373 + .proc_handler = &proc_dointvec,
1380 1374 },
1381 1375 #endif
1382 1376 #ifdef CONFIG_AIO
... ... @@ -1417,7 +1411,10 @@
1417 1411 .data = &suid_dumpable,
1418 1412 .maxlen = sizeof(int),
1419 1413 .mode = 0644,
1420   - .proc_handler = &proc_dointvec,
  1414 + .proc_handler = &proc_dointvec_minmax,
  1415 + .strategy = &sysctl_intvec,
  1416 + .extra1 = &zero,
  1417 + .extra2 = &two,
1421 1418 },
1422 1419 #if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE)
1423 1420 {