summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ntp
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2014-08-19 15:04:32 +0000
committerbdrewery <bdrewery@FreeBSD.org>2014-08-19 15:04:32 +0000
commitb619f0c74719d87f58b0ea0053805b7423cdab28 (patch)
treef5585fe1edc0507d12a8ac9729befa9b67327239 /usr.sbin/ntp
parentdf507d931047ee5a6db9840d4f900c0ad539717c (diff)
downloadFreeBSD-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 'usr.sbin/ntp')
-rw-r--r--usr.sbin/ntp/ntp-keygen/Makefile2
-rw-r--r--usr.sbin/ntp/ntpd/Makefile2
-rw-r--r--usr.sbin/ntp/ntpdate/Makefile2
-rw-r--r--usr.sbin/ntp/ntpdc/Makefile2
-rw-r--r--usr.sbin/ntp/ntpq/Makefile2
-rw-r--r--usr.sbin/ntp/ntptime/Makefile2
6 files changed, 0 insertions, 12 deletions
diff --git a/usr.sbin/ntp/ntp-keygen/Makefile b/usr.sbin/ntp/ntp-keygen/Makefile
index 5075350..78308fa 100644
--- a/usr.sbin/ntp/ntp-keygen/Makefile
+++ b/usr.sbin/ntp/ntp-keygen/Makefile
@@ -21,6 +21,4 @@ DPADD+= ${LIBMD} ${LIBCRYPTO}
LDADD+= -lmd -lcrypto
.endif
-NO_PIE= yes
-
.include <bsd.prog.mk>
diff --git a/usr.sbin/ntp/ntpd/Makefile b/usr.sbin/ntp/ntpd/Makefile
index 3422ad2..87b2d72 100644
--- a/usr.sbin/ntp/ntpd/Makefile
+++ b/usr.sbin/ntp/ntpd/Makefile
@@ -4,8 +4,6 @@ MAN=
.include <src.opts.mk>
-NO_PIE= yes
-
.PATH: ${.CURDIR}/../../../contrib/ntp/ntpd
PROG= ntpd
diff --git a/usr.sbin/ntp/ntpdate/Makefile b/usr.sbin/ntp/ntpdate/Makefile
index ea0fe1e..f55ec92 100644
--- a/usr.sbin/ntp/ntpdate/Makefile
+++ b/usr.sbin/ntp/ntpdate/Makefile
@@ -13,8 +13,6 @@ LDADD= ${LIBNTP} -lm -lmd -lrt
CLEANFILES+= .version version.c
-NO_PIE= yes
-
version.c:
sh -e ${.CURDIR}/../scripts/mkver ntpdate
diff --git a/usr.sbin/ntp/ntpdc/Makefile b/usr.sbin/ntp/ntpdc/Makefile
index e4e8960..d3c37e1 100644
--- a/usr.sbin/ntp/ntpdc/Makefile
+++ b/usr.sbin/ntp/ntpdc/Makefile
@@ -22,8 +22,6 @@ CFLAGS+= -DHAVE_LIBEDIT -DHAVE_READLINE_READLINE_H \
CLEANFILES+= .version version.c
-NO_PIE= yes
-
version.c:
sh -e ${.CURDIR}/../scripts/mkver ntpdc
diff --git a/usr.sbin/ntp/ntpq/Makefile b/usr.sbin/ntp/ntpq/Makefile
index a1ddcd4..369bd58 100644
--- a/usr.sbin/ntp/ntpq/Makefile
+++ b/usr.sbin/ntp/ntpq/Makefile
@@ -24,8 +24,6 @@ CFLAGS+= -DHAVE_LIBEDIT -DHAVE_READLINE_READLINE_H \
CLEANFILES+= .version version.c
-NO_PIE= yes
-
version.c:
sh -e ${.CURDIR}/../scripts/mkver ntpq
diff --git a/usr.sbin/ntp/ntptime/Makefile b/usr.sbin/ntp/ntptime/Makefile
index af3f905..d3bf7a7 100644
--- a/usr.sbin/ntp/ntptime/Makefile
+++ b/usr.sbin/ntp/ntptime/Makefile
@@ -10,6 +10,4 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../
DPADD= ${LIBNTP}
LDADD= ${LIBNTP}
-NO_PIE= yes
-
.include <bsd.prog.mk>
OpenPOWER on IntegriCloud