aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2021-10-16 15:04:45 +0000
committerCy Schubert <cy@FreeBSD.org>2021-10-16 15:08:11 +0000
commitad1f51b39b697dbe846f259856fdb85728035605 (patch)
tree719788b0bc50bfa67fb3c00228f3c9fe7bb0e09c
parent656d2ed2c0688fd50a6b47d7ac820387f59fc812 (diff)
downloadports-ad1f51b39b697dbe846f259856fdb85728035605.tar.gz
ports-ad1f51b39b697dbe846f259856fdb85728035605.zip
net/ntp: Implement 8dc43f07dc6 only for 14-CURRENT for now
Only Reverse "Disable ntpd stack gap" for __FreeBSD_version < 1400037 for now until the next __FreeBSD_version bump. Reported by: kevans MFH: 2021Q4
-rw-r--r--net/ntp/Makefile2
-rw-r--r--net/ntp/files/patch-ntpd_ntpd.c41
2 files changed, 12 insertions, 31 deletions
diff --git a/net/ntp/Makefile b/net/ntp/Makefile
index 35feccc13198..abce03d92b90 100644
--- a/net/ntp/Makefile
+++ b/net/ntp/Makefile
@@ -2,7 +2,7 @@
PORTNAME= ntp
PORTVERSION= 4.2.8p15
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ \
http://archive.ntp.org/ntp4/ntp-4.2/ \
diff --git a/net/ntp/files/patch-ntpd_ntpd.c b/net/ntp/files/patch-ntpd_ntpd.c
index f6ab38ffc4f2..458a799fbc14 100644
--- a/net/ntp/files/patch-ntpd_ntpd.c
+++ b/net/ntp/files/patch-ntpd_ntpd.c
@@ -1,39 +1,20 @@
--- ntpd/ntpd.c.orig 2020-06-23 02:17:48.000000000 -0700
-+++ ntpd/ntpd.c 2021-10-15 19:52:05.945063000 -0700
-@@ -145,17 +145,6 @@
++++ ntpd/ntpd.c 2021-10-16 07:59:32.497688000 -0700
+@@ -145,7 +145,7 @@
# include <seccomp.h>
#endif /* LIBSECCOMP and KERN_SECCOMP */
-#ifdef __FreeBSD__
--#include <sys/procctl.h>
--#ifndef PROC_STACKGAP_CTL
--/*
-- * Even if we compile on an older system we can still run on a newer one.
-- */
--#define PROC_STACKGAP_CTL 17
--#define PROC_STACKGAP_DISABLE 0x0002
--#endif
--#endif
--
- #ifdef HAVE_DNSREGISTRATION
- # include <dns_sd.h>
- DNSServiceRef mdns;
-@@ -438,18 +427,6 @@
++#if defined(__FreeBSD_version) && __FreeBSD_version < 1400037
+ #include <sys/procctl.h>
+ #ifndef PROC_STACKGAP_CTL
+ /*
+@@ -438,7 +438,7 @@
char *argv[]
)
{
-# ifdef __FreeBSD__
-- {
-- /*
-- * We Must disable ASLR stack gap on FreeBSD to avoid a
-- * segfault. See PR/241421 and PR/241960.
-- */
-- int aslr_var = PROC_STACKGAP_DISABLE;
--
-- pid_t my_pid = getpid();
-- procctl(P_PID, my_pid, PROC_STACKGAP_CTL, &aslr_var);
-- }
--# endif
- return ntpdmain(argc, argv);
- }
- #endif /* !SYS_WINNT */
++# if defined(__FreeBSD_version) && __FreeBSD_version < 1400037
+ {
+ /*
+ * We Must disable ASLR stack gap on FreeBSD to avoid a