From 6d852b5bdb6f265d0863d8a6c42f7e9bafb2733c Mon Sep 17 00:00:00 2001 From: "Crist J. Clark" Date: Wed, 14 Nov 2001 09:30:01 +0000 Subject: [PATCH] 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 --- etc/periodic/daily/200.backup-passwd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/periodic/daily/200.backup-passwd b/etc/periodic/daily/200.backup-passwd index c312d8288171..5c585aff5f3c 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