Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Mar 2019 18:29:25 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r344809 - stable/12/usr.sbin/freebsd-update
Message-ID:  <201903051829.x25ITP9j041862@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Tue Mar  5 18:29:25 2019
New Revision: 344809
URL: https://svnweb.freebsd.org/changeset/base/344809

Log:
  MFC r343270: freebsd-update: Update /etc/passwd after password db changes
  
  Add -p to pwd_mkdb in order to ensure password db changes are also
  included in /etc/passwd.
  
  PR:		165954, 232921, 229487
  Submitted by:	Gerald Aryeetey <aryeeteygerald_rogers.com>
  Reviewed by:	jilles
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/12/usr.sbin/freebsd-update/freebsd-update.sh
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh
==============================================================================
--- stable/12/usr.sbin/freebsd-update/freebsd-update.sh	Tue Mar  5 18:27:29 2019	(r344808)
+++ stable/12/usr.sbin/freebsd-update/freebsd-update.sh	Tue Mar  5 18:29:25 2019	(r344809)
@@ -2903,10 +2903,11 @@ Kernel updates have been installed.  Please reboot and
 		install_from_index INDEX-NEW || return 1
 		install_delete INDEX-OLD INDEX-NEW || return 1
 
-		# Rebuild /etc/spwd.db and /etc/pwd.db if necessary.
+		# Rebuild generated pwd files.
 		if [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/spwd.db ] ||
-		    [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/pwd.db ]; then
-			pwd_mkdb -d ${BASEDIR}/etc ${BASEDIR}/etc/master.passwd
+		    [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/pwd.db ] ||
+		    [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/passwd ]; then
+			pwd_mkdb -d ${BASEDIR}/etc -p ${BASEDIR}/etc/master.passwd
 		fi
 
 		# Rebuild /etc/login.conf.db if necessary.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903051829.x25ITP9j041862>