+* [Bug 2454] Need way to set file descriptor limit - cleanup.
(4.2.7p381) 2013/08/07 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 2451] rlimit command is missing from the table of contents in
miscopt.html .
* [Bug 2452] provide io_handler/input_handler only on
non HAVE_IO_COMPLETION_PORT platforms
-* [Bug 2453] Need a way to avoid calling mlockall.
-* [Bug 2454] Need way to set file descriptor limit.
+* [Bug 2453] Need a way to avoid calling mlockall.
+* [Bug 2454] Need way to set file descriptor limit.
* [Bug 2458] AM_CONFIG_HEADER is obsolete.
(4.2.7p380) 2013/08/03 Released by Harlan Stenn <stenn@ntp.org>
* CID 984511: Some systems have different printf needs for sizeof.
* Documentation nit cleanup.
* Documentation updates from Dave Mills.
(4.2.7p62) 2010/10/12 Released by Harlan Stenn <stenn@ntp.org>
-* [Bug 750] from 4.2.6p3-RC3: Non-existing device causes coredump with
+* [Bug 750] from 4.2.6p3-RC3: Non-existing device causes coredump with
RIPE-NCC driver.
* [Bug 1567] from 4.2.6p3-RC3: Support Arbiter 1093C Satellite Clock on
Windows.
* [Bug 1581] from 4.2.6p3-RC3: printf format string mismatch leftover.
* [Bug 1659] from 4.2.6p3-RC3: Support Truetime Satellite Clocks on
- Windows.
+ Windows.
* [Bug 1660] from 4.2.6p3-RC3: On some systems, test is in /usr/bin, not
- /bin.
+ /bin.
* [Bug 1661] from 4.2.6p3-RC3: Re-indent refclock_ripencc.c.
* Lose peer_count from ntp_peer.c and ntp_proto.c (Dave Mills).
* Documentation updates from Dave Mills.
(4.2.7p25) 2010/04/20 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 1528] from 4.2.6p2-RC2: Remove --with-arlib from br-flock.
* [Bug 1503] [Bug 1504] [Bug 1518] [Bug 1522] from 4.2.6p2-RC2:
- all of which were fixed in 4.2.7 previously.
+ all of which were fixed in 4.2.7 previously.
(4.2.7p24) 2010/04/13 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 1390] Control PPS on the Oncore M12.
* [Bug 1518] Windows ntpd should lock to one processor more
* [Bug 1479] from 4.2.6p1-RC5: not finding readline headers.
* [Bug 1484] from 4.2.6p1-RC5: ushort is not defined in QNX6.
(4.2.7p18) 2010/02/07 Released by Harlan Stenn <stenn@ntp.org>
-* [Bug 1480] from 4.2.6p1-RC5: snprintf() cleanup caused
+* [Bug 1480] from 4.2.6p1-RC5: snprintf() cleanup caused
unterminated refclock IDs.
* Stop using getaddrinfo() to convert numeric address strings to on-wire
addresses in favor of is_ip_address() alone.
* add wildcard match class for interface/nic rules.
* fix mistaken carryover of prefixlen from one rule to the next.
* Ensure IPv6 localhost address ::1 is included in libisc's Windows IPv6
- address enumeration, allowing ntpq and ntpdc's hardcoding to 127.0.0.1
+ address enumeration, allowing ntpq and ntpdc's hardcoding to 127.0.0.1
on Windows to end.
(4.2.5p218) 2009/09/21 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 1314] saveconfig emits -4 and -6 on when not given.
(4.2.5p193) 2009/07/25 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 1261] CID 34: simulate_server() rbuf.msg_flags uninitialized.
* [Bug 1262] CID 35: xpkt.mac uninitialized in simulate_server().
-* [Bug 1263] CID 37: CID 38: CID 40: CID 43: multiple refclocks
+* [Bug 1263] CID 37: CID 38: CID 40: CID 43: multiple refclocks
uninitialized tm_zone (arc, chronolog, dumbclock, pcf).
* [Bug 1264] CID 64: gsoc_sntp on_wire() frees wrong ptr receiving KoD.
* [Bug 1265] CID 65: CID 66: gsoc_sntp on_wire() leaks x_pkt, r_pkt.
* [Bug 1250] CID 53: kod_init_kod_db() overruns kod_db malloc'd buffer.
* [Bug 1251] CID 68: search_entry() mishandles dst argument.
* [Bug 1252] CID 32: Quiet Coverity warning with assertion.
-* [Bug 1253] CID 50: gsoc_sntp/crypto.c auth_init() always returns a
+* [Bug 1253] CID 50: gsoc_sntp/crypto.c auth_init() always returns a
list with one entry.
* [Bug 1254] CID 56: tv_to_str() leaks a struct tm each call.
* [Bug 1255] CID 55: pkt_output() leaks a copy of each packet.
---
(4.2.4p6) 2009/01/08 Released by Harlan Stenn <stenn@ntp.org>
-* [Bug 1113] Fixed build errors with recent versions of openSSL.
+* [Bug 1113] Fixed build errors with recent versions of openSSL.
* [Sec 1111] Fix incorrect check of EVP_VerifyFinal()'s return value.
* Update the copyright year.
* Update bugreport URL.
* Update -I documentation.
* [Bug 713] Fix bug reporting information.
-* A bug in the application of the negative-sawtooth for 12 channel receivers.
+* A bug in the application of the negative-sawtooth for 12 channel receivers.
* The removal of unneeded startup code used for the original LinuxPPS, it now
- conforms to the PPSAPI and does not need special code.
+ conforms to the PPSAPI and does not need special code.
* ntp-keygen.c: Coverity fixes [CID 33,47].
* Volley cleanup from Dave Mills.
* Fuzz cleanup from Dave Mills.
* ntpsim.c: add missing protypes and fix [CID 34], a nit.
* Upgraded bison at UDel.
* Update br-flock and flock-build machine lists.
-* [Bug 752] QoS: add parse/config handling code.
+* [Bug 752] QoS: add parse/config handling code.
* Fix the #include order in tickadj.c for picky machines.
* [Bug 752] QoS: On some systems, netinet/ip.h needs netinet/ip_systm.h.
* [Bug 752] Update the QoS tagging (code only - configuration to follow).
<dd>Specifies the stepout threshold in seconds. The default without this command is 300 s. Since this option also affects the training and startup intervals, it should not be set less than the default. Further details are on the <a href="clock.html">Clock State Machine</a> page.</dd>
</dl>
</dd>
- <dt id="rlimit"><tt>rlimit [memlock <i>Nmegabytes</i> | stacklimit <i>N4kPages</i>]</tt></dt>
+ <dt id="rlimit"><tt>rlimit [memlock <i>Nmegabytes</i> | stacksize <i>N4kPages</i> | filenum <i>Nfiledescriptors</i>]</tt></dt>
<dd>This command alters certain process storage allocation limits, and is only available on some operating systems. Options are are as follows:</dd>
<dd>
<dl>
<dt><tt>memlock <i>Nmegabytes</i></tt></dt>
<dd>Specify the number of megabytes of memory that can be allocated. Probably only available under Linux, this option is useful when dropping root (the <tt>-i</tt> option). The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.</dd>
- <dt><tt>stacklimit <i>N4kPages</i></tt></dt>
+ <dt><tt>stacksize <i>N4kPages</i></tt></dt>
<dd>Specifies the maximum size of the process stack on systems with the <tt>mlockall()</tt> function. Defaults to 50 4k pages (200 4k pages in OpenBSD).</dd>
- <dt><tt>filenum <i>N4kPages</i></tt></dt>
+ <dt><tt>filenum <i>Nfiledescriptors</i></tt></dt>
<dd>Specifies the maximum number of file descriptors ntp may have open at the same time. Defaults to system default.</dd>
</dl>
</dd>
int dump_all_config_trees(FILE *df, int comment);
#endif
-#if defined(HAVE_MLOCKALL) && defined(HAVE_SETRLIMIT)
+#if defined(HAVE_SETRLIMIT)
void ntp_rlimit(int, rlim_t, int, char *);
#endif
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.conf.texi)
#
-# It has been AutoGen-ed August 7, 2013 at 11:41:56 AM by AutoGen 5.18.1pre3
+# It has been AutoGen-ed August 8, 2013 at 04:15:35 AM by AutoGen 5.18.1pre3
# From the definitions ntp.conf.def
# and the template file agtexi-file.tpl
@end ignore
If set to zero, the stepout
pulses will not be suppressed.
@end table
-@item @code{rlimit}Oo@code{memlock} @kbd{Nmegabytes} |@code{stacklimit} @kbd{N4kPages}@code{filenum} @kbd{Nfiledescriptors}Oc
+@item @code{rlimit}Oo@code{memlock} @kbd{Nmegabytes} |@code{stacksize} @kbd{N4kPages}@code{filenum} @kbd{Nfiledescriptors}Oc
@table @asis
@item @code{memlock} @kbd{Nmegabytes}
@code{-i}
option).
The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.
-@item @code{stacklimit} @kbd{N4kPages}
+@item @code{stacksize} @kbd{N4kPages}
Specifies the maximum size of the process stack on systems with the
@item @code{filenum} @kbd{Nfiledescriptors}
Specifies the maximum number of file descriptors ntpd may have open at once. Defaults to the system default.
-.TH ntp.conf 5man "07 Aug 2013" "4.2.7p381" "File Formats"
+.TH ntp.conf 5man "08 Aug 2013" "4.2.7p381" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed August 7, 2013 at 11:41:41 AM by AutoGen 5.18.1pre3
+.\" It has been AutoGen-ed August 8, 2013 at 04:15:29 AM by AutoGen 5.18.1pre3
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.\"
.BR Xo Ic rlimit
.Oo
.Cm memlock Ar Nmegabytes |
-.Cm stacklimit Ar N4kPages
+.Cm stacksize Ar N4kPages
.Cm filenum Ar Nfiledescriptors
.Oc
.Xc
option).
The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.
.ti -4
-.IR Cm stacklimit Ar N4kPages
+.IR Cm stacksize Ar N4kPages
Specifies the maximum size of the process stack on systems with the
.ti -4
.IR Cm filenum Ar Nfiledescriptors
-.Dd August 7 2013
+.Dd August 8 2013
.Dt NTP_CONF 5mdoc File Formats
.Os SunOS 5.10
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed August 7, 2013 at 11:42:01 AM by AutoGen 5.18.1pre3
+.\" It has been AutoGen-ed August 8, 2013 at 04:15:37 AM by AutoGen 5.18.1pre3
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
.It Xo Ic rlimit
.Oo
.Cm memlock Ar Nmegabytes |
-.Cm stacklimit Ar N4kPages
+.Cm stacksize Ar N4kPages
.Cm filenum Ar Nfiledescriptors
.Oc
.Xc
.Fl i
option).
The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.
-.It Cm stacklimit Ar N4kPages
+.It Cm stacksize Ar N4kPages
Specifies the maximum size of the process stack on systems with the
.It Cm filenum Ar Nfiledescriptors
Specifies the maximum number of file descriptors ntpd may have open at once. Defaults to the system default.
.It Xo Ic rlimit
.Oo
.Cm memlock Ar Nmegabytes |
-.Cm stacklimit Ar N4kPages
+.Cm stacksize Ar N4kPages
.Cm filenum Ar Nfiledescriptors
.Oc
.Xc
.Fl i
option).
The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.
-.It Cm stacklimit Ar N4kPages
+.It Cm stacksize Ar N4kPages
Specifies the maximum size of the process stack on systems with the
.It Cm filenum Ar Nfiledescriptors
Specifies the maximum number of file descriptors ntpd may have open at once. Defaults to the system default.
-.TH ntp.conf 5 "07 Aug 2013" "4.2.7p381" "File Formats"
+.TH ntp.conf 5 "08 Aug 2013" "4.2.7p381" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed August 7, 2013 at 11:41:41 AM by AutoGen 5.18.1pre3
+.\" It has been AutoGen-ed August 8, 2013 at 04:15:29 AM by AutoGen 5.18.1pre3
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.\"
.BR Xo Ic rlimit
.Oo
.Cm memlock Ar Nmegabytes |
-.Cm stacklimit Ar N4kPages
+.Cm stacksize Ar N4kPages
.Cm filenum Ar Nfiledescriptors
.Oc
.Xc
option).
The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.
.ti -4
-.IR Cm stacklimit Ar N4kPages
+.IR Cm stacksize Ar N4kPages
Specifies the maximum size of the process stack on systems with the
.ti -4
.IR Cm filenum Ar Nfiledescriptors
-.Dd August 7 2013
+.Dd August 8 2013
.Dt NTP_CONF 5 File Formats
.Os SunOS 5.10
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed August 7, 2013 at 11:42:01 AM by AutoGen 5.18.1pre3
+.\" It has been AutoGen-ed August 8, 2013 at 04:15:37 AM by AutoGen 5.18.1pre3
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
.It Xo Ic rlimit
.Oo
.Cm memlock Ar Nmegabytes |
-.Cm stacklimit Ar N4kPages
+.Cm stacksize Ar N4kPages
.Cm filenum Ar Nfiledescriptors
.Oc
.Xc
.Fl i
option).
The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.
-.It Cm stacklimit Ar N4kPages
+.It Cm stacksize Ar N4kPages
Specifies the maximum size of the process stack on systems with the
.It Cm filenum Ar Nfiledescriptors
Specifies the maximum number of file descriptors ntpd may have open at once. Defaults to the system default.
case T_Memlock:
if (rlimit_av->value.i != 0) {
-#if defined(HAVE_MLOCKALL) && defined(RLIMIT_MEMLOCK)
+#if defined(RLIMIT_MEMLOCK)
ntp_rlimit(RLIMIT_MEMLOCK,
(rlim_t)(rlimit_av->value.i * 1024 * 1024),
1024 * 1024,
#else
/* STDERR as well would be fine... */
msyslog(LOG_WARNING, "'rlimit memlock' specified but is not available on this system.");
-#endif /* !(HAVE_MLOCKALL && RLIMIT_MEMLOCK) */
+#endif /* RLIMIT_MEMLOCK */
} else {
do_memlock = 0;
}
break;
case T_Stacksize:
-#if defined(HAVE_MLOCKALL) && defined(RLIMIT_STACK)
+#if defined(RLIMIT_STACK)
ntp_rlimit(RLIMIT_STACK,
(rlim_t)(rlimit_av->value.i * 4096),
4096,
#else
/* STDERR as well would be fine... */
msyslog(LOG_WARNING, "'rlimit stacksize' specified but is not available on this system.");
-#endif /* !(HAVE_MLOCKALL && RLIMIT_STACK) */
+#endif /* RLIMIT_STACK */
break;
case T_Filenum:
#else
/* STDERR as well would be fine... */
msyslog(LOG_WARNING, "'rlimit filenum' specified but is not available on this system.");
-#endif /* !(RLIMIT_NOFILE) */
+#endif /* RLIMIT_NOFILE */
break;
}
}
#endif /* !SIM */
-# if defined(HAVE_MLOCKALL) && defined(HAVE_SETRLIMIT)
+#if defined(HAVE_SETRLIMIT)
void
ntp_rlimit(
int rl_what,
struct rlimit rl;
switch (rl_what) {
-#ifdef RLIMIT_MEMLOCK
+# ifdef RLIMIT_MEMLOCK
case RLIMIT_MEMLOCK:
/*
* The default RLIMIT_MEMLOCK is very low on Linux systems.
if (setrlimit(RLIMIT_MEMLOCK, &rl) == -1)
msyslog(LOG_ERR, "Cannot set RLIMIT_MEMLOCK: %m");
break;
-#endif /* RLIMIT_MEMLOCK */
+# endif /* RLIMIT_MEMLOCK */
-#ifdef RLIMIT_NOFILE
+# ifdef RLIMIT_NOFILE
case RLIMIT_NOFILE:
/*
* For large systems the default file descriptor limit may
if (setrlimit(RLIMIT_NOFILE, &rl) == -1)
msyslog(LOG_ERR, "Cannot set RLIMIT_NOFILE: %m");
break;
-#endif /* RLIMIT_NOFILE */
+# endif /* RLIMIT_NOFILE */
+# ifdef RLIMIT_STACK
case RLIMIT_STACK:
/*
* Provide a way to set the stack limit to something
}
}
break;
+# endif /* RLIMIT_STACK */
default:
INSIST(!"Unexpected setrlimit() case!");
break;
}
}
-# endif /* ... && HAVE_SETRLIMIT */
+#endif /* HAVE_SETRLIMIT */