Index: contrib/ntp/ntpd/ntpd.c =================================================================== --- contrib/ntp/ntpd/ntpd.c (revision 356668) +++ contrib/ntp/ntpd/ntpd.c (working copy) @@ -138,17 +138,6 @@ # include #endif /* LIBSECCOMP and KERN_SECCOMP */ -#ifdef __FreeBSD__ -#include -#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 DNSServiceRef mdns; @@ -413,18 +402,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 */ @@ -1022,7 +999,7 @@ # if defined(HAVE_MLOCKALL) # ifdef HAVE_SETRLIMIT ntp_rlimit(RLIMIT_STACK, DFLT_RLIMIT_STACK * 4096, 4096, "4k"); -# if defined(RLIMIT_MEMLOCK) && defined(DFLT_RLIMIT_MEMLOCK) && DFLT_RLIMIT_MEMLOCK != -1 +# ifdef RLIMIT_MEMLOCK /* * The default RLIMIT_MEMLOCK is very low on Linux systems. * Unless we increase this limit malloc calls are likely to Index: usr.sbin/ntp/config.h =================================================================== --- usr.sbin/ntp/config.h (revision 356668) +++ usr.sbin/ntp/config.h (working copy) @@ -287,7 +287,7 @@ #define DEFAULT_HZ 100 /* Default number of megabytes for RLIMIT_MEMLOCK */ -#define DFLT_RLIMIT_MEMLOCK -1 +#define DFLT_RLIMIT_MEMLOCK 32 /* Default number of 4k pages for RLIMIT_STACK */ #define DFLT_RLIMIT_STACK 50 @@ -1477,7 +1477,7 @@ #define PACKAGE_URL "http://www.ntp.org./" /* Define to the version of this package. */ -#define PACKAGE_VERSION "4.2.8p13" +#define PACKAGE_VERSION "4.2.8p12" /* data dir */ #define PERLLIBDIR "/usr/share/ntp/lib" Index: usr.sbin/ntp/ntpd/ntp.conf =================================================================== --- usr.sbin/ntp/ntpd/ntp.conf (revision 356668) +++ usr.sbin/ntp/ntpd/ntp.conf (working copy) @@ -102,11 +102,3 @@ # Use either leapfile in /etc/ntp or periodically updated leapfile in /var/db. #leapfile "/etc/ntp/leap-seconds" leapfile "/var/db/ntpd.leap-seconds.list" - -# Specify the number of megabytes of memory that should be allocated and -# locked. -1 (default) means "do not lock the process into memory". -# 0 means "lock whatever memory the process wants into memory". Any other -# number means to lock up to that number of megabytes into memory. -# 0 may result in a segfault when ASLR with stack gap randomization -# is enabled. -#rlimit memlock 32