]> gitweb.fluxo.info Git - firma.git/commitdiff
fix on USER and GROUP evaluation
authorrhatto <rhatto>
Mon, 9 Oct 2006 13:17:34 +0000 (13:17 +0000)
committerrhatto <rhatto>
Mon, 9 Oct 2006 13:17:34 +0000 (13:17 +0000)
firma

diff --git a/firma b/firma
index d676bd6556712eeb26ebf44e889e3481eff94ac3..f44446ea44fdb1d25bae5b5433ac3f41d371cf8a 100755 (executable)
--- a/firma
+++ b/firma
@@ -184,11 +184,11 @@ WARNING: Setting LOG_TO_SYSLOG to '0'."
     fi
   fi
 
-  if [ -z "$USER" ]; then
+  if [ ! grep -q -e "^USER=" $FIRMA_CONFIG_FILE ]; then
     USER="nobody"
   fi
 
-  if [ -z "$GROUP" ]; then
+  if [ ! grep -q -e "^GROUP=" $FIRMA_CONFIG_FILE ]; then
     GROUP="nobody"
   fi
 
@@ -1078,7 +1078,7 @@ EOF
 function CheckPermission {
   #-------------------------------------------------------------
   # check if file has correct permissions (600) and also
-  # + if the file is owned by $USER
+  # +if the file is owned by $USER
   # +got the idea for this function from backupninja
   #
   # parameter(s): file name
@@ -1106,7 +1106,7 @@ function CheckPermission {
 function CheckListPermissions {
   #-------------------------------------------------------------
   # check if list files has correct permissions (600) and also
-  # + if the files are owned by $USER
+  # +if the files are owned by $USER
   #
   # parameter(s): list config file
   # depends on function(s): CheckPermission