diff options
author | mboelen <michael@cisofy.com> | 2014-09-11 18:11:43 +0400 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2014-09-11 18:11:43 +0400 |
commit | b9a9aea340116da124f91bf9ce24adca1a79fb79 (patch) | |
tree | 4713f9162e6090f79f599b360faa11534b1bf75d /include | |
parent | 220777af7665a596b93f91323355e3aa43d8fa1d (diff) |
Adjusted file permissions, permissions check and storage of PID file
Diffstat (limited to 'include')
-rw-r--r-- | include/functions | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/functions b/include/functions index 73750701..e9e972d1 100644 --- a/include/functions +++ b/include/functions @@ -210,6 +210,8 @@ LINESIZE=`echo "${TEXT}" | wc -c | tr -d ' '` SPACES=`expr 62 - ${INDENT} - ${LINESIZE}` if [ ${CRONJOB} -eq 0 ]; then + # Check if we already have already discovered a proper echo command tool. It not, set it default to 'echo'. + if [ "${ECHOCMD}" = "" ]; then ECHOCMD="echo"; fi ${ECHOCMD} "\033[${INDENT}C${TEXT}\033[${SPACES}C${RESULTPART}" else echo "${TEXT}${RESULTPART}" @@ -992,8 +994,8 @@ fi # Other permissions OTHER_PERMS=`echo ${PERMS} | cut -c8-10` - if [ ! "${OTHER_PERMS}" = "---" ]; then - echo "Fatal error: permissions of file $1 are not strict enough. Access to 'other' should be denied." + if [ ! "${OTHER_PERMS}" = "---" -a ! "${OTHER_PERMS}" = "r--" ]; then + echo "Fatal error: permissions of file $1 are not strict enough. Access to 'other' should be denied or read-only." ExitFatal fi # Set PERMS_OK to 1 if no fatal errors occurred |