aboutsummaryrefslogtreecommitdiff
path: root/portal-gui/scripts/adduser.py
diff options
context:
space:
mode:
authorMichael Elkins <melkins@tislabs.com>2010-11-29 21:09:59 +0000
committerMichael Elkins <melkins@tislabs.com>2010-11-29 21:09:59 +0000
commit34b8165ec136089448f00fdf57936abf62a1ecad (patch)
treeaa59963fb3159f468340d0e92e432db006c93523 /portal-gui/scripts/adduser.py
parent901241dd2421e86aab9d237a2a6e902104263128 (diff)
change $USER to $WEBUSER to avoid conflict with posix shell variable of same name
svn path=/portal-gui/Makefile.in; revision=3566
Diffstat (limited to 'portal-gui/scripts/adduser.py')
-rwxr-xr-xportal-gui/scripts/adduser.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/portal-gui/scripts/adduser.py b/portal-gui/scripts/adduser.py
index 255c8455..b42e4687 100755
--- a/portal-gui/scripts/adduser.py
+++ b/portal-gui/scripts/adduser.py
@@ -28,7 +28,7 @@ import hashlib
import getpass
import pwd
-apache_uid = pwd.getpwnam(settings.APACHE_USER)[2]
+web_uid = pwd.getpwnam(settings.WEB_USER)[2]
# FIXME: hardcoded for now
realm = 'myrpki'
@@ -53,7 +53,7 @@ if __name__ == '__main__':
sys.exit(1)
if os.getuid() != 0:
- print >>sys.stderr, 'error: this script must be run as roon so it can set file permissions.'
+ print >>sys.stderr, 'error: this script must be run as root so it can set file permissions.'
sys.exit(1)
username = sys.argv[1]
@@ -94,7 +94,7 @@ if __name__ == '__main__':
if not os.path.exists(myrpki_dir):
print 'creating ', myrpki_dir
os.mkdir(myrpki_dir)
- os.chown(myrpki_dir, apache_uid, -1)
+ os.chown(myrpki_dir, web_uid, -1)
# create stuf myrpki.conf enough to fool portal-gui
myrpki_conf = myrpki_dir + '/myrpki.conf'
@@ -116,7 +116,7 @@ prefix_csv=%(path)s/prefixes.csv""" % { 'path': myrpki_dir }
with open(fname, 'w') as f:
# just create an empty file
pass
- os.chown(fname, apache_uid, -1)
+ os.chown(fname, web_uid, -1)
# add a password for this user to the apache passwd file if not present