From: Harlan Stenn Date: Sun, 7 May 2023 07:10:38 +0000 (-0500) Subject: Startup banner now notes when debug assertions are in force X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aadf6a86d44756bf6c07e2fd35b50b83bd10a0a4;p=thirdparty%2Fntp.git Startup banner now notes when debug assertions are in force bk: 64574eee3QXLqYzBjx0YQhxCGB0H9Q --- diff --git a/ChangeLog b/ChangeLog index 5ce1c0ad7..3ea4f22d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -77,6 +77,8 @@ Integrated patch from Brian Utterback. * [Bug 2525] Turn on automake subdir-objects across the project. * [Bug 2410] syslog an error message on panic exceeded. +* If DEBUG is enabled, the startup banner now says that debug assertions + are in force and that ntpd will abort if any are violated. * syslog valid incoming KoDs. * Rename a poorly-named variable. * Disable "embedded NUL in string" messages in libopts, when we can. diff --git a/ntpd/ntpd.c b/ntpd/ntpd.c index efb98f4d3..f05924de7 100644 --- a/ntpd/ntpd.c +++ b/ntpd/ntpd.c @@ -914,6 +914,10 @@ ntpdmain( msyslog(LOG_NOTICE, "corporation. Support and training for ntp-4 are"); msyslog(LOG_NOTICE, "available at https://www.nwtime.org/support"); msyslog(LOG_NOTICE, "----------------------------------------------------"); +#ifdef DEBUG + msyslog(LOG_NOTICE, "DEBUG behavior is enabled - a violation of any"); + msyslog(LOG_NOTICE, "diagnostic assertion will cause %s to abort", progname); +#endif /* * Install trap handlers to log errors and assertion failures.