Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

sysctl: check for bogus modes

parent 339caf2a
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -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;