--- 100.chksetuid.old Fri Oct 25 17:14:16 2002 +++ 100.chksetuid Sun Feb 16 11:43:59 2003 @@ -44,21 +44,13 @@ echo "" echo 'Checking setuid files and devices:' # XXX Note that there is the possibility of overrunning the args to ls - MP=`mount -t ufs | grep -v " nosuid" | awk '{ print $3 }' | sort` - if [ -n "${MP}" ] - then - set ${MP} - while [ $# -ge 1 ]; do - mount=$1 - shift - find $mount -xdev -type f \ - \( -perm -u+x -or -perm -g+x -or -perm -o+x \) \ - \( -perm -u+s -or -perm -g+s \) -print0 - done | xargs -0 -n 20 ls -liTd | sed 's/^ *//' | sort -k 11 | + (mount -t hfs && mount -t ufs) | grep -v " nosuid" | + sed -n -e 's/^.* on \(.*\) (.*local.*)/\1/p' | + awk '{ printf "find \"%s\" -xdev -type f \\( -perm -u+x -or -perm -g+x -or -perm -o+x \\) \\( -perm -u+s -or -perm -g+s \\) -print0\n", $0 }' | + sort | sh | xargs -0 -n 20 ls -liTd | sed 's/^ *//' | sort -k 11 | check_diff setuid - "${host} setuid diffs:" - rc=$? - fi;; + rc=$?;; *) rc=0;; esac -exit $rc +exit $rc