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. +
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