Hello community,

here is the log from the commit of package ntp.2917 for openSUSE:13.1:Update 
checked in at 2014-07-30 10:09:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:13.1:Update/ntp.2917 (Old)
 and      /work/SRC/openSUSE:13.1:Update/.ntp.2917.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ntp.2917"

Changes:
--------
New Changes file:

--- /dev/null   2014-07-24 01:57:42.080040256 +0200
+++ /work/SRC/openSUSE:13.1:Update/.ntp.2917.new/ntp.changes    2014-07-30 
10:09:07.000000000 +0200
@@ -0,0 +1,1481 @@
+-------------------------------------------------------------------
+Mon Jul 21 07:03:26 UTC 2014 - m...@suse.com
+
+- CVE-2013-5211, bnc#857195: restrict query, configuration,
+  modification access from world by default. Avoids that ntp can
+  be used as a DDoS amplifier.
+
+-------------------------------------------------------------------
+Tue Oct 22 14:49:25 UTC 2013 - vark...@suse.com
+
+- bnc#838458 ntp start script does not update /var/lib/ntp/etc/localtime file 
if /etc/localtime is symlink 
+
+-------------------------------------------------------------------
+Mon Aug 19 22:58:44 UTC 2013 - crrodrig...@opensuse.org
+
+- Build with -DOPENSSL_LOAD_CONF , ntp must respect and use 
+  the system's openssl configuration.
+
+-------------------------------------------------------------------
+Sat Mar  9 13:34:16 UTC 2013 - seife+...@b1-systems.com
+
+- fix build with automake-1.13
+
+-------------------------------------------------------------------
+Thu Feb 28 07:52:03 UTC 2013 - vark...@suse.com
+
+- bnc#797351 - ntpd "listen-on" directive support is missing/broken;
+  unable to restrict/secure listening IPs 
+
+-------------------------------------------------------------------
+Tue Feb 26 14:58:38 UTC 2013 - vark...@suse.com
+
+- bnc#793012 - NTP default to 'sync time on startup' conflicts with 
NetworkManager 
+
+-------------------------------------------------------------------
+Fri Feb 22 09:19:08 CET 2013 - mhruse...@suse.cz
+
+- disable Undisciplined Local Clock in default conf file (bnc#784760)
+
+-------------------------------------------------------------------
+Fri Jan 18 14:18:09 UTC 2013 - bwiedem...@suse.com
+
+- Speedup ntpq (bnc#782060)
+  +ntp-4.2.6p2-ntpq-speedup-782060.patch
+
+-------------------------------------------------------------------
+Thu Jan 17 17:37:35 UTC 2013 - vark...@suse.com
+
+- bnc#450196 - ext3 - recovering journal on / on first boot on new 
kernel/fresh system updates
+- bnc#774553 - ntp initscript: hwclock: With --noadjfile, you must specify 
either --utc or --localtime 
+
+-------------------------------------------------------------------
+Fri Dec 14 10:14:41 UTC 2012 - lnus...@suse.de
+
+- logrotate is not strictly required for operation of ntp so change
+  it to Suggested. That way the minimal installation doesn't draw in
+  cron and postfix.
+
+-------------------------------------------------------------------
+Thu Aug  2 13:17:57 UTC 2012 - rmila...@suse.com
+
+- Created the correct link to /run/ntp 
+
+-------------------------------------------------------------------
+Thu Jul 19 04:47:46 UTC 2012 - crrodrig...@opensuse.org
+
+-  Openssl wanted but not properly detected, fixed.
+
+-------------------------------------------------------------------
+Wed Jul  4 13:51:57 UTC 2012 - cfarr...@suse.com
+
+- license update: (MIT and BSD-3-Clause and BSD-4-Clause) and GPL-2.0
+  Properly categorise licenses and sync with Fedora declaration
+
+-------------------------------------------------------------------
+Mon Apr 23 11:02:06 UTC 2012 - vark...@suse.com
+
+- bnc#758253 - L3: ntp fails if host has more than 1024 IP-addresses
+  ntp#1180 - ntpd won't start with more than 1000 interfaces  
+
+-------------------------------------------------------------------
+Mon Jan  9 18:45:15 UTC 2012 - lmue...@suse.com
+
+- Remove superfluous remove of acconfig.h while build.
+- BuildRequire autoconf to avoid implicit dependency for post-11.4 systems.
+- Remove call to suse_update_config macro for post-11.4 systems.
+
+-------------------------------------------------------------------
+Mon Jan  9 18:38:10 UTC 2012 - lmue...@suse.com
+
+- BuildRequire fdupes for post-10.1 systems.
+- Do not call autoreconf for pre-10.2 systems.
+
+-------------------------------------------------------------------
+Mon Jan  9 18:11:27 UTC 2012 - lmue...@suse.de
+
+- Update to version 4.2.6p5.
+  - ntpd
+  * Updated "nic" and "interface" IPv6 address handling to prevent
+    mismatches with localhost [::1] and wildcard [::] which resulted from
+    using the address/prefix format (e.g. fe80::/64)
+  * Fix orphan mode stratum incorrectly counting to infinity
+  * Orphan parent selection metric updated to includes missing ntohl()
+  * Non-printable stratum 16 refid no longer sent to ntp
+  * Duplicate ephemeral associations suppressed for broadcastclient and
+    multicastclient without broadcastdelay
+  * Exclude undetermined sys_refid from use in loopback TEST12
+  * Exclude MODE_SERVER responses from KoD rate limiting
+  * Include root delay in clock_update() sys_rootdisp calculations
+  * get_systime() updated to exclude sys_residual offset (which only
+    affected bits "below" sys_tick, the precision threshold)
+  * sys.peer jitter weighting corrected in sys_jitter calculation
+  - ntpq
+  * -n option extended to include the billboard "server" column
+  * IPv6 addresses in the local column truncated to prevent overruns
+- Update to version 4.2.6p4.
+  - Build system
+  * Fix checking for struct rtattr
+  * Upgrade required version of autogen and libopts for building
+    from our source code repository
+  - ntpd
+  * Back-ported several fixes for Coverity warnings from ntp-dev
+  * Fix a rare boundary condition in UNLINK_EXPR_SLIST()
+  * Allow "logconfig =allall" configuration directive
+  * Bind tentative IPv6 addresses on Linux
+  * Correct WWVB/Spectracom driver to timestamp CR instead of LF
+  * Improved tally bit handling to prevent incorrect ntpq peer status reports
+  * Exclude the Undisciplined Local Clock and ACTS drivers from the initial
+    candidate list unless they are designated a "prefer peer"
+  * Prevent the consideration of Undisciplined Local Clock or ACTS drivers for
+    selection during the 'tos orphanwait' period·
+  * Prefer an Orphan Mode Parent over the Undisciplined Local Clock or ACTS
+    drivers
+  * Improved support of the Parse Refclock trusttime flag in Meinberg mode
+  * Back-port utility routines from ntp-dev: mprintf(), emalloc_zero()
+  * Code cleanup in libntpq
+  - ntpdc
+  * Fix timerstats reporting
+  - ntpdate
+  * Reduce time required to set clock
+  * Allow a timeout greater than 2 seconds
+  - sntp
+  * Backward incompatible command-line option change:
+    -l/--filelog changed -l/--logfile (to be consistent with ntpd)
+  - Documentation
+  * Update html2man. Fix some tags in the .html files
+  * Distribute ntp-wait.html
+
+-------------------------------------------------------------------
+Mon Jan  9 17:35:16 UTC 2012 - lmue...@suse.de
+
+- Remove superfluously used NTPD_PID_NOPREFIX from init script.
+- Refresh patches to apply with no offset.
+
+-------------------------------------------------------------------
+Thu Nov 24 14:56:45 UTC 2011 - vark...@suse.com
+
+- bnc#730374 - Hardware Clock does not get synchronized
+
+-------------------------------------------------------------------
+Wed Nov 23 09:29:50 UTC 2011 - co...@suse.com
+
+- add libtool as buildrequire to avoid implicit dependency
+
+-------------------------------------------------------------------
+Thu Oct 27 08:52:39 UTC 2011 - vark...@suse.com
+
+- bnc#656509 - don't use --bind on /var/lib/ntp/proc 
+
+-------------------------------------------------------------------
+Fri Aug 26 08:11:33 UTC 2011 - vark...@suse.com
+
+- bnc#699724 - ntpdate was replaced with a dud script
+
+-------------------------------------------------------------------
+Wed Jun  1 09:07:48 UTC 2011 - vark...@suse.de
+
+- The default timeout for sntp is to long. This can stop booting 
+- bnc#689070 - ntp post install script always removes /etc/sysconfig/ntp
+- bnc#688529 - (ntp) ntpq and ntpdc command history broken
+- bnc#695598 - "Started sntp" in /var/log/messages
+
+-------------------------------------------------------------------
+Sun May  1 23:15:01 CEST 2011 - h...@urpla.net
+
+- fix "rcntp ntptimeset"
+   * never try to syncronize with local clocks (127.127.*), which led to 
+     sntp blocking until timeout elapsed (and probably blocking boot 
+     sequence for ~5 min per device..)
+- fix DOS line breaks in some doc files
+
+-------------------------------------------------------------------
+Tue Apr 26 06:56:05 UTC 2011 - vark...@novell.com
+
+- fix/improve init script
+   * related to bugzilla 688132
+   * "rcntp ntptimeset" could not parse servers from ntp.conf when IP proto
++++ 1284 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:13.1:Update/.ntp.2917.new/ntp.changes

New:
----
  MOD_NANO.diff
  NTP-FAQ-3.4.tar.bz2
  README.SUSE
  bnc#506908.diff
  bnc#574885.diff
  conf.logrotate.ntp
  conf.ntp.conf
  conf.ntp.init
  conf.ntp.reg
  conf.sysconfig.ntp
  conf.sysconfig.syslog-ntp
  ntp-4.2.6p2-ntpq-speedup-782060.patch
  ntp-4.2.6p2-seed_file.patch
  ntp-4.2.6p5.tar.bz2
  ntp-4.2.7-rh-manpages.tar.gz
  ntp-code-cleanup.patch
  ntp-segfault_on_invalid_device.patch
  ntp-strcat.patch
  ntp-wait
  ntp.1.gz
  ntp.changes
  ntp.firewall
  ntp.spec
  ntp.xml
  ntpd-maxmonmen.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ntp.spec ++++++
#
# spec file for package ntp
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           ntp
%if 0%{?suse_version} > 1010
BuildRequires:  autoconf
BuildRequires:  fdupes
%endif
BuildRequires:  libcap-devel
BuildRequires:  libtool
BuildRequires:  openssl-devel
BuildRequires:  readline-devel
# to allow the postinst script to succeed
BuildRequires:  pwdutils
%define ntpfaqversion 3.4
Url:            http://www.ntp.org/
Version:        4.2.6p5
Release:        0
Summary:        Network Time Protocol daemon (version 4)
License:        (MIT and BSD-3-Clause and BSD-4-Clause) and GPL-2.0
Group:          Productivity/Networking/Other
# main source
Source0:        
http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-%{version}.tar.bz2
# configuration
Source1:        conf.logrotate.ntp
Source2:        conf.ntp.conf
Source3:        conf.ntp.init
Source4:        conf.sysconfig.ntp
Source5:        conf.sysconfig.syslog-ntp
Source6:        conf.ntp.reg
Source7:        %name.firewall
# documentation
Source10:       NTP-FAQ-%{ntpfaqversion}.tar.bz2
Source11:       ntp.1.gz
Source12:       README.SUSE
Source13:       ntp-4.2.7-rh-manpages.tar.gz
Source14:       ntp.xml
Source16:       ntp-wait
Patch1:         ntp-segfault_on_invalid_device.patch
Patch4:         ntpd-maxmonmen.patch
Patch10:        ntp-strcat.patch
Patch11:        ntp-4.2.6p2-seed_file.patch
Patch13:        ntp-code-cleanup.patch 
Patch15:        bnc#506908.diff
Patch16:        MOD_NANO.diff
Patch18:        bnc#574885.diff
Patch19:        ntp-4.2.6p2-ntpq-speedup-782060.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Provides:       ntp-daemon
Provides:       xntp <= 4.2.4p6
Provides:       xntp3
Obsoletes:      xntp <= 4.2.4p5
Obsoletes:      xntp3
Conflicts:      openntpd
PreReq:         pwdutils %insserv_prereq  %fillup_prereq /usr/bin/diff 
/usr/bin/grep /sbin/chkconfig
Suggests:       logrotate
Requires:       timezone

%description
The Network Time Protocol (NTP) is used to synchronize the time of a
computer client or server to another server or reference time source,
such as a radio, satellite receiver, or modem.

Ntpd is an operating system daemon that sets and maintains the system
time-of-day synchronized with Internet standard time servers.



Authors:
--------
    Mark Andrews <ma...@syd.dms.csiro.au>
    Viraj Bais <vb...@mailman1.intel.com>
    Clayton Kirkwood <kirkw...@striderfm.intel.com>
    Karl Berry <k...@owl.hq.ileaf.com>
    Piete Brooks <piete.bro...@cl.cam.ac.uk>
    Steve Clift <cl...@ml.csiro.au>
    Casey Crellin <ca...@csc.co.za>
    Torsten Duwe <d...@immd4.informatik.uni-erlangen.de>
    John A. Dundas III <dun...@salt.jpl.nasa.gov>
    Dennis Ferguson <den...@mrbill.canet.ca>
    Glenn Hollinger <gl...@herald.usask.ca>
    Mike Iglesias <igles...@uci.edu>
    Jim Jagielski <j...@jagubox.gsfc.nasa.gov>
    Jeff Johnson <j...@chatham.usdesign.com>
    William L. Jones <jo...@hermes.chpc.utexas.edu>
    Dave Katz <dk...@cisco.com>
    Craig Leres <le...@ee.lbl.gov>
    George Lindholm <lindh...@ucs.ubc.ca>
    Louis A. Mamakos <lo...@ni.umd.edu>
    Derek Mulcahy <de...@toybox.demon.co.uk>
    Damon Hart-Davis <d...@hd.org>
    Lars H. Mathiesen <thor...@diku.dk>
    David L. Mills <mi...@udel.edu>
    Wolfgang Moeller <moel...@gwdgv1.dnet.gwdg.de>
    Jeffrey Mogul <mo...@pa.dec.com>
    Tom Moore <tmo...@fievel.daytonoh.ncr.com>
    Rainer Pruy <rainer.p...@informatik.uni-erlangen.de>
    Dirce Richards <di...@zk3.dec.com>
    Nick Sayer <mrap...@quack.kfu.com>
    Frank Kardel <frank.kar...@informatik.uni-erlangen.de>
    Ray Schnitzler <schn...@unipress.com>
    Michael Shields <shie...@tembel.org>
    Jeff Steinman <j...@pebbles.jpl.nasa.gov>
    Harlan Stenn <har...@pfcs.com>
    Kenneth Stone <k...@sdd.hp.com>
    Ajit Thyagarajan <a...@ee.udel.edu>
    Tomoaki TSURUOKA <tsuru...@nc.fukuoka-u.ac.jp>
    Paul A Vixie <vi...@vix.com>
    Ulrich Windl <ulrich.wi...@rz.uni-regensburg.de>

%package doc
Provides:       ntpdoc
Provides:       xntp-doc = 4.2.4
Provides:       xntpdoc
Obsoletes:      ntpdoc
Obsoletes:      xntp-doc <= 4.2.4
Obsoletes:      xntpdoc
Summary:        Additional Package Documentation for ntp
Group:          Documentation/Other

%description doc
The complete set of documentation for building and configuring an NTP
server or client. The documentation is in the form of HTML files
suitable for browsing and contains links to additional documentation at
various web sites.

What about NTP? Understanding and using the Network Time Protocol (A
first try on a non-technical Mini-HOWTO and FAQ on NTP). Edited by
Ulrich Windl and David Dalton.



Authors:
--------
    Mark Andrews <ma...@syd.dms.csiro.au>
    Viraj Bais <vb...@mailman1.intel.com>
    Clayton Kirkwood <kirkw...@striderfm.intel.com>
    Karl Berry <k...@owl.hq.ileaf.com>
    Piete Brooks <piete.bro...@cl.cam.ac.uk>
    Steve Clift <cl...@ml.csiro.au>
    Casey Crellin <ca...@csc.co.za>
    Torsten Duwe <d...@immd4.informatik.uni-erlangen.de>
    John A. Dundas III <dun...@salt.jpl.nasa.gov>
    Dennis Ferguson <den...@mrbill.canet.ca>
    Glenn Hollinger <gl...@herald.usask.ca>
    Mike Iglesias <igles...@uci.edu>
    Jim Jagielski <j...@jagubox.gsfc.nasa.gov>
    Jeff Johnson <j...@chatham.usdesign.com>
    William L. Jones <jo...@hermes.chpc.utexas.edu>
    Dave Katz <dk...@cisco.com>
    Craig Leres <le...@ee.lbl.gov>
    George Lindholm <lindh...@ucs.ubc.ca>
    Louis A. Mamakos <lo...@ni.umd.edu>
    Derek Mulcahy <de...@toybox.demon.co.uk>
    Damon Hart-Davis <d...@hd.org>
    Lars H. Mathiesen <thor...@diku.dk>
    David L. Mills <mi...@udel.edu>
    Wolfgang Moeller <moel...@gwdgv1.dnet.gwdg.de>
    Jeffrey Mogul <mo...@pa.dec.com>
    Tom Moore <tmo...@fievel.daytonoh.ncr.com>
    Rainer Pruy <rainer.p...@informatik.uni-erlangen.de>
    Dirce Richards <di...@zk3.dec.com>
    Nick Sayer <mrap...@quack.kfu.com>
    Frank Kardel <frank.kar...@informatik.uni-erlangen.de>
    Ray Schnitzler <schn...@unipress.com>
    Michael Shields <shie...@tembel.org>
    Jeff Steinman <j...@pebbles.jpl.nasa.gov>
    Harlan Stenn <har...@pfcs.com>
    Kenneth Stone <k...@sdd.hp.com>
    Ajit Thyagarajan <a...@ee.udel.edu>
    Tomoaki TSURUOKA <tsuru...@nc.fukuoka-u.ac.jp>
    Paul A Vixie <vi...@vix.com>
    Ulrich Windl <ulrich.wi...@rz.uni-regensburg.de>

%prep
%setup -q -n ntp-%{version}
# unpack ntp-faq
tar -x -C html -j -f %{S:10}
%patch1
%patch4 -p1
# copy README.SUSE
cp %{S:12} .
tar xzf %{S:13}
%patch10 -p1
%patch11
%patch13
%patch15
%patch16
%patch18
%patch19

# fix DOS line breaks
sed -i 's/\r//g' html/scripts/{footer.txt,style.css}
# new automake 1.13 has removed old macro
sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac

%build
%if 0%{?suse_version} && 0%{?suse_version} < 1141
%{?suse_update_config}
%endif
%if 0%{?suse_version} > 1010
autoreconf -fi
%endif
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -W -DOPENSSL_LOAD_CONF -Wall 
-Wstrict-prototypes -Wpointer-arith -Wno-unused-parameter -fno-strict-aliasing 
-fstack-protector"
%ifarch alpha s390x
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -O0"
%endif
%ifarch ia64
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -ffast-math"
%endif
CFLAGS="$RPM_OPT_FLAGS -fPIE" LDFLAGS="-pie" ./configure \
        --with-binsubdir=bin \
        --bindir=%{_sbindir} \
        --mandir=%{_mandir} \
        --infodir=%{_infodir} \
        --enable-parse-clocks \
        --enable-all-clocks \
        --enable-linuxcaps \
        --enable-ipv6 \
        --with-sntp \
        --enable-ntp-signd \
        --disable-listen-read-drop \
        --with-lineeditlibs=readline \
    --with-crypto=openssl \
    --with-openssl-libdir=%{_libdir} \
    --with-openssl-incdir=%{_includedir}

make %{?_smp_mflags}

%install
%makeinstall
# Change permissions
chmod 644 html/pic/neoclock4x.gif
%if 0%{?suse_version} > 1010
%fdupes -s html
%endif
#
# default configuration
#
%__install -d %{buildroot}/var/lib/ntp/{drift,etc,var/{lib,run/ntp},dev}
%__install -d %{buildroot}/var/run
ln -s ../.. %{buildroot}/var/lib/ntp/var/lib/ntp
ln -s ../lib/ntp/var/run/ntp %{buildroot}/var/run
%__install -m 644 -D %{S:1} %{buildroot}/etc/logrotate.d/ntp
%__install -m 600 -D %{S:2} %{buildroot}/etc/ntp.conf
%__install -m 600 -D %{S:2} %{buildroot}/var/lib/ntp/etc/ntp.conf.iburst
#
# boot scripts
#
%__install -D %{S:3} %{buildroot}/etc/init.d/ntp
%__install -d %{buildroot}/usr/sbin
ln -s ../../etc/init.d/ntp %{buildroot}/usr/sbin/rcntp
#
# fillup sysconfig.ntp
#
%__install -m 644 -D %{S:4} %{buildroot}/var/adm/fillup-templates/sysconfig.ntp
%__install -m 644 -D %{S:5} 
%{buildroot}/var/adm/fillup-templates/sysconfig.syslog-ntp
#
# install SLP reg file
#
%__install -m 644 -D %{S:6} %{buildroot}/etc/slp.reg.d/ntp.reg
#
# man pages
#
%__install -d %{buildroot}/%{_mandir}/{man5,man8}
%__install -m 644 man/man5/* %{buildroot}/%{_mandir}/man5
%__install -m 644 man/man8/* %{buildroot}/%{_mandir}/man8
#
# firewall
#
%__install -d %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/
%__install -m 644 %{S:7} 
%{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
#
# Logfile
#
%__install -d %{buildroot}/var/log/
touch %{buildroot}/var/log/ntp
#
# service xml
#
install -d %{buildroot}/usr/share/omc/svcinfo.d/
install -m 644 %{S:14} %{buildroot}/usr/share/omc/svcinfo.d/
install -m 755 %{S:16} %{buildroot}/usr/sbin/

%clean
%__rm -rf %{buildroot}

%pre
/usr/sbin/groupadd -r ntp 2> /dev/null || :
/usr/sbin/useradd -r -o -g ntp -u 74 -s /bin/false -c "NTP daemon" -d 
/var/lib/ntp ntp 2> /dev/null || :
/usr/sbin/usermod -g ntp ntp 2>/dev/null || :
test -L /var/run/ntp  || rm -rf /var/run/ntp && :

%preun
%stop_on_removal ntp
# no update? Then remove these files that aren't owned by the package
if [ ${FIRST_ARG:-0} -eq 0 ]; then
     test -e /var/lib/ntp/drift/ntp.drift  && rm -f /var/lib/ntp/drift/ntp.drift
     rm -f /var/lib/ntp/etc/* 2>/dev/null
     test -e /var/log/ntp  && rm -f /var/log/ntp
fi

%post
# Create ntp.keys file
if [ ! -f /etc/ntp.keys ]; then
  tmp=$(dd if=/dev/urandom count=1 2>/dev/null | md5sum)
  tmp=${tmp:0:7} > /etc/ntp.keys
  echo "1 M $tmp" > /etc/ntp.keys
  chown root:ntp /etc/ntp.keys
  chmod 0640 /etc/ntp.keys
fi
# Are we in update mode?
if [ -f /etc/sysconfig/ntp ]; then
        grep -q '^keys /etc/ntp.keys' /etc/ntp.conf || {
        echo "#
# Authentication stuff
#
keys /etc/ntp.keys              # path for keys file
trustedkey 1                    # define trusted keys
requestkey 1                    # key (7) for accessing server variables
# controlkey 15                 # key (6) for accessing server variables
" >> /etc/ntp.conf
}
fi
# update from previous permissions
if [ -f /etc/ntp.conf ]; then
  chown root:ntp /etc/ntp.conf
fi
if [ -f /etc/ntp.keys ]; then
  chown root:ntp /etc/ntp.keys
fi
if [ -f /var/lib/ntp/etc/ntp.conf.iburst ]; then
  chown --from=ntp:root root:ntp /var/lib/ntp/etc/ntp.conf.iburst
fi
if /sbin/chkconfig -c ntpd 3 ; then
        %{insserv_force_if_yast ntp}
fi
%{fillup_only -n ntp }
%{fillup_only -n syslog }
if [ ! -f /var/log/ntp ]; then
        touch /var/log/ntp
        chmod 644 /var/log/ntp
fi

%postun
%restart_on_update ntp
%{insserv_cleanup}

%files
%defattr(-,root,root)
%doc COPYRIGHT ChangeLog NEWS README* TODO WHERE-TO-START conf 
%attr(0640,root,ntp) %config(noreplace) %{_sysconfdir}/ntp.conf
%dir %{_sysconfdir}/slp.reg.d
%{_sysconfdir}/init.d/ntp
%config(noreplace) %{_sysconfdir}/slp.reg.d/ntp.reg
%config %{_sysconfdir}/logrotate.d/ntp
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ntp
%{_sbindir}/*
/var/lib/ntp
%attr(0640,root,ntp) %config(noreplace) /var/lib/ntp/etc/ntp.conf.iburst
%attr(0755,ntp,ntp) %dir /var/lib/ntp/drift
%{_mandir}/man1/*
%{_mandir}/man5/*
%{_mandir}/man8/*
/var/adm/fillup-templates/*
%attr(0755,ntp,root) /var/lib/ntp/var/run/ntp
%ghost /var/run/ntp
%ghost %config(noreplace) /var/log/ntp
/usr/share/omc/svcinfo.d/ntp.xml

%files doc
%defattr(-,root,root)
%doc    html/*

%changelog
++++++ MOD_NANO.diff ++++++
Index: include/ntp_syscall.h
===================================================================
--- include/ntp_syscall.h.orig
+++ include/ntp_syscall.h
@@ -14,6 +14,14 @@
 # include <sys/timex.h>
 #endif
 
+#if defined(ADJ_NANO) && !defined(MOD_NANO)
+#define MOD_NANO ADJ_NANO
+#endif
+
+#if defined(ADJ_TAI) && !defined(MOD_TAI)
+#define MOD_TAI ADJ_TAI
+#endif
+
 #ifndef NTP_SYSCALLS_LIBC
 #ifdef NTP_SYSCALLS_STD
 # define ntp_adjtime(t)                syscall(SYS_ntp_adjtime, (t))
++++++ README.SUSE ++++++
###################################################################
- More documentation is available in the package `ntp-doc':

ntp-doc contains a complete set of documentation on building and
configuring a NTP server or client. The documentation is in the
form of HTML files suitable for browsing and contains links to
additional documentation at various web sites. If a browser is
unavailable, an ordinary text editor may also be used to view it.

###################################################################
++++++ bnc#506908.diff ++++++
Index: scripts/ntptrace.in
===================================================================
--- scripts/ntptrace.in.orig
+++ scripts/ntptrace.in
@@ -6,7 +6,7 @@ use Socket;
 use Getopt::Std;
 use vars qw($opt_n $opt_m);
 
-$ntpq = "ntpq";
+$ntpq = "/usr/sbin/ntpq";
 
 $Getopt::Std::STANDARD_HELP_VERSION=1;
 getopts('nm:');
++++++ bnc#574885.diff ++++++
Index: lib/isc/unix/interfaceiter.c
===================================================================
--- lib/isc/unix/interfaceiter.c.orig
+++ lib/isc/unix/interfaceiter.c
@@ -147,7 +147,7 @@ get_addr(unsigned int family, isc_netadd
 
 #ifdef __linux
 #define ISC_IF_INET6_SZ \
-    sizeof("00000000000000000000000000000001 01 80 10 80 XXXXXXloXXXXXXXX\n")
+    sizeof("00000000000000000000000000000001 00001 80 10 80 
XXXXXXloXXXXXXXX\n")
 static isc_result_t linux_if_inet6_next(isc_interfaceiter_t *);
 static isc_result_t linux_if_inet6_current(isc_interfaceiter_t *);
 static void linux_if_inet6_first(isc_interfaceiter_t *iter);
++++++ conf.logrotate.ntp ++++++
/var/log/ntp {
    compress
    dateext
    maxage 365
    rotate 99
    size=+2048k
    notifempty
    missingok
    copytruncate
    postrotate
        chmod 644 /var/log/ntp
    endscript
}

++++++ conf.ntp.conf ++++++
################################################################################
## /etc/ntp.conf
##
## Sample NTP configuration file.
## See package 'ntp-doc' for documentation, Mini-HOWTO and FAQ.
## Copyright (c) 1998 S.u.S.E. GmbH Fuerth, Germany.
##
## Author: Michael Andres,  <m...@suse.de>
##         Michael Skibbe,  <mski...@suse.de>
##
################################################################################

##
## Radio and modem clocks by convention have addresses in the 
## form 127.127.t.u, where t is the clock type and u is a unit 
## number in the range 0-3. 
##
## Most of these clocks require support in the form of a 
## serial port or special bus peripheral. The particular  
## device is normally specified by adding a soft link 
## /dev/device-u to the particular hardware device involved, 
## where u correspond to the unit number above. 
## 
## Generic DCF77 clock on serial port (Conrad DCF77)
## Address:     127.127.8.u
## Serial Port: /dev/refclock-u
##  
## (create soft link /dev/refclock-0 to the particular ttyS?)
##
# server 127.127.8.0 mode 5 prefer

##
## Undisciplined Local Clock. This is a fake driver intended for backup
## and when no outside source of synchronized time is available.
##
# server 127.127.1.0            # local clock (LCL)
# fudge  127.127.1.0 stratum 10 # LCL is unsynchronized

##
## Add external Servers using
## # rcntp addserver <yourserver>
## 

# Access control configuration; see 
/usr/share/doc/packages/ntp/html/accopt.html for
# details.  The web page 
<http://support.ntp.org/bin/view/Support/AccessRestrictions>
# might also be helpful.
#
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.

# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery

# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1

# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust

##
## Miscellaneous stuff
##

driftfile /var/lib/ntp/drift/ntp.drift # path for drift file

logfile   /var/log/ntp          # alternate log file
# logconfig =syncstatus + sysevents
# logconfig =all

# statsdir /tmp/                # directory for statistics files
# filegen peerstats  file peerstats  type day enable
# filegen loopstats  file loopstats  type day enable
# filegen clockstats file clockstats type day enable

#
# Authentication stuff
#
keys /etc/ntp.keys              # path for keys file
trustedkey 1                    # define trusted keys
requestkey 1                    # key (7) for accessing server variables
# controlkey 15                 # key (6) for accessing server variables

++++++ conf.ntp.init ++++++
#! /bin/sh
# Copyright (c) 1995-2003 SuSE Linux AG, Nuernberg, Germany.
# All rights reserved.
#
# Author: Michael Andres
# Author: Michael Skibbe
# Author: Andreas Schneider
#
# /etc/init.d/ntp
#   and its symbolic link
# /usr/sbin/rcntp
#
### BEGIN INIT INFO
# Provides:       ntp ntpd xntpd
# Required-Start: $network $remote_fs $syslog $named
# Required-Stop:  $network $remote_fs $syslog
# Should-Start: network-remotefs
# Should-Stop: network-remotefs
# Default-Start:  3 5
# Default-Stop:   0 1 2 6
# Short-Description: Network time protocol daemon (ntpd)
# Description:    Start network time protocol daemon (NTPD).
### END INIT INFO

# First reset status of this service
. /etc/rc.status
rc_reset

# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - insufficient privilege
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running

# set default options
NTP_CONF="/etc/ntp.conf"
if [ ! -f ${NTP_CONF} ]; then
  echo -n "Time server configuration file, ${NTP_CONF} does not exist."
  # Tell the user this has skipped
  rc_status -s
  exit 6
fi

NTPD_BIN="/usr/sbin/ntpd"
if [ ! -x ${NTPD_BIN} ]; then
  echo -n "Time server, ${NTPD_BIN} not installed!"
  rc_status -s
  exit 5
fi

NTPD_OPTIONS="-g -u ntp:ntp"
NTPD_RUN_CHROOTED="yes"

NTPDC_BIN="/usr/sbin/ntpdc"

NTP_KEYS=$(awk '/^keys/ { print $2 }' $NTP_CONF)
NTP_KEYID=$(awk '/^requestkey[[:blank:]]/ { print $2 }' $NTP_CONF)
NTP_PASSWD=$(test -n "$NTP_KEYS" -a -n "$NTP_KEYID" -a -r "$NTP_KEYS" && awk 
'$0 ~ key { print $3 }' key="^[[:blank:]]*$NTP_KEYID[[:blank:]]" $NTP_KEYS)

if [ -n "$NTP_KEYS" ]; then
  if test -z "$NTP_KEYID"; then
    echo -n "NTP key id not defined"
      rc_status -s
      exit 5
  fi
  if test -z "$NTP_PASSWD"; then
    echo -n "No password for requestkey set"
    exit 1
  fi
fi

# Override defaults, if we have the sysconfig file
test -f /etc/sysconfig/ntp && . /etc/sysconfig/ntp

function update_cmos() { return 0; }
# Now see if we have to fix the CMOS clock
if [ "$NTPD_FORCE_SYNC_ON_STARTUP" = yes -a "$1" = ntptimeset ] ; then
  test -f /etc/sysconfig/clock && . /etc/sysconfig/clock
  if test -r /proc/xen/capabilities ; then
    read -t1 caps < /proc/xen/capabilities
    test "$caps" = "${caps%control_d*}" && NTPD_FORCE_SYNC_HWCLOCK_ON_STARTUP=no
  fi
  case "$(uname -i)" in
  s390*) NTPD_FORCE_SYNC_HWCLOCK_ON_STARTUP=no
  esac
  if [ "$NTPD_FORCE_SYNC_HWCLOCK_ON_STARTUP" = yes ] ; then
    function update_cmos() {
      if test -e /dev/rtc ; then
        /sbin/hwclock --systohc $HWCLOCK
        return $?
      fi
      if test -z "$(/sbin/modprobe -l rtc_cmos)" ; then
        /sbin/hwclock --systohc $HWCLOCK
        return $?
      fi
      local temprules=/dev/.udev/rules.d
      local uevseqnum=/sys/kernel/uevent_seqnum
      local rule=$temprules/95-rtc-cmos.rules
      local -i start=0 end=0
      /bin/mkdir -m 0755 -p $temprules
      echo ACTION==\"add\", KERNEL==\"rtc0\", RUN=\"/sbin/hwclock --systohc 
$HWCLOCK --rtc=\$env{DEVNAME}\" > $rule
      test -e $uevseqnum && read -t 1 start < $uevseqnum
      if /sbin/modprobe -q rtc_cmos ; then
        test -e $uevseqnum && read -t 1 end < $uevseqnum
        if test $start -lt $end ; then
          /sbin/udevadm settle --quiet --seq-start=$start --seq-end=$end
        else
          /sbin/udevadm settle --quiet
        fi
      else
        rm -f $rule
        /sbin/hwclock --systohc $HWCLOCK
      fi
    }
  fi
fi

# set Default CHROOT path if not set but wanted
test "${NTPD_RUN_CHROOTED}" = "yes" && \
  CHROOT_PREFIX="/var/lib/ntp" || \
  CHROOT_PREFIX=""

# set default PID variables
NTPD_PID="${CHROOT_PREFIX}/var/run/ntp/ntpd.pid"

# Create if /var/run is on tmpfs
test -e /var/run/ntp || ln -s /var/lib/ntp/var/run/ntp /var/run

function ntpd_is_running() {
  $0 status >/dev/null
}

function parse_symlink() {
  if [ -c "$NTP_PARSE_DEVICE" ]; then
    if [ -n "$NTP_PARSE_LINK" ]; then
    ln -sf $NTP_PARSE_DEVICE $NTP_PARSE_LINK
    fi
  fi
}

function prepare_chroot() {
  for configfile in /etc/{localtime,ntp.keys} $NTP_CONF $NTPD_CHROOT_FILES; do
    test -d ${CHROOT_PREFIX}${configfile%/*} || mkdir -p 
${CHROOT_PREFIX}${configfile%/*}
    if [ -r ${configfile} ]
    then
        cp -aL ${configfile} ${CHROOT_PREFIX}${configfile%/*}
    else
        echo
        echo "Warning: ${configfile} not found or not readable"
    fi
  done
  mkdir -p ${CHROOT_PREFIX}/var/log
  mkdir -p ${CHROOT_PREFIX}/proc
  mount -t proc none -o ro,nosuid,nodev "${CHROOT_PREFIX}/proc" 2>/dev/null
  NTPD_OPTIONS="${NTPD_OPTIONS} -i ${CHROOT_PREFIX}"
}

function runtime_configuration() {
  for f in /var/run/ntp/servers*; do
    if [ -r ${f} ]; then
      . ${f}
      ntp_server="${ntp_server} ${RUNTIME_SERVERS}"
    fi
  done
  if [ -n "${ntp_server}" ]; then
    for s in ${ntp_server}; do
      add_runtime_server ${s}
    done
  fi
}

function add_runtime_server() {
  /usr/sbin/sntp -s $@
  NTPC_CMD="keyid $NTP_KEYID\npasswd $NTP_PASSWD\naddserver $@\n"
  NTPDC_LOG=$(echo -e "${NTPC_CMD}quit" | $NTPDC_BIN)
  logger -t $0 "runtime configuration: $NTPDC_LOG"
}

function reloaddevices {
  NTPC_CMD="keyid $NTP_KEYID\npasswd $NTP_PASSWD\nifreload\n"
  NTPDC_LOG=$(echo -e "${NTPC_CMD}quit" | $NTPDC_BIN)
  logger -t $0 "runtime configuration: $NTPDC_LOG"
}

function get_ntpd_ip_proto() {
  local -a OPTS
  read -ra OPTS <<< "$NTPD_OPTIONS"
  for i in "${OPTS[@]}"; do
    if [ "$i" = "-4" ] || [ "$i" = "-6" ]; then
      # first occurrence wins safely because ntpd couldn't handle more anyway
      echo "$i"
      return
    fi
  done
  echo ""
  return
}

case "$1" in
  start)
    if [ "$NTPD_FORCE_SYNC_ON_STARTUP" = "yes" ]; then
        # get the initial date from the timeservers configured in ntp.conf
        ntpd_is_running || $0 ntptimeset
    fi
    echo -n "Starting network time protocol daemon (NTPD)"
    # do we need a refclock symlink?
    parse_symlink
    # do we run chrooted?
    test "${NTPD_RUN_CHROOTED}" = "yes" && prepare_chroot

    startproc $NTPD_BIN -p ${NTPD_PID#${CHROOT_PREFIX}} $NTPD_OPTIONS -c 
$NTP_CONF

    if [ -n "${NTP_KEYS}" ]; then
      runtime_configuration
    fi

    rc_status -v
  ;;
  stop)
    echo -n "Shutting down network time protocol daemon (NTPD)"
    killproc -p ${NTPD_PID} -TERM $NTPD_BIN
    rc_status -v
    test -n "${CHROOT_PREFIX}" && umount ${CHROOT_PREFIX}/proc 2>/dev/null
    rm -f ${NTPD_PID} 2>/dev/null
  ;;
  try-restart)
    $0 status
    if test $? = 0; then
      $0 restart $2
    else
      rc_reset        # Not running is not a failure.
    fi
    # Remember status and be quiet
    rc_status
  ;;
  restart)
    $0 stop
    $0 start $2
    rc_status
  ;;
  try-restart-iburst)
    $0 status
    if test $? = 0; then
      $0 stop
      $0 start iburst
    else
      rc_reset        # Not running is not a failure.
    fi
    # Remember status and be quiet
    rc_status
  ;;
  addserver)
    if [ -z "${NTP_KEYS}" ]; then
      echo "Runtime configuration disabled, no key file specified."
      exit 1
    fi

    if test $# -lt 2; then
      echo "No servers to add specified"
      exit 1
    fi
    shift

    $0 status 2>&1 >/dev/null
    if test $? = 0;
    then
      add_runtime_server "$@"
    fi
  ;;
  force-reload)
    # Does not support signalling to reload
    $0 try-restart
    rc_status
  ;;
  ntptimeset)
    NTPD_PROTO="$( get_ntpd_ip_proto )"
    for i in $(gawk '/^server/ { if( $2 !~ "^127.127." ) print $2","$3 }' 
$NTP_CONF)
    do 
        IFS=',' read -ra SERVER <<< "$i"
        if [ ${SERVER[0]} = "-4" ] || [ ${SERVER[0]} = "-6" ]
        then
            if [ -z "${NTPD_PROTO}" ] || [ "${NTPD_PROTO}" = "${SERVER[0]}" ]
            then
                SNTP_OPT="${SERVER[0]} ${SERVER[1]}"
            else
                # ignore servers with conflicting proto
                continue
            fi
        else
            # here the usual case with empty NTPD_PROTO (default/yast config)
            SNTP_OPT="$NTPD_PROTO ${SERVER[0]}"
        fi
        sntp -t 2 -l /dev/null -s $SNTP_OPT 2> /dev/null && { 
SYNCHRONISED=$SNTP_OPT; break; };
    done
    if [ "$SYNCHRONISED" ]
    then
            echo "Time synchronized with $SYNCHRONISED"
            update_cmos
    else
            echo "Time could not be synchronized"
    fi
  ;;
  reload)
    echo -n "Reload network time protocol daemon (NTPD)"
    # Does not support signalling to reload
    rc_failed 3
    rc_status -v
  ;;
  status)
    checkproc -p ${NTPD_PID} $NTPD_BIN
    if test $? -eq 0; then
      ntpq -p
      echo ""
    fi
    echo -n "Checking for network time protocol daemon (NTPD): "
    checkproc -p ${NTPD_PID} $NTPD_BIN
    rc_status -v
  ;;
  *)
    echo "Usage: $0 
{start|stop|status|try-restart|restart|try-restart-iburst|force-reload|reload|addserver|ntptimeset}"
    exit 1
  ;;
esac
rc_exit
++++++ conf.ntp.reg ++++++
#############################################################################
#
# OpenSLP registration file
#
# register NTP daemon
#
#############################################################################

service:ntp://$HOSTNAME:123,en,65535
watch-port-udp=123
description=Network Time Protocol [ntp]

++++++ conf.sysconfig.ntp ++++++
## Path:           Network/NTP
## Description:    Network Time Protocol (NTP) server settings
## Type:           string
## Default:        "-g -u ntp:ntp"
#
# Additional arguments when starting ntpd. The most
# important ones would be
# -u user[:group]   to make ntpd run as a user (group) other than root.
#
NTPD_OPTIONS="-g -u ntp:ntp"

## Type:           yesno
## Default:        yes
## ServiceRestart: ntp
#
# Shall the time server ntpd run in the chroot jail /var/lib/ntp?
#
# Each time you start ntpd with the init script, /etc/ntp.conf will be
# copied to /var/lib/ntp/etc/.
# 
# The pid file will be in /var/lib/ntp/var/run/ntpd.pid. 
#
NTPD_RUN_CHROOTED="yes"

## Type:           string
## Default:        ""
## ServiceRestart: ntp
#
# If the time server ntpd runs in the chroot jail these files will be
# copied to /var/lib/ntp/ besides the default of /etc/{localtime,ntp.conf}
#
NTPD_CHROOT_FILES=""

## Type:           
string(/dev/refclock-0,/dev/refclock-1,/dev/refclock-2,/dev/refclock-3)
## Default:        ""
## ServiceRestart: ntp
#
# Parse driver symlink
# For more information see the ntp documentation in the package ntp-doc
# /usr/share/doc/packages/ntp-doc/drivers/driver8.html
#
NTP_PARSE_LINK=""

## Type:           
string(/dev/ttyS0,/dev/ttyS1,/dev/ttyUSB0,/dev/ttyUSB1,/dev/ttyUSB2)
## Default:        ""
## ServiceRestart: ntp
#
# Parse driver device
#
# For more information see the ntp documentation in the package ntp-doc
# /usr/share/doc/packages/ntp-doc/drivers/driver8.html
#
# NOTE: Adjust /etc/apparmor.d/tunables/ntpd accordingly
#
NTP_PARSE_DEVICE=""

## Type:           boolean
## Default:        "yes"
#
# Force time synchronization befor start ntpd
#
NTPD_FORCE_SYNC_ON_STARTUP="no"

## Type:           boolean
## Default:        "no"
#
# Force time synchronization of hwclock befor start ntpd.
# This works only if NTPD_FORCE_SYNC_ON_STARTUP is set 
# to yes.
#
NTPD_FORCE_SYNC_HWCLOCK_ON_STARTUP="yes"
++++++ conf.sysconfig.syslog-ntp ++++++

## Type: string
## Default: "/var/lib/ntp/dev/log"
## ServiceRestart: syslog
## Config: syslog-ng
#
# The filename mentioned here will be added with the "-a ..." option as
# additional socket via SYSLOGD_PARAMS when syslogd is started.
#
# This additional socket is needed in case that syslogd is restarted. Otherwise
# a chrooted 'ntpd' won't be able to continue logging.
#
SYSLOGD_ADDITIONAL_SOCKET_NTP="/var/lib/ntp/dev/log"

++++++ ntp-4.2.6p2-ntpq-speedup-782060.patch ++++++
From: Bernhard M. Wiedemann <bwiedemann suse de>

   do not ask for ntp service in all protocols
   which is very slow (bnc#782060)
--- libntp/decodenetnum.c.orig  2012-11-12 15:12:02.000000000 +0100
+++ libntp/decodenetnum.c       2012-11-12 15:13:18.000000000 +0100
@@ -70,7 +70,7 @@
        }
        ZERO(hints);
        hints.ai_flags = Z_AI_NUMERICHOST;
-       err = getaddrinfo(cp, "ntp", &hints, &ai);
+       err = getaddrinfo(cp, NULL, &hints, &ai);
        if (err != 0)
                return 0;
        NTP_INSIST(ai->ai_addrlen <= sizeof(*netnum));
++++++ ntp-4.2.6p2-seed_file.patch ++++++
Index: ntpd/ntp_crypto.c
===================================================================
--- ntpd/ntp_crypto.c.orig
+++ ntpd/ntp_crypto.c
@@ -3698,10 +3698,12 @@ crypto_setup(void)
                        randfile = rand_file;
 
                if ((bytes = RAND_load_file(randfile, -1)) == 0) {
+                       RAND_write_file(rand_file);
                        msyslog(LOG_ERR,
-                           "crypto_setup: random seed file %s missing",
+                           "crypto_setup: random seed file %s missing - 
created one\n",
                            randfile);
-                       exit (-1);
+                       crypto_setup();
+                       return ( 0 );
                }
                get_systime(&seed);
                RAND_seed(&seed, sizeof(l_fp));
++++++ ntp-code-cleanup.patch ++++++
Index: parseutil/dcfd.c
===================================================================
--- parseutil/dcfd.c.orig
+++ parseutil/dcfd.c
@@ -587,7 +587,7 @@ cvt_rawdcf(
                        /*
                         * invalid character (no consecutive bit sequence)
                         */
-                       dprintf(("parse: cvt_rawdcf: character check for 
0x%x@%d FAILED\n", *s, s - buffer));
+                       dprintf(("parse: cvt_rawdcf: character check for 
0x%x@%ld FAILED\n", *s, s - buffer));
                        *s = (unsigned char)~0;
                        rtc = CVT_FAIL|CVT_BADFMT;
                }
++++++ ntp-segfault_on_invalid_device.patch ++++++
Index: ntpd/refclock_parse.c
===================================================================
--- ntpd/refclock_parse.c.orig
+++ ntpd/refclock_parse.c
@@ -3409,6 +3409,10 @@ parse_control(
         struct parseunit *parse = (struct parseunit *)peer->procptr->unitptr;
        parsectl_t tmpctl;
 
+        /* If opening the clock device failed, unitptr is NULL */
+        if (!parse)
+                return;
+
        static char outstatus[400];     /* status output buffer */
 
        if (out)
++++++ ntp-strcat.patch ++++++
Index: ntp-4.2.6p5/ntpd/refclock_parse.c
===================================================================
--- ntp-4.2.6p5.orig/ntpd/refclock_parse.c
+++ ntp-4.2.6p5/ntpd/refclock_parse.c
@@ -3668,7 +3668,7 @@ parse_process(
                
                NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional 
syslog */
                        msyslog(LOG_WARNING, "PARSE receiver #%d: conversion 
status \"%s\"",
-                               CLK_UNIT(parse->peer), 
parsestatus(parsetime->parse_status, buffer, sizeof(buffer)));
+                               CLK_UNIT(parse->peer), 
parsestatus(parsetime->parse_status, buffer, sizeof(buffer) - strlen(buffer) - 
1));
                
                if ((parsetime->parse_status & CVT_MASK) == CVT_FAIL)
                {
++++++ ntp-wait ++++++
#! /usr/bin/perl -w

die "perl5 needed\n" unless ($] > 5);

use Getopt::Std;

$opt_h = 0;                     # Print help message
$opt_f = 0;                     # 'Hard' failure if 'state' is unknown
$opt_n = 1000;                  # How many tries before we give up? (10 min+)
$opt_s = 6;                     # Seconds to sleep between tries (6s = 10/min)
$opt_v = 0;                     # Be verbose?

getopts('hfn:s:v');

$cmd = 'ntpq -c "rv 0 state"';

$| = 1;                         # Autoflush output.

if( $opt_h )
{
    print "\nUsage: ntp-wait [ options ]\n\n".
          "   -h        Print this message\n". 
          "   -f        'Hard' failure if 'state' is unknown\n".
          "   -n        How many tries before we give up? Default 1000 (ca 10 
min)\n".
          "   -s        Seconds to sleep between tries. Default 6.\n".
          "   -v        Be verbose\n\n";
    exit 0;
}

print "Waiting for ntpd to synchronize...  " if ($opt_v);
for ($i = 0; $i < $opt_n; ++$i) {
    open(Q, $cmd." 2>&1 |") || die "Can't start ntpq: $!";
    while(<Q>) {
      if (/^state=4/) {
        print "\bOK!\n" if ($opt_v);
        exit 0;
      }

      if (/request variable was unknown/) {
        print "\bCan't tell!\nPerhaps you are running an old version of 
ntpd.\n" if ($opt_v);
        exit $opt_f;
      }

      if (/Connection refused/) {
        print "\bntpd is not running!\n" if ($opt_v);
        exit 1;
      }
    }
    close(Q);
    print "\b".substr("*+:.", $i % 4, 1) if ($opt_v);
    sleep($opt_s);
}
print "\bNo!\nntpd did not synchronize.\n" if ($opt_v);
exit 1;
++++++ ntp.firewall ++++++
## Name: xntp Server
## Description: Opens ports for xntp.

# space separated list of allowed TCP ports
TCP=""

# space separated list of allowed UDP ports
UDP="ntp"

# space separated list of allowed RPC services
RPC=""

# space separated list of allowed IP protocols
IP=""

# space separated list of allowed UDP broadcast ports
BROADCAST=""
++++++ ntpd-maxmonmen.patch ++++++
Index: ntp-4.2.6p3/ntpd/ntp_monitor.c
===================================================================
--- ntp-4.2.6p3.orig/ntpd/ntp_monitor.c
+++ ntp-4.2.6p3/ntpd/ntp_monitor.c
@@ -45,7 +45,7 @@
  * ... I don't believe the above is true anymore ... jdg
  */
 #ifndef MAXMONMEM
-#define        MAXMONMEM       600     /* we allocate up to 600 structures */
+#define        MAXMONMEM       520     /* we allocate up to 520 structures */
 #endif
 #ifndef MONMEMINC
 #define        MONMEMINC       40      /* allocate them 40 at a time */
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to