diff options
author | Alexey Dobriyan <adobriyan@parallels.com> | 2008-07-25 01:48:31 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-25 10:53:45 -0700 |
commit | 99541c23cd32bacf1a591ca537a7c0cb9053ad7e (patch) | |
tree | c7156bfa677ddcf6a376ca7d9eaa8d924d7824db | |
parent | 339caf2a224fc9af0f01686bf287dda32c6efca6 (diff) | |
download | op-kernel-dev-99541c23cd32bacf1a591ca537a7c0cb9053ad7e.zip op-kernel-dev-99541c23cd32bacf1a591ca537a7c0cb9053ad7e.tar.gz |
sysctl: check for bogus modes
Catch, e. g., 644/0644 typo.
Signed-off-by: Alexey Dobriyan <adobriyan@parallels.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | kernel/sysctl_check.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sysctl_check.c b/kernel/sysctl_check.c index c09350d..c35da23a 100644 --- a/kernel/sysctl_check.c +++ b/kernel/sysctl_check.c @@ -1532,6 +1532,8 @@ int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table) sysctl_check_leaf(namespaces, table, &fail); } sysctl_check_bin_path(table, &fail); + if (table->mode > 0777) + set_fail(&fail, table, "bogus .mode"); if (fail) { set_fail(&fail, table, NULL); error = -EINVAL; |