]> gitweb.fluxo.info Git - firma.git/commitdiff
fix on firma.conf permission checking
authorrhatto <rhatto>
Mon, 9 Oct 2006 13:43:02 +0000 (13:43 +0000)
committerrhatto <rhatto>
Mon, 9 Oct 2006 13:43:02 +0000 (13:43 +0000)
firma

diff --git a/firma b/firma
index d8087b62cd1657f0bf4914c992c24488449e6dd5..92cbd693bca9c413dc203caf8219e413f1eda87e 100755 (executable)
--- a/firma
+++ b/firma
@@ -1339,15 +1339,18 @@ case $# in
     esac
     ;;
   2)
-    # if firma.conf exists but has wrong permissions or ownership
-    if [ -f "$FIRMA_CONFIG_FILE" ] && ! CheckPermission $FIRMA_CONFIG_FILE; then
-      EXIT_CODE="1"
     # if firma.conf exists
-    elif [ -f "$FIRMA_CONFIG_FILE" ]; then
+    if [ -f "$FIRMA_CONFIG_FILE" ]; then
 
       # evaluate its parameters
       shopt -u sourcepath && source "$FIRMA_CONFIG_FILE"
 
+      # if firma.conf exists but has wrong permissions or
+      # +ownership, simple exit
+      if ! CheckPermission $FIRMA_CONFIG_FILE; then
+        exit 1
+      fi
+
       # set SYSLOG_PRIORITY to the default value, if needed
       if [[ "$LOG_TO_SYSLOG" == 1 ]]; then
         SYSLOG_PRIORITY=${SYSLOG_PRIORITY:-"user.err"}