summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Admin
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-06-15 18:22:54 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-06-15 18:22:54 +0000
commit275a23e00ce8184807bb3216a0ba9b5433687d86 (patch)
treecae574d9c1593a8232e62cd27d77abfa20050e21 /src/lib/Server/Admin
parentbd5b1b924d070ebcf21601f63f9bf4313df576e9 (diff)
downloadbcfg2-275a23e00ce8184807bb3216a0ba9b5433687d86.tar.gz
bcfg2-275a23e00ce8184807bb3216a0ba9b5433687d86.tar.bz2
bcfg2-275a23e00ce8184807bb3216a0ba9b5433687d86.zip
Fix permissions fixup in init mode
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4697 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Admin')
-rw-r--r--src/lib/Server/Admin/Init.py4
1 files 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