Author: cy
Date: Thu Sep 19 20:16:51 2019
New Revision: 352540
URL: https://svnweb.freebsd.org/changeset/base/352540

Log:
  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

Modified:
  head/contrib/ntp/ntpd/ntpd.c

Modified: head/contrib/ntp/ntpd/ntpd.c
==============================================================================
--- head/contrib/ntp/ntpd/ntpd.c        Thu Sep 19 19:42:59 2019        
(r352539)
+++ head/contrib/ntp/ntpd/ntpd.c        Thu Sep 19 20:16:51 2019        
(r352540)
@@ -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
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to