From: Harlan Stenn Date: Mon, 27 Apr 2015 20:49:41 +0000 (+0000) Subject: [Bug 2612] restrict: Warn when 'monitor' can't be disabled because of 'limited' X-Git-Tag: NTP_4_3_22~1^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d1d80b6de6794114575164eefc565ab47241c0a;p=thirdparty%2Fntp.git [Bug 2612] restrict: Warn when 'monitor' can't be disabled because of 'limited' bk: 553ea0e5m_VpVyfTVIfRNUD_XR7Pkg --- diff --git a/ChangeLog b/ChangeLog index cb5e12ab1..5ddb578ed 100644 --- 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. diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c index 577b5fb0a..979746263 100644 --- a/ntpd/ntp_proto.c +++ b/ntpd/ntp_proto.c @@ -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) */