Messages in this thread Patch in this message | | | Date | Fri, 25 May 2007 22:04:45 +0900 | From | "Kawai, Hidehiro" <> | Subject | [PATCH 1/7] bound suid_dumpable sysctl |
| |
This patch limits a value of suid_dumpable sysctl to the range of 0 to 2.
Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com> --- kernel/sysctl.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletion(-)
Index: linux-2.6.22-rc2-mm1/kernel/sysctl.c =================================================================== --- linux-2.6.22-rc2-mm1.orig/kernel/sysctl.c +++ linux-2.6.22-rc2-mm1/kernel/sysctl.c @@ -690,6 +690,7 @@ static ctl_table kern_table[] = { /* Constants for minimum and maximum testing in vm_table. We use these as one-element integer vectors. */ static int zero; +static int two = 2; static int one_hundred = 100; @@ -1125,7 +1126,10 @@ static ctl_table fs_table[] = { .data = &suid_dumpable, .maxlen = sizeof(int), .mode = 0644, - .proc_handler = &proc_dointvec, + .proc_handler = &proc_dointvec_minmax, + .strategy = &sysctl_intvec, + .extra1 = &zero, + .extra2 = &two, }, { .ctl_name = CTL_UNNUMBERED,
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |