Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Sep 2019 20:16:52 +0000 (UTC)
From:      Cy Schubert <cy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r352540 - head/contrib/ntp/ntpd
Message-ID:  <201909192016.x8JKGqjH014330@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909192016.x8JKGqjH014330>