|
Lines 44-64
Link Here
|
| 44 |
echo "" |
44 |
echo "" |
| 45 |
echo 'Checking setuid files and devices:' |
45 |
echo 'Checking setuid files and devices:' |
| 46 |
# XXX Note that there is the possibility of overrunning the args to ls |
46 |
# XXX Note that there is the possibility of overrunning the args to ls |
| 47 |
MP=`mount -t ufs | grep -v " nosuid" | awk '{ print $3 }' | sort` |
47 |
(mount -t hfs && mount -t ufs) | grep -v " nosuid" | |
| 48 |
if [ -n "${MP}" ] |
48 |
sed -n -e 's/^.* on \(.*\) (.*local.*)/\1/p' | |
| 49 |
then |
49 |
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 }' | |
| 50 |
set ${MP} |
50 |
sort | sh | xargs -0 -n 20 ls -liTd | sed 's/^ *//' | sort -k 11 | |
| 51 |
while [ $# -ge 1 ]; do |
|
|
| 52 |
mount=$1 |
| 53 |
shift |
| 54 |
find $mount -xdev -type f \ |
| 55 |
\( -perm -u+x -or -perm -g+x -or -perm -o+x \) \ |
| 56 |
\( -perm -u+s -or -perm -g+s \) -print0 |
| 57 |
done | xargs -0 -n 20 ls -liTd | sed 's/^ *//' | sort -k 11 | |
| 58 |
check_diff setuid - "${host} setuid diffs:" |
51 |
check_diff setuid - "${host} setuid diffs:" |
| 59 |
rc=$? |
52 |
rc=$?;; |
| 60 |
fi;; |
|
|
| 61 |
*) rc=0;; |
53 |
*) rc=0;; |
| 62 |
esac |
54 |
esac |
| 63 |
|
55 |
|
| 64 |
exit $rc |
56 |
exit $rc |