OpenVZ Forum



Members   Search      Help    Register    Login    Home
Home » Mailing lists » Devel » [PATCH] sysctl: check for bogus modes
[PATCH] sysctl: check for bogus modes [message #30589] Thu, 29 May 2008 10:15
Alexey Dobriyan is currently offline Alexey Dobriyan
Messages: 195
Registered: August 2006
Senior Member
From: openvz.org
Catch, e. g., 644/0644 typo.

Signed-off-by: Alexey Dobriyan <adobriyan@parallels.com>
---

 kernel/sysctl_check.c |    2 ++
 1 file changed, 2 insertions(+)

--- 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;
 
Read Message
Previous Topic:[RFC 1/2] memcg: hierarchy support core (yet another one)
Next Topic:Re: [PATCH 0/3] cgroup: block device i/o bandwidth controller
Goto Forum:
  


Current Time: Wed Jun 19 19:15:01 EDT 2013
Powered by FUDforum Powered by Parallels Virtuozzo Containers