aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ntp
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2019-09-13 20:20:05 +0000
committerCy Schubert <cy@FreeBSD.org>2019-09-13 20:20:05 +0000
commit854cab511e773a81ed29e1b1657b737790e38f1e (patch)
tree355870bcdf004f2215b1f6e52bad669d462902df /usr.sbin/ntp
parent6e7abad2faa684a37261bd412cefefda644e386b (diff)
Notes
Diffstat (limited to 'usr.sbin/ntp')
-rw-r--r--usr.sbin/ntp/config.h2
-rw-r--r--usr.sbin/ntp/ntpd/ntp.conf8
2 files changed, 9 insertions, 1 deletions
diff --git a/usr.sbin/ntp/config.h b/usr.sbin/ntp/config.h
index 56dbfedba6ec..b26dd4178858 100644
--- a/usr.sbin/ntp/config.h
+++ b/usr.sbin/ntp/config.h
@@ -287,7 +287,7 @@
#define DEFAULT_HZ 100
/* Default number of megabytes for RLIMIT_MEMLOCK */
-#define DFLT_RLIMIT_MEMLOCK 32
+#define DFLT_RLIMIT_MEMLOCK -1
/* Default number of 4k pages for RLIMIT_STACK */
#define DFLT_RLIMIT_STACK 50
diff --git a/usr.sbin/ntp/ntpd/ntp.conf b/usr.sbin/ntp/ntpd/ntp.conf
index 3a2ff63cd25a..8d154ca36dbc 100644
--- a/usr.sbin/ntp/ntpd/ntp.conf
+++ b/usr.sbin/ntp/ntpd/ntp.conf
@@ -102,3 +102,11 @@ restrict ::1
# 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