]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 1223] Final cleanup for rlimit changes
authorHarlan Stenn <stenn@ntp.org>
Fri, 21 Dec 2012 10:41:54 +0000 (05:41 -0500)
committerHarlan Stenn <stenn@ntp.org>
Fri, 21 Dec 2012 10:41:54 +0000 (05:41 -0500)
bk: 50d43cf2MK2wvfcT4UjKj99rqpElnw

ChangeLog
ntpd/ntpd.c

index 3b8c6d5a291cf600a8513412017c583d8eb0cfe1..7db7efb84aea704cb68319fdc509ecccf4066c14 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+* [Bug 1223] Final cleanup for rlimit changes.
 (4.2.7p335) 2012/12/18 Released by Harlan Stenn <stenn@ntp.org>
 * Update documentation templates and definitions.
 * Create agtexi-file.tpl .
index 808617b4fc6fc0c658a89a8441efef7d68be81c1..ef4b8493d8e15797f97d323e1ee59acf23688ac2 100644 (file)
@@ -12,6 +12,7 @@
 #include "ntp_stdlib.h"
 #include <ntp_random.h>
 
+#include "ntp_config.h"
 #include "ntp_syslog.h"
 #include "ntp_assert.h"
 #include "isc/error.h"
@@ -686,7 +687,7 @@ ntpdmain(
 
 # if defined(HAVE_MLOCKALL)
 #  ifdef HAVE_SETRLIMIT
-       ntp_rlimit(RLIMIT_STACK, DFLT_RLIMIT_STACK * 4096);
+       ntp_rlimit(RLIMIT_STACK, DFLT_RLIMIT_STACK * 4096, 4096, "4k");
 #   ifdef RLIMIT_MEMLOCK
        /*
         * The default RLIMIT_MEMLOCK is very low on Linux systems.
@@ -694,7 +695,7 @@ ntpdmain(
         * fail if we drop root privilege.  To be useful the value
         * has to be larger than the largest ntpd resident set size.
         */
-       ntp_rlimit(RLIMIT_MEMLOCK, DFLT_RLIMIT_MEMLOCK * 1024 * 1024);
+       ntp_rlimit(RLIMIT_MEMLOCK, DFLT_RLIMIT_MEMLOCK * 1024 * 1024, 1024 * 1024, "MB");
 #   endif      /* RLIMIT_MEMLOCK */
 #  endif       /* HAVE_SETRLIMIT */
        /*