Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Jan 2016 02:56:31 +0000 (UTC)
From:      Glen Barber <gjb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r294972 - in projects/release-pkg/usr.bin: chpass passwd
Message-ID:  <201601280256.u0S2uVc4097697@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gjb
Date: Thu Jan 28 02:56:30 2016
New Revision: 294972
URL: https://svnweb.freebsd.org/changeset/base/294972

Log:
  Restore the 'beforeinstall' for chpass(1), so files with the
  schg flag are handled before being replaced by a symbolic link.
  
  Fix passwd(1)/yppasswd(1) schg issue similarly to chpass(1).
  
  Note:  These are likely temporary fixes while identifying any
  remaining files that are not marked as 'flags=schg' via mtree(8).
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  projects/release-pkg/usr.bin/chpass/Makefile
  projects/release-pkg/usr.bin/passwd/Makefile

Modified: projects/release-pkg/usr.bin/chpass/Makefile
==============================================================================
--- projects/release-pkg/usr.bin/chpass/Makefile	Thu Jan 28 02:21:20 2016	(r294971)
+++ projects/release-pkg/usr.bin/chpass/Makefile	Thu Jan 28 02:56:30 2016	(r294972)
@@ -35,4 +35,11 @@ MLINKS=	chpass.1 chfn.1 chpass.1 chsh.1
 MLINKS+= chpass.1 ypchpass.1 chpass.1 ypchfn.1 chpass.1 ypchsh.1
 .endif
 
+beforeinstall:
+.for i in chpass chfn chsh ypchpass ypchfn ypchsh
+.if exists(${DESTDIR}${BINDIR}/$i)
+	-chflags noschg ${DESTDIR}${BINDIR}/$i
+.endif
+.endfor
+
 .include <bsd.prog.mk>

Modified: projects/release-pkg/usr.bin/passwd/Makefile
==============================================================================
--- projects/release-pkg/usr.bin/passwd/Makefile	Thu Jan 28 02:21:20 2016	(r294971)
+++ projects/release-pkg/usr.bin/passwd/Makefile	Thu Jan 28 02:56:30 2016	(r294972)
@@ -6,9 +6,10 @@
 PROG	 = passwd
 BINOWN	 = root
 BINMODE	 = 4555
+PRECIOUSPROG=
 LIBADD   = pam
 .if ${MK_NIS} != "no"
-LINKS	 = ${BINDIR}/passwd ${BINDIR}/yppasswd
+SYMLINKS = ${BINDIR}/passwd ${BINDIR}/yppasswd
 MLINKS	 = passwd.1 yppasswd.1
 .endif
 
@@ -18,9 +19,4 @@ beforeinstall:
 		chflags noschg ${DESTDIR}${BINDIR}/$i || true
 .endfor
 
-.if !defined(NO_FSCHG)
-afterinstall:
-	-chflags schg ${DESTDIR}${BINDIR}/passwd
-.endif
-
 .include <bsd.prog.mk>



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