Date: Thu, 10 Aug 2000 09:17:48 +0200 From: Markus Holmberg <markush@acc.umu.se> To: freebsd-security@freebsd.org Subject: Unified diff format in output of /etc/security? Message-ID: <20000810091748.A7931@acc.umu.se>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hello..
Is there a reason to not have the diff output of /etc/security to be
of unified format?
(/etc/periodic/daily/210.backup-aliases already seems to use unified
format)
If not, attached are patches for /etc/security and
/etc/periodic/daily/200.backup-passwd against 4.1-STABLE.
Regards,
Markus Holmberg.
--
Markus Holmberg | Give me Unix or give me a typewriter.
markush@acc.umu.se | http://www.freebsd.org/
[-- Attachment #2 --]
--- /etc/security.orig Thu Aug 10 09:13:41 2000
+++ /etc/security Thu Aug 10 09:14:21 2000
@@ -46,7 +46,7 @@
if cmp ${LOG}/setuid.today ${TMP} >/dev/null; then :; else
separator
echo "${host} setuid diffs:"
- diff -w ${LOG}/setuid.today ${TMP}
+ diff -uw ${LOG}/setuid.today ${TMP}
mv ${LOG}/setuid.today ${LOG}/setuid.yesterday
mv ${TMP} ${LOG}/setuid.today
fi
@@ -62,7 +62,7 @@
if cmp $LOG/mount.today $TMP >/dev/null 2>&1; then :; else
separator
echo "$host changes in mounted filesystems:"
- diff -b $LOG/mount.today $TMP
+ diff -bu $LOG/mount.today $TMP
mv $LOG/mount.today $LOG/mount.yesterday
mv $TMP $LOG/mount.today
fi
@@ -88,7 +88,7 @@
if cmp ${LOG}/ipfw.today ${TMP} >/dev/null; then :; else
separator
echo "${host} denied packets:"
- diff -b ${LOG}/ipfw.today ${TMP} | egrep "^>"
+ diff -bu ${LOG}/ipfw.today ${TMP} | egrep "^>"
mv ${LOG}/ipfw.today ${LOG}/ipfw.yesterday
mv ${TMP} ${LOG}/ipfw.today
fi
@@ -119,7 +119,7 @@
if cmp ${LOG}/dmesg.today ${TMP} >/dev/null 2>&1; then :; else
separator
echo "${host} kernel log messages:"
- diff -b ${LOG}/dmesg.today ${TMP} | egrep "^>"
+ diff -bu ${LOG}/dmesg.today ${TMP} | egrep "^>"
mv ${LOG}/dmesg.today ${LOG}/dmesg.yesterday
mv ${TMP} ${LOG}/dmesg.today
fi
[-- Attachment #3 --]
--- /etc/periodic/daily/200.backup-passwd.orig Thu Aug 10 09:05:12 2000
+++ /etc/periodic/daily/200.backup-passwd Thu Aug 10 09:03:32 2000
@@ -15,7 +15,7 @@
if cmp -s $bak/master.passwd.bak /etc/master.passwd; then :; else
echo "$host passwd diffs:"
- diff $bak/master.passwd.bak /etc/master.passwd |\
+ diff -u $bak/master.passwd.bak /etc/master.passwd |\
sed 's/^\([<>] [^:]*\):[^:]*:/\1:(password):/'
mv $bak/master.passwd.bak $bak/master.passwd.bak2
cp -p /etc/master.passwd $bak/master.passwd.bak
@@ -28,7 +28,7 @@
if cmp -s $bak/group.bak /etc/group; then :; else
echo "$host group diffs:"
- diff $bak/group.bak /etc/group
+ diff -u $bak/group.bak /etc/group
mv $bak/group.bak $bak/group.bak2
cp -p /etc/group $bak/group.bak
fi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000810091748.A7931>
