[ntp] warn when monitor can't be disabled due to limited restrict

Miroslav Lichvar mlichvar at fedoraproject.org
Thu Jul 3 16:22:49 UTC 2014


commit 217019f56067f5ab3d28cefc07b4e1f81ee7deec
Author: Miroslav Lichvar <mlichvar at redhat.com>
Date:   Thu Jul 3 18:08:53 2014 +0200

    warn when monitor can't be disabled due to limited restrict

 ntp-4.2.6p5-monwarn.patch |   17 +++++++++++++++++
 ntp.spec                  |    3 +++
 2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/ntp-4.2.6p5-monwarn.patch b/ntp-4.2.6p5-monwarn.patch
new file mode 100644
index 0000000..a1aa2d4
--- /dev/null
+++ b/ntp-4.2.6p5-monwarn.patch
@@ -0,0 +1,17 @@
+diff -up ntp-4.2.6p5/ntpd/ntp_proto.c.monwarn ntp-4.2.6p5/ntpd/ntp_proto.c
+--- ntp-4.2.6p5/ntpd/ntp_proto.c.monwarn	2014-07-03 18:03:37.985020147 +0200
++++ ntp-4.2.6p5/ntpd/ntp_proto.c	2014-07-03 18:06:08.656380757 +0200
+@@ -3701,8 +3701,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,
++					"monitor cannot be disabled with limited restrict");
++		}
+ 		break;
+ 
+ 	case PROTO_NTP:		/* NTP discipline (ntp) */
diff --git a/ntp.spec b/ntp.spec
index 8617769..6d8728a 100644
--- a/ntp.spec
+++ b/ntp.spec
@@ -89,6 +89,8 @@ Patch18: ntp-4.2.6p5-delaycalib.patch
 Patch19: ntp-4.2.6p5-pwcipher.patch
 # ntpbz #2320
 Patch20: ntp-4.2.6p5-noservres.patch
+# ntpbz #2612
+Patch21: ntp-4.2.6p5-monwarn.patch
 
 # handle unknown clock types
 Patch50: ntpstat-0.2-clksrc.patch
@@ -197,6 +199,7 @@ This package contains NTP documentation in HTML format.
 %patch18 -p1 -b .delaycalib
 %patch19 -p1 -b .pwcipher
 %patch20 -p1 -b .noservres
+%patch21 -p1 -b .monwarn
 
 # ntpstat patches
 %patch50 -p1 -b .clksrc


More information about the scm-commits mailing list