summaryrefslogtreecommitdiffstats
path: root/etc/periodic
diff options
context:
space:
mode:
authorcjc <cjc@FreeBSD.org>2001-11-14 09:30:01 +0000
committercjc <cjc@FreeBSD.org>2001-11-14 09:30:01 +0000
commit05f295d22b062251717e35d1138c9cd384c865cf (patch)
tree134ab7f6f570d2d727438f506c4a13e0f9a52edd /etc/periodic
parentb88e604b92099b837a5cdc8f2a1d36fa3da1aee4 (diff)
downloadFreeBSD-src-05f295d22b062251717e35d1138c9cd384c865cf.zip
FreeBSD-src-05f295d22b062251717e35d1138c9cd384c865cf.tar.gz
After further discussion on -CURRENT, some people (jhb) do not like
the idea of not masking passwords on comments in case the administrator comments out an entry without clearing the password. Instead completely ignore comments (since they have no security impact) when doing the diff of the old and new passwd file. Suggested by: rwatson
Diffstat (limited to 'etc/periodic')
-rwxr-xr-xetc/periodic/daily/200.backup-passwd4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/periodic/daily/200.backup-passwd b/etc/periodic/daily/200.backup-passwd
index c312d82..5c585af 100755
--- a/etc/periodic/daily/200.backup-passwd
+++ b/etc/periodic/daily/200.backup-passwd
@@ -41,8 +41,8 @@ case "$daily_backup_passwd_enable" in
then
[ $rc -lt 1 ] && rc=1
echo "$host passwd diffs:"
- diff $bak/master.passwd.bak /etc/master.passwd |\
- sed 's/^\([<>] [^#][^:]*\):[^:]*:/\1:(password):/'
+ diff -I '^#' $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 || rc=3
fi
OpenPOWER on IntegriCloud