aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ntp/ntpd
diff options
context:
space:
mode:
authorMarcin Wojtas <mw@FreeBSD.org>2021-05-21 09:29:22 +0000
committerMarcin Wojtas <mw@FreeBSD.org>2021-05-21 13:33:06 +0000
commitaf949c590bd8a00a5973b5875d7e0fa6832ea64a (patch)
treec1f644df0ffe2b8640e0d488cf20be25bcf409a1 /usr.sbin/ntp/ntpd
parentc6081dea597a475e4bbcc8588ece03ae78b58978 (diff)
downloadsrc-af949c590bd8a00a5973b5875d7e0fa6832ea64a.tar.gz
src-af949c590bd8a00a5973b5875d7e0fa6832ea64a.zip
Disable stack gap for ntpd during build.
When starting, ntpd calls setrlimit(2) to limit maximum size of its stack. The stack limit chosen by ntpd is 200K, so when stack gap is enabled, the stack gap is larger than this limit, which results in ntpd crashing. Submitted by: Dawid Gorecki <dgr@semihalf.com> Reviewed by: cy, imp Obtained from: Semihalf Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D29553
Diffstat (limited to 'usr.sbin/ntp/ntpd')
-rw-r--r--usr.sbin/ntp/ntpd/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.sbin/ntp/ntpd/Makefile b/usr.sbin/ntp/ntpd/Makefile
index 2d8a8b9d2a2d..b9c3a05547d4 100644
--- a/usr.sbin/ntp/ntpd/Makefile
+++ b/usr.sbin/ntp/ntpd/Makefile
@@ -56,4 +56,7 @@ CLEANFILES+= .version version.c
version.c:
sh -e ${.CURDIR:H}/scripts/mkver ntpd
+afterbuild:
+ ${ELFCTL} -e +noaslrstkgap ${PROG}
+
.include <bsd.prog.mk>