summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorcjc <cjc@FreeBSD.org>2002-05-05 00:59:37 +0000
committercjc <cjc@FreeBSD.org>2002-05-05 00:59:37 +0000
commit560bc9d2454fc5b44792b6e188491f7536556a08 (patch)
tree5342ce7a3935608944b2104023b80975ffab9e8f /etc
parentd22630f48dcb5fb5e74f1654dc68921101861f52 (diff)
downloadFreeBSD-src-560bc9d2454fc5b44792b6e188491f7536556a08.zip
FreeBSD-src-560bc9d2454fc5b44792b6e188491f7536556a08.tar.gz
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
Diffstat (limited to 'etc')
-rwxr-xr-xetc/periodic/security/100.chksetuid4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/periodic/security/100.chksetuid b/etc/periodic/security/100.chksetuid
index df0ce8c..8eecf7d 100755
--- a/etc/periodic/security/100.chksetuid
+++ b/etc/periodic/security/100.chksetuid
@@ -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
OpenPOWER on IntegriCloud