]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 2060] Warn about restrictions with "kod" but not "limited"
authorHarlan Stenn <stenn@ntp.org>
Wed, 1 Jan 2014 05:51:07 +0000 (05:51 +0000)
committerHarlan Stenn <stenn@ntp.org>
Wed, 1 Jan 2014 05:51:07 +0000 (05:51 +0000)
bk: 52c3accb1BsNhOD62uQ1EfYdZWCiJg

ChangeLog
ntpd/ntp_config.c

index 04e22c7a191d387437db2e52beb0737d19c948f9..6cce57c2d6c0b07b33c0e199ff9ac1f73eede0f5 100644 (file)
--- 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 <stenn@ntp.org>
 * [Bug 2187] Update version number generation scripts.
 (4.2.7p407) 2013/12/29 Released by Harlan Stenn <stenn@ntp.org>
index 9780fcb7040d35ed557b61f506746f5c00c58454..3917254dff68f1d3cb320dd3c33695e7828c6f8e 100644 (file)
@@ -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));