Author: emaste
Date: Mon Jan 21 19:04:37 2019
New Revision: 343270
URL: https://svnweb.freebsd.org/changeset/base/343270

Log:
  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
  MFC after:    1 month
  Sponsored by: The FreeBSD Foundation
  Differential Revision:        https://reviews.freebsd.org/D18827

Modified:
  head/usr.sbin/freebsd-update/freebsd-update.sh

Modified: head/usr.sbin/freebsd-update/freebsd-update.sh
==============================================================================
--- head/usr.sbin/freebsd-update/freebsd-update.sh      Mon Jan 21 18:42:16 
2019        (r343269)
+++ head/usr.sbin/freebsd-update/freebsd-update.sh      Mon Jan 21 19:04:37 
2019        (r343270)
@@ -2918,10 +2918,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.
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to