Author: justi9
Date: 2009-02-19 13:57:30 -0500 (Thu, 19 Feb 2009)
New Revision: 3123
Modified:
mgmt/trunk/cumin/python/cumin/tools.py
Log:
Drop root privileges
Modified: mgmt/trunk/cumin/python/cumin/tools.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/tools.py 2009-02-18 15:14:54 UTC (rev 3122)
+++ mgmt/trunk/cumin/python/cumin/tools.py 2009-02-19 18:57:30 UTC (rev 3123)
@@ -57,6 +57,10 @@
def init(self):
super(BaseCuminTool, self).init()
+ if os.getuid() == 0:
+ # Drop privileges
+ os.setuid(os.stat(__file__).st_uid)
+
self.config.init()
try: