diff --git a/SOURCES/ntp-4.2.6p5-xleap.patch b/SOURCES/ntp-4.2.6p5-xleap.patch new file mode 100644 index 0000000..2937f97 --- /dev/null +++ b/SOURCES/ntp-4.2.6p5-xleap.patch @@ -0,0 +1,44 @@ +diff -up ntp-4.2.6p5/html/miscopt.html.xleap ntp-4.2.6p5/html/miscopt.html +--- ntp-4.2.6p5/html/miscopt.html.xleap 2009-12-09 08:36:36.000000000 +0100 ++++ ntp-4.2.6p5/html/miscopt.html 2015-02-18 13:36:42.245273922 +0100 +@@ -88,7 +88,7 @@ + is 0.128 s. If set to zero, step adjustments will never + occur. Note: The kernel time discipline is disabled if + the step threshold is set to zero or greater than 0.5 +- s. ++ s and the threshold is applied also to leap second corrections. +
stepout stepout
+
Specifies the stepout threshold in seconds. The default without this + command is 900 s. If set to zero, popcorn spikes will +diff -up ntp-4.2.6p5/html/ntpd.html.xleap ntp-4.2.6p5/html/ntpd.html +--- ntp-4.2.6p5/html/ntpd.html.xleap 2015-02-18 13:24:29.489697158 +0100 ++++ ntp-4.2.6p5/html/ntpd.html 2015-02-18 13:34:46.296031098 +0100 +@@ -146,7 +146,7 @@ +
-U interface update interval
+
Number of seconds to wait between interface list scans to pick up new and delete network interface. Set to 0 to disable dynamic interface list updating. The default is to scan every 5 minutes.
+
-x
+-
Normally, the time is slewed if the offset is less than the step threshold, which is 128 ms by default, and stepped if above the threshold. This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually. Note: Since the slew rate of typical Unix kernels is limited to 0.5 ms/s, each second of adjustment requires an amortization interval of 2000 s. Thus, an adjustment as much as 600 s will take almost 14 days to complete. This option can be used with the -g and -q options. See the tinker command for other options. Note: The kernel time discipline is disabled with this option.
++
Normally, the time is slewed if the offset is less than the step threshold, which is 128 ms by default, and stepped if above the threshold. This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually. Note: Since the slew rate of typical Unix kernels is limited to 0.5 ms/s, each second of adjustment requires an amortization interval of 2000 s. Thus, an adjustment as much as 600 s will take almost 14 days to complete. This option can be used with the -g and -q options. See the tinker command for other options. Note: The kernel time discipline is disabled with this option and the step threshold is applied also to leap second corrections.
+ +

The Configuration File

+

Ordinarily, ntpd reads the ntp.conf configuration file at startup in order to determine the synchronization sources and operating modes. It is also possible to specify a working, although limited, configuration entirely on the command line, obviating the need for a configuration file. This may be particularly useful when the local host is to be configured as a broadcast client, with servers determined by listening to broadcasts at run time.

+diff -up ntp-4.2.6p5/ntpd/ntp_timer.c.xleap ntp-4.2.6p5/ntpd/ntp_timer.c +--- ntp-4.2.6p5/ntpd/ntp_timer.c.xleap 2015-04-21 18:16:08.255535621 +0200 ++++ ntp-4.2.6p5/ntpd/ntp_timer.c 2015-04-21 18:16:30.463601752 +0200 +@@ -449,8 +449,14 @@ timer(void) + sys_leap = LEAP_NOWARNING; + sys_tai = leap_tai; + #ifdef KERNEL_PLL +- if (!(pll_control && kern_enable)) +- step_systime(-1.0); ++ if (!pll_control || !kern_enable) { ++ if (clock_max < 1.0 && clock_max > 0.0) { ++ step_systime(-1.0); ++ msyslog(LOG_NOTICE, "Inserting positive leap second"); ++ } else { ++ msyslog(LOG_NOTICE, "Ignoring leap second"); ++ } ++ } + #else /* KERNEL_PLL */ + #ifndef SYS_WINNT /* WinNT port has its own leap second handling */ + step_systime(-1.0); diff --git a/SPECS/ntp.spec b/SPECS/ntp.spec index 34acd21..c3e236c 100644 --- a/SPECS/ntp.spec +++ b/SPECS/ntp.spec @@ -1,7 +1,7 @@ Summary: The NTP daemon and utilities Name: ntp Version: 4.2.6p5 -Release: 19%{?dist} +Release: 19%{?dist}.1 # primary license (COPYRIGHT) : MIT # ElectricFence/ (not used) : GPLv2 # kernel/sys/ppsclock.h (not used) : BSD with advertising @@ -97,6 +97,8 @@ Patch23: ntp-4.2.6p5-cve-2014-9293.patch Patch24: ntp-4.2.6p5-cve-2014-9295.patch # ntpbz #2670 Patch25: ntp-4.2.6p5-cve-2014-9296.patch +# ntpbz #2745 +Patch36: ntp-4.2.6p5-xleap.patch # handle unknown clock types Patch50: ntpstat-0.2-clksrc.patch @@ -177,7 +179,7 @@ This package contains NTP documentation in HTML format. # pool.ntp.org vendor zone which will be used in ntp.conf %if 0%{!?vendorzone:1} %{?fedora: %global vendorzone fedora.} -%{?rhel: %global vendorzone centos.} +%{?rhel: %global vendorzone rhel.} %endif %prep @@ -210,6 +212,7 @@ This package contains NTP documentation in HTML format. %patch23 -p1 -b .cve-2014-9293 %patch24 -p1 -b .cve-2014-9295 %patch25 -p1 -b .cve-2014-9296 +%patch36 -p1 -b .xleap # ntpstat patches %patch50 -p1 -b .clksrc @@ -421,8 +424,8 @@ popd %{ntpdocdir}/html %changelog -* Fri Dec 19 2014 CentOS Sources - 4.2.6p5-19.el7.centos -- rebrand vendorzone +* Thu Apr 23 2015 Miroslav Lichvar 4.2.6p5-19.el7_1.1 +- don't step clock for leap second with -x option (#1191122) * Fri Dec 19 2014 Miroslav Lichvar 4.2.6p5-19 - don't generate weak control key for resolver (CVE-2014-9293)