net/ntp: Reverse "Disable ntpd stack gap"
120137c822
(svn r517694) disabled ntpd ASLR stack gap, which caused ntpd to segfault. (The patch in120137c822
was subsequently submitted to nwtime.org for inclusion into upstream ntp.) src commit 889b56c8cd84c9a9f2d9e3b019c154d6f14d9021 addressed the underlying cause for the setrlimit segfault negating the need for this workaround. This commit removes the workaround. MFH: 2021Q4 (after a month)
This commit is contained in:
parent
e34576d8f5
commit
8dc43f07dc
2 changed files with 40 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
PORTNAME= ntp
|
||||
PORTVERSION= 4.2.8p15
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= net
|
||||
MASTER_SITES= http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ \
|
||||
http://archive.ntp.org/ntp4/ntp-4.2/ \
|
||||
|
|
39
net/ntp/files/patch-ntpd_ntpd.c
Normal file
39
net/ntp/files/patch-ntpd_ntpd.c
Normal file
|
@ -0,0 +1,39 @@
|
|||
--- 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 @@
|
||||
# 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 @@
|
||||
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 */
|
Loading…
Reference in a new issue