mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
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>
This commit is contained in:
parent
339caf2a22
commit
99541c23cd
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue