From 9e28b13e66d0219e1e5d2c7e0ee8f2603ff7aabd Mon Sep 17 00:00:00 2001 From: mpp Date: Wed, 26 Feb 1997 05:31:52 +0000 Subject: If an administrator somehow manages to break the hardlinks on chpass & passwd and turn the links into individual files with the schg flag set, make install will fail to install all of the proper links. Fixed by removing the schg flag on all of the links before installing. Closes PR# 2040. Submitted by: Ph. Charnier --- usr.bin/chpass/Makefile | 6 ++++-- usr.bin/passwd/Makefile | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/usr.bin/chpass/Makefile b/usr.bin/chpass/Makefile index 45d2767..cef2d57 100644 --- a/usr.bin/chpass/Makefile +++ b/usr.bin/chpass/Makefile @@ -52,8 +52,10 @@ yppasswd_private_xdr.c: ${RPCSRC_PRIV} yppasswd_private.h ${RPCGEN} -c -o ${.TARGET} ${RPCSRC_PRIV} beforeinstall: - [ ! -e ${DESTDIR}${BINDIR}/chpass ] || \ - chflags noschg ${DESTDIR}${BINDIR}/chpass +.for i in chpass chfn chsh ypchpass ypchfn ypchsh + [ ! -e ${DESTDIR}${BINDIR}/$i ] || \ + chflags noschg ${DESTDIR}${BINDIR}/$i +.endfor afterinstall: chflags schg ${DESTDIR}${BINDIR}/chpass diff --git a/usr.bin/passwd/Makefile b/usr.bin/passwd/Makefile index a9fc4cf..49c303c 100644 --- a/usr.bin/passwd/Makefile +++ b/usr.bin/passwd/Makefile @@ -1,5 +1,5 @@ # From: @(#)Makefile 8.3 (Berkeley) 4/2/94 -# $Id$ +# $Id: Makefile,v 1.23 1997/02/22 19:56:34 peter Exp $ PROG= passwd SRCS= local_passwd.c yppasswd_private_xdr.c yppasswd_comm.c yp_passwd.c \ @@ -68,8 +68,10 @@ DISTRIBUTION= krb .endif beforeinstall: - [ ! -e ${DESTDIR}${BINDIR}/passwd ] || \ - chflags noschg ${DESTDIR}${BINDIR}/passwd +.for i in passwd yppasswd + [ ! -e ${DESTDIR}${BINDIR}/$i ] || \ + chflags noschg ${DESTDIR}${BINDIR}/$i +.endfor afterinstall: chflags schg ${DESTDIR}${BINDIR}/passwd -- cgit v1.1