diff options
author | Michael Elkins <melkins@tislabs.com> | 2010-11-29 21:09:59 +0000 |
---|---|---|
committer | Michael Elkins <melkins@tislabs.com> | 2010-11-29 21:09:59 +0000 |
commit | 34b8165ec136089448f00fdf57936abf62a1ecad (patch) | |
tree | aa59963fb3159f468340d0e92e432db006c93523 | |
parent | 901241dd2421e86aab9d237a2a6e902104263128 (diff) |
change $USER to $WEBUSER to avoid conflict with posix shell variable of same name
svn path=/portal-gui/Makefile.in; revision=3566
-rw-r--r-- | portal-gui/Makefile.in | 8 | ||||
-rwxr-xr-x | portal-gui/build.sh | 4 | ||||
-rwxr-xr-x | portal-gui/configure | 10 | ||||
-rw-r--r-- | portal-gui/configure.ac | 8 | ||||
-rw-r--r-- | portal-gui/rpkigui/settings.py.in | 4 | ||||
-rwxr-xr-x | portal-gui/scripts/adduser.py | 8 |
6 files changed, 21 insertions, 21 deletions
diff --git a/portal-gui/Makefile.in b/portal-gui/Makefile.in index 12e964ee..34a38f01 100644 --- a/portal-gui/Makefile.in +++ b/portal-gui/Makefile.in @@ -17,7 +17,7 @@ INSTDIR=@INSTDIR@ PYTHON=@PYTHON@ MYRPKIDIR=@MYRPKIDIR@ DATABASE_PATH=@DATABASE_PATH@ -USER=@USER@ +WEBUSER=@WEBUSER@ CONFDIR=@CONFDIR@ # automatically built sources @@ -87,9 +87,9 @@ INSTALL_FILES=\ .PHONY: install-perms install-data install install-perms: - chown $(USER) `dirname $(DATABASE_PATH)` - chown $(USER) $(DATABASE_PATH) - chown -R $(USER) $(CONFDIR) + chown $(WEBUSER) `dirname $(DATABASE_PATH)` + chown $(WEBUSER) $(DATABASE_PATH) + chown -R $(WEBUSER) $(CONFDIR) install-data: $(BUILD) mkdir -p `dirname $(DATABASE_PATH)` diff --git a/portal-gui/build.sh b/portal-gui/build.sh index 368417cc..7591d45e 100755 --- a/portal-gui/build.sh +++ b/portal-gui/build.sh @@ -39,7 +39,7 @@ MYRPKI_SOURCE_DIR=/usr/local/src/subvert-rpki.hactrn.net/rpkid # The user that the apache process is run as. This is required to set # permissions on the directories/files that the portal-gui needs to be able to # read/write. -USER=www +WEBUSER=www ### OPTIONAL SETTINGS ### # @@ -61,5 +61,5 @@ USER=www ### END OF CONFIGURATION ### -./configure $prefix --with-myrpki=$MYRPKI_SOURCE_DIR USER=$USER CONFDIR=$CONFDIR \ +./configure $prefix --with-myrpki=$MYRPKI_SOURCE_DIR WEBUSER=$WEBUSER CONFDIR=$CONFDIR \ $DBPATH $PYTHON diff --git a/portal-gui/configure b/portal-gui/configure index 689f9071..1d58a97d 100755 --- a/portal-gui/configure +++ b/portal-gui/configure @@ -556,7 +556,7 @@ PACKAGE_URL='' ac_subst_vars='LTLIBOBJS LIBOBJS SECRET_KEY -USER +WEBUSER CONFDIR DATABASE_PATH INSTDIR @@ -1768,11 +1768,11 @@ fi $as_echo "Toplevel resource directory is $CONFDIR" >&6; } -if test "x$USER" = x; then - as_fn_error "'Must specify the user that the apache daemons runs with USER=<user>'" "$LINENO" 5 +if test "x$WEBUSER" = x; then + as_fn_error "'Must specify the user that the apache daemons runs with WEBUSER=<user>'" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Apache runs as user $USER" >&5 -$as_echo "Apache runs as user $USER" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Web server runs as user $WEBUSER" >&5 +$as_echo "Web server runs as user $WEBUSER" >&6; } # source: http://blog.leosoto.com/2008/04/django-secretkey-generation.html diff --git a/portal-gui/configure.ac b/portal-gui/configure.ac index 056a3366..667e8d54 100644 --- a/portal-gui/configure.ac +++ b/portal-gui/configure.ac @@ -54,11 +54,11 @@ fi AC_MSG_RESULT([Toplevel resource directory is $CONFDIR]) AC_SUBST(CONFDIR) -if test "x$USER" = x; then - AC_MSG_ERROR('Must specify the user that the apache daemons runs with USER=<user>') +if test "x$WEBUSER" = x; then + AC_MSG_ERROR('Must specify the user that the apache daemons runs with WEBUSER=<user>') fi -AC_MSG_RESULT([Apache runs as user $USER]) -AC_SUBST(USER) +AC_MSG_RESULT([Web server runs as user $WEBUSER]) +AC_SUBST(WEBUSER) # source: http://blog.leosoto.com/2008/04/django-secretkey-generation.html AC_SUBST(SECRET_KEY, `$PYTHON -c 'import random; print "".join([random.choice("abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)") for i in range(50)])'`) diff --git a/portal-gui/rpkigui/settings.py.in b/portal-gui/rpkigui/settings.py.in index 896992fb..17cb51be 100644 --- a/portal-gui/rpkigui/settings.py.in +++ b/portal-gui/rpkigui/settings.py.in @@ -115,5 +115,5 @@ MYRPKI_DATA_DIR = '@CONFDIR@' # Where to find the myrpki.py command line tool. MYRPKI_PATH = '@MYRPKI_TOOL@' -# the user apache runs as -APACHE_USER='@USER@' +# the user web server runs as +WEB_USER='@WEBUSER@' 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 |