aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Elkins <melkins@tislabs.com>2010-11-17 00:50:26 +0000
committerMichael Elkins <melkins@tislabs.com>2010-11-17 00:50:26 +0000
commitc9f510d7f406fcd25739795354a897e95b3673f1 (patch)
treecbfeb5ba87a2c7b7a827b945180ca2b9bdafe26f
parentce422aa2ffd9061d272068848f13c1869f3e508b (diff)
call conf.save() regardless of self-hosted or not
always chown() the *.csv files, even if they already exist svn path=/portal-gui/scripts/adduser.py; revision=3552
-rwxr-xr-xportal-gui/scripts/adduser.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/portal-gui/scripts/adduser.py b/portal-gui/scripts/adduser.py
index bd0596a7..255c8455 100755
--- a/portal-gui/scripts/adduser.py
+++ b/portal-gui/scripts/adduser.py
@@ -85,9 +85,9 @@ if __name__ == '__main__':
sys.exit(1)
conf.host = host_set[0]
- conf.save()
else:
print >>sys.stderr, '%s is self-hosted' % username
+ conf.save()
myrpki_dir = '%s/%s' % (settings.MYRPKI_DATA_DIR, username)
print 'myrpki_dir=', myrpki_dir
@@ -115,7 +115,8 @@ prefix_csv=%(path)s/prefixes.csv""" % { 'path': myrpki_dir }
print 'creating ', fname
with open(fname, 'w') as f:
# just create an empty file
- os.fchown(f, apache_uid, -1)
+ pass
+ os.chown(fname, apache_uid, -1)
# add a password for this user to the apache passwd file if not present