diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2014-08-19 15:04:32 +0000 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2014-08-19 15:04:32 +0000 |
commit | b619f0c74719d87f58b0ea0053805b7423cdab28 (patch) | |
tree | f5585fe1edc0507d12a8ac9729befa9b67327239 /kerberos5 | |
parent | df507d931047ee5a6db9840d4f900c0ad539717c (diff) | |
download | FreeBSD-src-b619f0c74719d87f58b0ea0053805b7423cdab28.zip FreeBSD-src-b619f0c74719d87f58b0ea0053805b7423cdab28.tar.gz |
Revert r267233 for now. PIE support needs to be reworked.
1. 50+% of NO_PIE use is fixed by adding -fPIC to INTERNALLIB and other
build-only utility libraries.
2. Another 40% is fixed by generating _pic.a variants of various libraries.
3. Some of the NO_PIE use is a bit absurd as it is disabling PIE (and ASLR)
where it never would work anyhow, such as csu or loader. This suggests
there may be better ways of adding support to the tree. Many of these
cases can be fixed such that -fPIE will work but there is really no
reason to have it in those cases.
4. Some of the uses are working around hacks done to some Makefiles that are
really building libraries but have been using bsd.prog.mk because the code
is cleaner. Had they been using bsd.lib.mk then NO_PIE would not have
been needed.
We likely do want to enable PIE by default (opt-out) for non-tree consumers
(such as ports). For in-tree though we probably want to only enable PIE
(opt-in) for common attack targets such as remote service daemons and setuid
utilities. This is also a great performance compromise since ASLR is expected
to reduce performance. As such it does not make sense to enable it in all
utilities such as ls(1) that have little benefit to having it enabled.
Reported by: kib
Diffstat (limited to 'kerberos5')
28 files changed, 0 insertions, 56 deletions
diff --git a/kerberos5/libexec/digest-service/Makefile b/kerberos5/libexec/digest-service/Makefile index bc55a1a..0c45c37 100644 --- a/kerberos5/libexec/digest-service/Makefile +++ b/kerberos5/libexec/digest-service/Makefile @@ -14,8 +14,6 @@ LDADD= -lhdb -lkdc ${LDHEIMIPCS} -lkrb5 -lroken -lasn1 -lcrypto -lcrypt \ ${LIBVERS} -lheimntlm USEPRIVATELIB= heimipcs -NO_PIE= yes - .include <bsd.prog.mk> .PATH: ${KRB5DIR}/kdc diff --git a/kerberos5/libexec/hprop/Makefile b/kerberos5/libexec/hprop/Makefile index 95b4739..ac1dffa 100644 --- a/kerberos5/libexec/hprop/Makefile +++ b/kerberos5/libexec/hprop/Makefile @@ -16,8 +16,6 @@ LDADD= -lhdb -lkrb5 -lhx509 -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} -NO_PIE= yes - .include <bsd.prog.mk> .PATH: ${KRB5DIR}/kdc diff --git a/kerberos5/libexec/hpropd/Makefile b/kerberos5/libexec/hpropd/Makefile index 31a5895..e0722bd 100644 --- a/kerberos5/libexec/hpropd/Makefile +++ b/kerberos5/libexec/hpropd/Makefile @@ -10,8 +10,6 @@ LDADD= -lhdb -lkrb5 -lhx509 -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} -NO_PIE= yes - .include <bsd.prog.mk> .PATH: ${KRB5DIR}/kdc diff --git a/kerberos5/libexec/ipropd-master/Makefile b/kerberos5/libexec/ipropd-master/Makefile index 8dbe315..99a4f9c 100644 --- a/kerberos5/libexec/ipropd-master/Makefile +++ b/kerberos5/libexec/ipropd-master/Makefile @@ -11,8 +11,6 @@ LDADD= -lkadm5srv -lhdb -lkrb5 -lhx509 -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} -NO_PIE= yes - foo:: echo ${LIBHX509} diff --git a/kerberos5/libexec/ipropd-slave/Makefile b/kerberos5/libexec/ipropd-slave/Makefile index 4aa1f27..8a72d9e 100644 --- a/kerberos5/libexec/ipropd-slave/Makefile +++ b/kerberos5/libexec/ipropd-slave/Makefile @@ -11,8 +11,6 @@ LDADD= -lkadm5srv -lhdb -lkrb5 -lhx509 -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} -NO_PIE= yes - .include <bsd.prog.mk> .PATH: ${KRB5DIR}/lib/kadm5 diff --git a/kerberos5/libexec/kadmind/Makefile b/kerberos5/libexec/kadmind/Makefile index 898e429..f88ac2f 100644 --- a/kerberos5/libexec/kadmind/Makefile +++ b/kerberos5/libexec/kadmind/Makefile @@ -15,8 +15,6 @@ LDADD= -lkadm5srv -lgssapi -lhdb -lkrb5 -lroken \ -lasn1 ${LIBVERS} -lcrypto -lcrypt ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} -NO_PIE= yes - .include <bsd.prog.mk> .PATH: ${KRB5DIR}/kadmin diff --git a/kerberos5/libexec/kcm/Makefile b/kerberos5/libexec/kcm/Makefile index 8daf958..c0e1544 100644 --- a/kerberos5/libexec/kcm/Makefile +++ b/kerberos5/libexec/kcm/Makefile @@ -26,8 +26,6 @@ LDADD= -lhdb -lkrb5 -lroken -lasn1 -lheimntlm ${LDHEIMIPCS} \ USEPRIVATELIB= heimipcs LDFLAGS=${LDAPLDFLAGS} -NO_PIE= yes - .include <bsd.prog.mk> .PATH: ${KRB5DIR}/kcm diff --git a/kerberos5/libexec/kdc/Makefile b/kerberos5/libexec/kdc/Makefile index b309a25..4ca5c3a 100644 --- a/kerberos5/libexec/kdc/Makefile +++ b/kerberos5/libexec/kdc/Makefile @@ -14,8 +14,6 @@ DPADD= ${LIBKDC} ${LIBHDB} ${LIBKRB5} ${LIBROKEN} ${LIBASN1} \ ${LIBCRYPTO} ${LIBCRYPT} ${LIBVERS} LDADD= -lkdc -lhdb -lkrb5 -lroken -lasn1 -lcrypto -lcrypt ${LIBVERS} -NO_PIE= yes - .include <bsd.prog.mk> .PATH: ${KRB5DIR}/kdc diff --git a/kerberos5/libexec/kdigest/Makefile b/kerberos5/libexec/kdigest/Makefile index 03f1ddf..c88e3b9 100644 --- a/kerberos5/libexec/kdigest/Makefile +++ b/kerberos5/libexec/kdigest/Makefile @@ -13,8 +13,6 @@ SRCS= kdigest.c \ kdigest-commands.c \ kdigest-commands.h -NO_PIE= yes - kdigest-commands.h: kdigest-commands.in ${SLC} ${.ALLSRC:M*.in} diff --git a/kerberos5/libexec/kfd/Makefile b/kerberos5/libexec/kfd/Makefile index 130cd45..f5081f1 100644 --- a/kerberos5/libexec/kfd/Makefile +++ b/kerberos5/libexec/kfd/Makefile @@ -9,8 +9,6 @@ DPADD= ${LIBKRB5} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} \ LDADD= -lkrb5 -lroken -lasn1 -lcrypto -lcrypt \ ${LIBVERS} -NO_PIE= yes - .include <bsd.prog.mk> .PATH: ${KRB5DIR}/appl/kf diff --git a/kerberos5/libexec/kimpersonate/Makefile b/kerberos5/libexec/kimpersonate/Makefile index 2dfeecb..32f9777 100644 --- a/kerberos5/libexec/kimpersonate/Makefile +++ b/kerberos5/libexec/kimpersonate/Makefile @@ -11,8 +11,6 @@ DPADD= ${LIBKAFS5} ${LIBKRB5} ${LIBHEIMNTLM} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} LDADD= -lkafs5 -lkrb5 -lheimntlm -lroken -lasn1 -lcrypto -lcrypt \ ${LIBVERS} -NO_PIE= yes - .include <bsd.prog.mk> .PATH: ${KRB5DIR}/kuser diff --git a/kerberos5/libexec/kpasswdd/Makefile b/kerberos5/libexec/kpasswdd/Makefile index 4d3914c..2287686 100644 --- a/kerberos5/libexec/kpasswdd/Makefile +++ b/kerberos5/libexec/kpasswdd/Makefile @@ -9,8 +9,6 @@ LDADD= -lkadm5srv -lhdb -lkrb5 -lhx509 -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} -NO_PIE= yes - .include <bsd.prog.mk> .PATH: ${KRB5DIR}/kpasswd diff --git a/kerberos5/tools/asn1_compile/Makefile b/kerberos5/tools/asn1_compile/Makefile index 45b04e1..88224da 100644 --- a/kerberos5/tools/asn1_compile/Makefile +++ b/kerberos5/tools/asn1_compile/Makefile @@ -27,8 +27,6 @@ CFLAGS+=-I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/asn1 -I. CLEANFILES= roken.h lex.c parse.c -NO_PIE= yes - roken.h: make-roken > ${.TARGET} diff --git a/kerberos5/tools/slc/Makefile b/kerberos5/tools/slc/Makefile index ee98843..1a26e7c 100644 --- a/kerberos5/tools/slc/Makefile +++ b/kerberos5/tools/slc/Makefile @@ -14,8 +14,6 @@ CFLAGS+=-I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/sl -I${KRB5DIR}/lib/vers -I. CLEANFILES= roken.h slc-gram.c slc-lex.c -NO_PIE= yes - roken.h: ${MAKE_ROKEN} > ${.TARGET} diff --git a/kerberos5/usr.bin/hxtool/Makefile b/kerberos5/usr.bin/hxtool/Makefile index a51dd7d..3946484 100644 --- a/kerberos5/usr.bin/hxtool/Makefile +++ b/kerberos5/usr.bin/hxtool/Makefile @@ -10,8 +10,6 @@ DPADD= ${LIBHX509} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBSL} ${LI LDADD= -lhx509 -lroken -lasn1 -lcrypto -lcrypt ${LIBSL} ${LIBVERS} -ledit SRCS= hxtool.c hxtool-commands.c hxtool-commands.h -NO_PIE= yes - hxtool-commands.h: hxtool-commands.in ${SLC} ${.ALLSRC:M*.in} diff --git a/kerberos5/usr.bin/kadmin/Makefile b/kerberos5/usr.bin/kadmin/Makefile index b01d789..8ea3efc 100644 --- a/kerberos5/usr.bin/kadmin/Makefile +++ b/kerberos5/usr.bin/kadmin/Makefile @@ -36,8 +36,6 @@ LDADD= -lkadm5clnt -lkadm5srv -lhdb -lkrb5 -lhx509 \ -ledit -lncursesw ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} -NO_PIE= yes - .include <bsd.prog.mk> kadmin-commands.h: ${KRB5DIR}/kadmin/kadmin-commands.in diff --git a/kerberos5/usr.bin/kcc/Makefile b/kerberos5/usr.bin/kcc/Makefile index 16487a2..3da43d7 100644 --- a/kerberos5/usr.bin/kcc/Makefile +++ b/kerberos5/usr.bin/kcc/Makefile @@ -19,8 +19,6 @@ SRCS= kcc.c \ kswitch.c \ copy_cred_cache.c -NO_PIE= yes - kcc-commands.h: kcc-commands.in ${SLC} ${.ALLSRC:M*.in} diff --git a/kerberos5/usr.bin/kdestroy/Makefile b/kerberos5/usr.bin/kdestroy/Makefile index 6ec3e9b..b3946e4 100644 --- a/kerberos5/usr.bin/kdestroy/Makefile +++ b/kerberos5/usr.bin/kdestroy/Makefile @@ -8,8 +8,6 @@ LDADD= -lkafs5 -lkrb5 -lheimntlm -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt MAN= kdestroy.1 -NO_PIE= yes - .include <bsd.prog.mk> .PATH: ${KRB5DIR}/kuser diff --git a/kerberos5/usr.bin/kf/Makefile b/kerberos5/usr.bin/kf/Makefile index 0244700..c9d3fce 100644 --- a/kerberos5/usr.bin/kf/Makefile +++ b/kerberos5/usr.bin/kf/Makefile @@ -9,8 +9,6 @@ DPADD= ${LIBKRB5} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} \ LDADD= -lkrb5 -lroken -lasn1 -lcrypto -lcrypt \ ${LIBVERS} -NO_PIE= yes - .include <bsd.prog.mk> .PATH: ${KRB5DIR}/appl/kf diff --git a/kerberos5/usr.bin/kgetcred/Makefile b/kerberos5/usr.bin/kgetcred/Makefile index d6ca2fc..dac38ad 100644 --- a/kerberos5/usr.bin/kgetcred/Makefile +++ b/kerberos5/usr.bin/kgetcred/Makefile @@ -6,8 +6,6 @@ CFLAGS+= -I${KRB5DIR}/lib/asn1 \ DPADD= ${LIBKRB5} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBVERS} LDADD= -lkrb5 -lroken -lasn1 -lcrypto -lcrypt ${LIBVERS} -NO_PIE= yes - .include <bsd.prog.mk> .PATH: ${KRB5DIR}/kuser diff --git a/kerberos5/usr.bin/kinit/Makefile b/kerberos5/usr.bin/kinit/Makefile index cefadf3..e0229f9 100644 --- a/kerberos5/usr.bin/kinit/Makefile +++ b/kerberos5/usr.bin/kinit/Makefile @@ -7,8 +7,6 @@ DPADD= ${LIBKAFS5} ${LIBKRB5} ${LIBHEIMNTLM} ${LIBROKEN} ${LIBVERS} \ LDADD= -lkafs5 -lkrb5 -lheimntlm -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt -lcom_err -NO_PIE= yes - .include <bsd.prog.mk> .PATH: ${KRB5DIR}/kuser diff --git a/kerberos5/usr.bin/kpasswd/Makefile b/kerberos5/usr.bin/kpasswd/Makefile index 2663892..a9ab1c9 100644 --- a/kerberos5/usr.bin/kpasswd/Makefile +++ b/kerberos5/usr.bin/kpasswd/Makefile @@ -7,8 +7,6 @@ DPADD= ${LIBKRB5} ${LIBHX509} ${LIBROKEN} ${LIBVERS} \ LDADD= -lkrb5 -lhx509 -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt -lcom_err -NO_PIE= yes - .include <bsd.prog.mk> .PATH: ${KRB5DIR}/kpasswd diff --git a/kerberos5/usr.bin/ksu/Makefile b/kerberos5/usr.bin/ksu/Makefile index 3f4ba31..9e27865 100644 --- a/kerberos5/usr.bin/ksu/Makefile +++ b/kerberos5/usr.bin/ksu/Makefile @@ -13,8 +13,6 @@ DPADD= ${LIBKAFS5} ${LIBKRB5} ${LIBHX509} ${LIBROKEN} ${LIBVERS} \ LDADD= -lkafs5 -lkrb5 -lhx509 -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt -lcom_err -NO_PIE= yes - .include <bsd.prog.mk> .PATH: ${KRB5DIR}/appl/su diff --git a/kerberos5/usr.bin/string2key/Makefile b/kerberos5/usr.bin/string2key/Makefile index 32797f3..fc790e2 100644 --- a/kerberos5/usr.bin/string2key/Makefile +++ b/kerberos5/usr.bin/string2key/Makefile @@ -11,8 +11,6 @@ DPADD= ${LIBHDB} ${LIBKRB5} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} \ ${LIBCRYPT} ${LIBVERS} LDADD= -lhdb -lkrb5 -lroken -lasn1 -lcrypto -lcrypt ${LIBVERS} -NO_PIE= yes - .include <bsd.prog.mk> .PATH: ${KRB5DIR}/kdc diff --git a/kerberos5/usr.bin/verify_krb5_conf/Makefile b/kerberos5/usr.bin/verify_krb5_conf/Makefile index 9968dd6..830e66a 100644 --- a/kerberos5/usr.bin/verify_krb5_conf/Makefile +++ b/kerberos5/usr.bin/verify_krb5_conf/Makefile @@ -8,8 +8,6 @@ DPADD= ${LIBKAFS5} ${LIBKRB5} ${LIBHX509} ${LIBROKEN} ${LIBVERS} \ LDADD= -lkafs5 -lkrb5 -lhx509 -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt -lcom_err -NO_PIE= yes - .include <bsd.prog.mk> .PATH: ${KRB5DIR}/lib/krb5 diff --git a/kerberos5/usr.sbin/iprop-log/Makefile b/kerberos5/usr.sbin/iprop-log/Makefile index a5cb4f5..176012a 100644 --- a/kerberos5/usr.sbin/iprop-log/Makefile +++ b/kerberos5/usr.sbin/iprop-log/Makefile @@ -13,8 +13,6 @@ DPADD= ${LIBKADM5SRV} ${LIBHDB} ${LIBKRB5} ${LIBASN1} ${LIBCRYPTO} \ LDADD= -lkadm5srv -lhdb -lkrb5 -lasn1 -lcrypto -lcrypt ${LIBSL} -lroken \ ${LIBVERS} -ledit -NO_PIE= yes - iprop-commands.h: iprop-commands.in ${SLC} ${.ALLSRC:M*.in} diff --git a/kerberos5/usr.sbin/kstash/Makefile b/kerberos5/usr.sbin/kstash/Makefile index 9fc8101..024e45d 100644 --- a/kerberos5/usr.sbin/kstash/Makefile +++ b/kerberos5/usr.sbin/kstash/Makefile @@ -10,8 +10,6 @@ LDADD= -lhdb -lkrb5 -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} -NO_PIE= yes - .include <bsd.prog.mk> .PATH: ${KRB5DIR}/kdc diff --git a/kerberos5/usr.sbin/ktutil/Makefile b/kerberos5/usr.sbin/ktutil/Makefile index 3445fc6..f7d340f 100644 --- a/kerberos5/usr.sbin/ktutil/Makefile +++ b/kerberos5/usr.sbin/ktutil/Makefile @@ -22,8 +22,6 @@ DPADD= ${LIBKADM5CLNT} ${LIBKRB5} ${LIBSL} ${LIBROKEN} ${LIBVERS} \ LDADD= -lkadm5clnt -lkrb5 ${LIBSL} -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt -ledit -NO_PIE= yes - .include <bsd.prog.mk> ktutil-commands.h: ${KRB5DIR}/admin/ktutil-commands.in |