aboutsummaryrefslogtreecommitdiff
path: root/firma
diff options
context:
space:
mode:
authorrhatto <rhatto>2006-10-09 13:43:02 +0000
committerrhatto <rhatto>2006-10-09 13:43:02 +0000
commit5b886e218558a54fd0ac2c0aa88252b511f45d2b (patch)
treeb84a245340487dd3fc35f5194667e59157a3b2fa /firma
parente40af508024ee4f63e54c0d8708f1282c3319d41 (diff)
downloadfirma-5b886e218558a54fd0ac2c0aa88252b511f45d2b.tar.gz
firma-5b886e218558a54fd0ac2c0aa88252b511f45d2b.tar.bz2
fix on firma.conf permission checking
Diffstat (limited to 'firma')
-rwxr-xr-xfirma11
1 files changed, 7 insertions, 4 deletions
diff --git a/firma b/firma
index d8087b6..92cbd69 100755
--- 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"}