Follow up on r352304 which disabled default mlockall() at startup.

Unfortunately though the original tarball supports this in ./configure
(for Linux), to fully support disabling of mlockall() by default requires
a little extra help otherwise the following is logged in syslog:

	Cannot set RLIMIT_MEMLOCK: Operation not permitted

MFC after:	2 weeks
X-MFC with:	r352304
This commit is contained in:
Cy Schubert 2019-09-19 20:16:51 +00:00
parent 5f6bb72e7f
commit 20674acb70
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=352540

View File

@ -999,7 +999,7 @@ ntpdmain(
# if defined(HAVE_MLOCKALL)
# ifdef HAVE_SETRLIMIT
ntp_rlimit(RLIMIT_STACK, DFLT_RLIMIT_STACK * 4096, 4096, "4k");
# ifdef RLIMIT_MEMLOCK
# if defined(RLIMIT_MEMLOCK) && defined(DFLT_RLIMIT_MEMLOCK) && DFLT_RLIMIT_MEMLOCK != -1
/*
* The default RLIMIT_MEMLOCK is very low on Linux systems.
* Unless we increase this limit malloc calls are likely to