summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2015-02-12 23:08:27 +0000
committerbapt <bapt@FreeBSD.org>2015-02-12 23:08:27 +0000
commit8486c039b49a5ea59ced5c8f4705e8d0194f2ade (patch)
treec33a6fa5bf414feb412a4a66cb7e793e13c43d77
parent54f0d78c4490d76fbbde061bfb2cdf89365a3621 (diff)
downloadFreeBSD-src-8486c039b49a5ea59ced5c8f4705e8d0194f2ade.zip
FreeBSD-src-8486c039b49a5ea59ced5c8f4705e8d0194f2ade.tar.gz
Use PRECIOUSPROG instead of custom code to handle schg
This allows to preserve schg when installed with -DNO_ROOT MFC after: 1 week
-rw-r--r--usr.bin/chpass/Makefile13
-rw-r--r--usr.bin/passwd/Makefile12
2 files changed, 2 insertions, 23 deletions
diff --git a/usr.bin/chpass/Makefile b/usr.bin/chpass/Makefile
index 9b3e878..c0cf46c 100644
--- a/usr.bin/chpass/Makefile
+++ b/usr.bin/chpass/Makefile
@@ -9,6 +9,7 @@ PROG= chpass
SRCS= chpass.c edit.c field.c pw_scan.c table.c util.c
BINOWN= root
BINMODE=4555
+PRECIOUSPROG=
.if ${MK_NIS} != "no"
CFLAGS+= -DYP
.endif
@@ -34,16 +35,4 @@ 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
-
-.if !defined(NO_FSCHG)
-afterinstall:
- -chflags schg ${DESTDIR}${BINDIR}/chpass
-.endif
-
.include <bsd.prog.mk>
diff --git a/usr.bin/passwd/Makefile b/usr.bin/passwd/Makefile
index f1fff46..d914060 100644
--- a/usr.bin/passwd/Makefile
+++ b/usr.bin/passwd/Makefile
@@ -7,20 +7,10 @@ PROG = passwd
BINOWN = root
BINMODE = 4555
LIBADD = pam
+PRECIOUSPROG=
.if ${MK_NIS} != "no"
LINKS = ${BINDIR}/passwd ${BINDIR}/yppasswd
MLINKS = passwd.1 yppasswd.1
.endif
-beforeinstall:
-.for i in passwd yppasswd
- [ ! -e ${DESTDIR}${BINDIR}/$i ] || \
- chflags noschg ${DESTDIR}${BINDIR}/$i || true
-.endfor
-
-.if !defined(NO_FSCHG)
-afterinstall:
- -chflags schg ${DESTDIR}${BINDIR}/passwd
-.endif
-
.include <bsd.prog.mk>
OpenPOWER on IntegriCloud