Commit 99541c23 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Linus Torvalds

sysctl: check for bogus modes

Catch, e. g., 644/0644 typo.
Signed-off-by: default avatarAlexey Dobriyan <adobriyan@parallels.com>
Acked-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 339caf2a
...@@ -1532,6 +1532,8 @@ int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table) ...@@ -1532,6 +1532,8 @@ int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table)
sysctl_check_leaf(namespaces, table, &fail); sysctl_check_leaf(namespaces, table, &fail);
} }
sysctl_check_bin_path(table, &fail); sysctl_check_bin_path(table, &fail);
if (table->mode > 0777)
set_fail(&fail, table, "bogus .mode");
if (fail) { if (fail) {
set_fail(&fail, table, NULL); set_fail(&fail, table, NULL);
error = -EINVAL; error = -EINVAL;
......
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