mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 10:19:26 +00:00
Remove leading whitespace from the setuid file lists.
Due to the way we run ls(1), through xargs(1), the leading whitespace can change even when the setuid files haven't. To avoid displaying these lines, we currently run diff(1) with the '-w' option. However, this is probably not the ideal way to go; there is a very, very small possibility for diff(1) to miss things is shouldn't. So, with the leading space cleaned, we can revert to the '-b' option which is "safer." PR: conf/37618 Reviewed by: brian MFC after: 3 days
This commit is contained in:
parent
2b0baf3e99
commit
f5a8f1482c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=96048
@ -52,7 +52,7 @@ case "$daily_status_security_chksetuid_enable" in
|
||||
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 | sort +10 > ${TMP}
|
||||
done | xargs -0 -n 20 ls -liTd | sed 's/^ *//' | sort +10 > ${TMP}
|
||||
|
||||
if [ ! -f ${LOG}/setuid.today ]; then
|
||||
rc=1
|
||||
@ -64,7 +64,7 @@ case "$daily_status_security_chksetuid_enable" in
|
||||
then
|
||||
[ $rc -lt 1 ] && rc=1
|
||||
echo "${host} setuid diffs:"
|
||||
diff -w ${LOG}/setuid.today ${TMP}
|
||||
diff -b ${LOG}/setuid.today ${TMP}
|
||||
mv ${LOG}/setuid.today ${LOG}/setuid.yesterday || rc=3
|
||||
mv ${TMP} ${LOG}/setuid.today || rc=3
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user