]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 2612] restrict: Warn when 'monitor' can't be disabled because of 'limited'
authorHarlan Stenn <stenn@ntp.org>
Mon, 27 Apr 2015 20:49:41 +0000 (20:49 +0000)
committerHarlan Stenn <stenn@ntp.org>
Mon, 27 Apr 2015 20:49:41 +0000 (20:49 +0000)
bk: 553ea0e5m_VpVyfTVIfRNUD_XR7Pkg

ChangeLog
ntpd/ntp_proto.c

index cb5e12ab11d29a6340887dd9620a6c6abcd71400..5ddb578ed81b121af248a68d3dae13c04beafc5d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
 ---
 
 * CID 1269537: Clean up a line of dead code in getShmTime().
+* [Bug 2612] restrict: Warn when 'monitor' can't be disabled because
+  of 'limited'.
 * [Bug 2794] Clean up kernel clock status reports.
 * [Bug 2800] refclock_true.c true_debug() can't open debug log because
   of incompatible open/fdopen parameters.
index 577b5fb0af5a2d418138c0b876a29fcd30ebe8ec..979746263aa9471f57897b82d0a49d3c56aa2b82 100644 (file)
@@ -4062,8 +4062,12 @@ proto_config(
        case PROTO_MONITOR:     /* monitoring (monitor) */
                if (value)
                        mon_start(MON_ON);
-               else
+               else {
                        mon_stop(MON_ON);
+                       if (mon_enabled)
+                               msyslog(LOG_WARNING,
+                                       "restrict: 'monitor' cannot be disabled while 'limited' is enabled");
+               }
                break;
 
        case PROTO_NTP:         /* NTP discipline (ntp) */