From owner-svn-src-all@freebsd.org Thu Aug 24 20:52:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B9D8DE7FD4; Thu, 24 Aug 2017 20:52:29 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33BF565E11; Thu, 24 Aug 2017 20:52:29 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7OKqS0w081682; Thu, 24 Aug 2017 20:52:28 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7OKqSt9081681; Thu, 24 Aug 2017 20:52:28 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201708242052.v7OKqSt9081681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 24 Aug 2017 20:52:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r322859 - stable/10/etc/periodic/daily X-SVN-Group: stable-10 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/10/etc/periodic/daily X-SVN-Commit-Revision: 322859 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Aug 2017 20:52:29 -0000 Author: marius Date: Thu Aug 24 20:52:28 2017 New Revision: 322859 URL: https://svnweb.freebsd.org/changeset/base/322859 Log: MFC: r322726 Bring back the much more readable unified format for differences in /etc/{group,master.passwd}. This was originally turned on for all of /etc/{aliases,group,master.passwd} in r55196, but then backed out only for the latter two in r56697, as the adaption of the sed(1)ing done in r56308 was incorrect. This left us with inconsistent diff(1) formats in the daily output of periodic(8) ever since, despite in r56697 having been promised to be revisited. So properly adapt the password hash filtering to the unified format and turn the later on again for /etc/{group,master.passwd}, too. Approved by: re (kib) Modified: stable/10/etc/periodic/daily/200.backup-passwd Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/periodic/daily/200.backup-passwd ============================================================================== --- stable/10/etc/periodic/daily/200.backup-passwd Thu Aug 24 20:52:02 2017 (r322858) +++ stable/10/etc/periodic/daily/200.backup-passwd Thu Aug 24 20:52:28 2017 (r322859) @@ -41,8 +41,8 @@ case "$daily_backup_passwd_enable" in then [ $rc -lt 1 ] && rc=1 echo "$host passwd diffs:" - diff -I '^#' $bak/master.passwd.bak /etc/master.passwd |\ - sed 's/^\([<>] [^:]*\):[^:]*:/\1:(password):/' + diff -uI '^#' $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 @@ -58,7 +58,7 @@ case "$daily_backup_passwd_enable" in then [ $rc -lt 1 ] && rc=1 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 || rc=3 fi