projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
339caf2
)
sysctl: check for bogus modes
author
Alexey Dobriyan
<adobriyan@parallels.com>
Fri, 25 Jul 2008 08:48:31 +0000
(
01:48
-0700)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Fri, 25 Jul 2008 17:53:45 +0000
(10:53 -0700)
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>
kernel/sysctl_check.c
patch
|
blob
|
history
diff --git
a/kernel/sysctl_check.c
b/kernel/sysctl_check.c
index c09350d564f2c4d3baa5b1510ed0d42aeabdc6ba..c35da23ab8fb025f0fd0a03b54f90df3fe246cad 100644
(file)
--- 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;