diff --git a/bin/rcp/Makefile b/bin/rcp/Makefile index a9a4da5886bb..1c156a236d11 100644 --- a/bin/rcp/Makefile +++ b/bin/rcp/Makefile @@ -7,6 +7,6 @@ CFLAGS+=-DBINDIR=${BINDIR} BINOWN= root BINMODE=4555 -INSTALLFLAGS=-fschg +PRECIOUSPROG= .include diff --git a/kerberos5/usr.bin/ksu/Makefile b/kerberos5/usr.bin/ksu/Makefile index 93f9e21c0964..cccf559c7bfb 100644 --- a/kerberos5/usr.bin/ksu/Makefile +++ b/kerberos5/usr.bin/ksu/Makefile @@ -3,7 +3,7 @@ PROG= ksu .if defined(ENABLE_SUID_K5SU) BINMODE=4555 -INSTALLFLAGS=-fschg +PRECIOUSPROG= .endif NOMAN= SRCS= su.c diff --git a/libexec/rtld-aout/Makefile b/libexec/rtld-aout/Makefile index 9bee50147f1c..9aa7d74c89b2 100644 --- a/libexec/rtld-aout/Makefile +++ b/libexec/rtld-aout/Makefile @@ -9,7 +9,8 @@ LDFLAGS+=-nostdlib -Wl,-Bshareable,-Bsymbolic,-assert,nosymbolic ASFLAGS+=-k DPADD+= ${LIBC:S/c.a/c_pic.a/} ${LIBC:S/c.a/gcc_pic.a/} LDADD+= -lc_pic -lgcc_pic -INSTALLFLAGS= -fschg -C # -C to install as atomically as possible +INSTALLFLAGS= -C # -C to install as atomically as possible +PRECIOUSPROG= MLINKS= rtld.1aout ld.so.1aout .PATH: ${.CURDIR}/${MACHINE_ARCH} diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index 68d63635c506..e5235a92a201 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -9,7 +9,8 @@ CSTD?= gnu99 CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD CFLAGS+= -I${.CURDIR}/${MACHINE_ARCH} -I${.CURDIR} LDFLAGS+= -nostdlib -e .rtld_start -INSTALLFLAGS= -fschg -C -b +INSTALLFLAGS= -C -b +PRECIOUSPROG= BINDIR= /libexec SYMLINKS= ${BINDIR}/${PROG} /usr/libexec/${PROG} MLINKS= rtld.1 ld-elf.so.1.1 \ diff --git a/release/picobsd/tinyware/login/Makefile b/release/picobsd/tinyware/login/Makefile index 2bd2a346b47a..cf13442b9a2e 100644 --- a/release/picobsd/tinyware/login/Makefile +++ b/release/picobsd/tinyware/login/Makefile @@ -20,6 +20,6 @@ LDADD+= ${MINUSLPAM} BINOWN= root BINMODE=4555 -INSTALLFLAGS=-fschg +PRECIOUSPROG= .include diff --git a/sbin/init/Makefile b/sbin/init/Makefile index ce2e618ca4e5..61752e9d3277 100644 --- a/sbin/init/Makefile +++ b/sbin/init/Makefile @@ -5,7 +5,8 @@ PROG= init MAN= init.8 MLINKS= init.8 securelevel.8 BINMODE=500 -INSTALLFLAGS=-fschg -b -B.bak +PRECIOUSPROG= +INSTALLFLAGS=-b -B.bak CFLAGS+=-DDEBUGSHELL -DSECURE -DLOGIN_CAP -DCOMPAT_SYSV_INIT WARNS?= 0 DPADD= ${LIBUTIL} ${LIBCRYPT} diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index 792b49cc1cf7..c379b2b32899 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -115,6 +115,10 @@ _EXTRADEPEND: .if !target(install) +.if defined(PRECIOUSPROG) && !defined(NOFSCHG) +INSTALLFLAGS+= -fschg +.endif + _INSTALLFLAGS:= ${INSTALLFLAGS} .for ie in ${INSTALLFLAGS_EDIT} _INSTALLFLAGS:= ${_INSTALLFLAGS${ie}} diff --git a/usr.bin/login/Makefile b/usr.bin/login/Makefile index e473aae538be..9ddda3633819 100644 --- a/usr.bin/login/Makefile +++ b/usr.bin/login/Makefile @@ -10,7 +10,7 @@ MAN= login.1 login.access.5 .if !defined(NO_SETUID_LOGIN) BINOWN= root BINMODE=4555 -INSTALLFLAGS=-fschg +PRECIOUSPROG= .endif .include diff --git a/usr.bin/newgrp/Makefile b/usr.bin/newgrp/Makefile index 546fcf72d347..8195348bf3f8 100644 --- a/usr.bin/newgrp/Makefile +++ b/usr.bin/newgrp/Makefile @@ -6,7 +6,7 @@ LDADD= -lcrypt -lutil .if defined(ENABLE_SUID_NEWGRP) BINMODE= 4555 -INSTALLFLAGS= -fschg +PRECIOUSPROG= .endif .include diff --git a/usr.bin/opieinfo/Makefile b/usr.bin/opieinfo/Makefile index 38fa24698bf5..0375111dbfba 100644 --- a/usr.bin/opieinfo/Makefile +++ b/usr.bin/opieinfo/Makefile @@ -13,7 +13,7 @@ LDADD= -lopie -lmd BINOWN= root BINMODE=4555 -INSTALLFLAGS=-fschg +PRECIOUSPROG= .PATH: ${OPIE_DIST} diff --git a/usr.bin/opiepasswd/Makefile b/usr.bin/opiepasswd/Makefile index b25b54a09ad3..0d75a2113dc1 100644 --- a/usr.bin/opiepasswd/Makefile +++ b/usr.bin/opiepasswd/Makefile @@ -13,7 +13,7 @@ LDADD= -lopie -lmd BINOWN= root BINMODE=4555 -INSTALLFLAGS=-fschg +PRECIOUSPROG= .PATH: ${OPIE_DIST} diff --git a/usr.bin/rlogin/Makefile b/usr.bin/rlogin/Makefile index 2cc2e5cdd0e1..e8f4dd4d0e3f 100644 --- a/usr.bin/rlogin/Makefile +++ b/usr.bin/rlogin/Makefile @@ -6,6 +6,6 @@ SRCS= rlogin.c BINOWN= root BINMODE=4555 -INSTALLFLAGS=-fschg +PRECIOUSPROG= .include diff --git a/usr.bin/rsh/Makefile b/usr.bin/rsh/Makefile index fd4644e26bf7..4281ed3950a3 100644 --- a/usr.bin/rsh/Makefile +++ b/usr.bin/rsh/Makefile @@ -7,6 +7,6 @@ CFLAGS+=-I${.CURDIR}/../../libexec/rlogind BINOWN= root BINMODE=4555 -INSTALLFLAGS=-fschg +PRECIOUSPROG= .include diff --git a/usr.bin/su/Makefile b/usr.bin/su/Makefile index 90b3123dcc59..109b55153d65 100644 --- a/usr.bin/su/Makefile +++ b/usr.bin/su/Makefile @@ -8,6 +8,6 @@ LDADD= -lutil ${MINUSLPAM} BINOWN= root BINMODE=4555 -INSTALLFLAGS=-fschg +PRECIOUSPROG= .include diff --git a/usr.sbin/cron/crontab/Makefile b/usr.sbin/cron/crontab/Makefile index 2c1bfc01a2e4..6b9486dc1500 100644 --- a/usr.sbin/cron/crontab/Makefile +++ b/usr.sbin/cron/crontab/Makefile @@ -6,7 +6,7 @@ PROG= crontab MAN= crontab.1 crontab.5 BINOWN= root BINMODE=4555 -INSTALLFLAGS=-fschg +PRECIOUSPROG= CFLAGS+= -I${.CURDIR}/../cron diff --git a/usr.sbin/moused/Makefile b/usr.sbin/moused/Makefile index c9c1b313519f..07a389267ab5 100644 --- a/usr.sbin/moused/Makefile +++ b/usr.sbin/moused/Makefile @@ -4,6 +4,6 @@ PROG= moused MAN= moused.8 #BINMODE=4555 -#INSTALLFLAGS=-fschg +#PRECIOUSPROG= .include diff --git a/usr.sbin/sliplogin/Makefile b/usr.sbin/sliplogin/Makefile index 860b9b099303..0236f1e8f453 100644 --- a/usr.sbin/sliplogin/Makefile +++ b/usr.sbin/sliplogin/Makefile @@ -6,6 +6,6 @@ MAN= sliplogin.8 BINOWN= root BINGRP= network BINMODE=4550 -INSTALLFLAGS=-fschg +PRECIOUSPROG= .include