From 51dfc34663b616b92ec1902f4474fff2129642a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sj=C3=B6gren?= Date: Wed, 22 Apr 2020 10:34:58 +0200 Subject: [PATCH] accept more restrictive file permissions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Sjögren --- include/functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/functions b/include/functions index 58ddabe9..8d5a5ef8 100644 --- a/include/functions +++ b/include/functions @@ -1286,7 +1286,7 @@ CHECK_PERMISSION=$(echo "${CHECK_PERMISSION}" | ${AWKBINARY} '{printf "%03d",$1}') # First try stat command - LogText "Test: checking if file ${CHECKFILE} is ${CHECK_PERMISSION}" + LogText "Test: checking if file ${CHECKFILE} has the permissions set to ${CHECK_PERMISSION} or more restrictive" if [ -n "${STATBINARY}" ]; then case ${OS} in @@ -1344,7 +1344,7 @@ DATA=$(echo "${DATA}" | ${AWKBINARY} '{printf "%03d",$1}') if [ -n "${DATA}" ]; then - if [ "${DATA}" = "${CHECK_PERMISSION}" ]; then + if [ "${DATA}" -le "${CHECK_PERMISSION}" ]; then LogText "Outcome: correct permissions (${DATA})" return 0 fi