From: Harlan Stenn Date: Wed, 1 Jan 2014 05:51:07 +0000 (+0000) Subject: [Bug 2060] Warn about restrictions with "kod" but not "limited" X-Git-Tag: NTP_4_2_7P409~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e9d60c8de7fce9ade8fe7141feb5b5fd6459c0e;p=thirdparty%2Fntp.git [Bug 2060] Warn about restrictions with "kod" but not "limited" bk: 52c3accb1BsNhOD62uQ1EfYdZWCiJg --- diff --git a/ChangeLog b/ChangeLog index 04e22c7a1..6cce57c2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* [Bug 2060] Warn about restrictions with "kod" but not "limited". (4.2.7p408) 2013/12/29 Released by Harlan Stenn * [Bug 2187] Update version number generation scripts. (4.2.7p407) 2013/12/29 Released by Harlan Stenn diff --git a/ntpd/ntp_config.c b/ntpd/ntp_config.c index 9780fcb70..3917254df 100644 --- a/ntpd/ntp_config.c +++ b/ntpd/ntp_config.c @@ -2455,6 +2455,14 @@ config_access( msyslog(LOG_WARNING, "%s", signd_warning); } + /* It would be swell if we could identify the line number */ + if ((RES_KOD & flags) && !(RES_LIMITED & flags)) { + char *kod_warn = "KOD does nothing without LIMITED."; + + fprintf(stderr, "%s\n", kod_warn); + msyslog(LOG_WARNING, "%s", kod_warn); + } + ZERO_SOCK(&addr); ai_list = NULL; pai = NULL; @@ -4892,7 +4900,7 @@ ntp_rlimit( case RLIMIT_NOFILE: /* * For large systems the default file descriptor limit may - * not be enough. + * not be enough. */ DPRINTF(2, ("ntp_rlimit: NOFILE: %d %s\n", (int)(rl_value / rl_scale), rl_sstr));