From 275a23e00ce8184807bb3216a0ba9b5433687d86 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Sun, 15 Jun 2008 18:22:54 +0000 Subject: Fix permissions fixup in init mode git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4697 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Server/Admin/Init.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/Server/Admin/Init.py b/src/lib/Server/Admin/Init.py index f8cc7662b..a13ce4581 100644 --- a/src/lib/Server/Admin/Init.py +++ b/src/lib/Server/Admin/Init.py @@ -134,7 +134,7 @@ class Init(Bcfg2.Server.Admin.Mode): try: open(configfile, "w").write(confdata) - os.chmod(configfile, '0600') + os.chmod(configfile, 0600) except: # FIXME how to handle print "Failed to write configuration file to '%s'\n" % configfile @@ -144,7 +144,7 @@ class Init(Bcfg2.Server.Admin.Mode): # FIXME key generation may fail as non-root user os.popen('openssl req -x509 -nodes -days 1000 -newkey rsa:1024 -out %s/bcfg2.key -keyout %s/bcfg2.key' % (keypath, keypath)) try: - os.chmod('%s/bcfg2.key'% keypath,'0600') + os.chmod('%s/bcfg2.key'% keypath, 0600) except: pass -- cgit v1.2.3-1-g7c22