From: S.Çağlar Onur <caglar@cs.princeton.edu>
Date: Wed, 14 Jul 2010 17:16:24 +0000 (-0400)
Subject: use system-wide umask value otherwise all directories under /dev/cgroup and /vservers... 
X-Git-Tag: util-vserver-pl-0.4-16~5
X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=9e4fb6c8dc5879c213ce8d311ca556b952ba1c21;p=util-vserver-pl.git

use system-wide umask value otherwise all directories under /dev/cgroup and /vservers become world writable
---

diff --git a/python/vserver.py b/python/vserver.py
index 96ebcdd..0fe7dd6 100644
--- a/python/vserver.py
+++ b/python/vserver.py
@@ -390,7 +390,7 @@ class VServer:
                 os._exit(0)	# Exit parent (the first child) of the second child.
             # the grandson is the working one
             os.chdir('/')
-            os.umask(0)
+            os.umask(0022)
             try:
                 # start the vserver
                 subprocess.call(["/usr/sbin/vserver",self.name,"start"])