From 4e27185aceecea6bb0786fbe4eac9a00da9d58d7 Mon Sep 17 00:00:00 2001 From: Frederic Lepied Date: Wed, 10 Aug 2005 06:33:05 +0000 Subject: Mandriva Linux --- cron-sh/security_check.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cron-sh/security_check.sh') diff --git a/cron-sh/security_check.sh b/cron-sh/security_check.sh index ec6bbeb..2960e23 100755 --- a/cron-sh/security_check.sh +++ b/cron-sh/security_check.sh @@ -67,12 +67,13 @@ while read username uid homedir; do if ! expr "$homedir" : "$FILTER" > /dev/null; then for f in ${list} ; do file="${homedir}/${f}" - if [[ -f ${file} ]] ; then - printf "${uid} ${username} ${file} `ls -LldcGn ${file}`\n" + if [[ -f "${file}" ]] ; then + res=`ls -LldcGn "${file}"` + printf "${uid}:${username}:${file}:${res}\n" fi done fi -done | awk '$1 != $6 && $6 != "0" \ +done | awk -F: '$1 != $6 && $6 != "0" \ { print "\t\t- " $3 " : file is owned by uid " $6 "." } $4 ~ /^-...r/ \ { print "\t\t- " $3 " : file is group readable." } -- cgit v1.2.1