packages/net/ntpd/Makefile
Peter Wagner 82055305b3 ntpd: update to 4.2.8p7
Fixes the following CVEs:

    Bug 3020 / CVE-2016-1551: Refclock impersonation vulnerability, AKA: refclock-peering
        Reported by Matt Street and others of Cisco ASIG
    Bug 3012 / CVE-2016-1549: Sybil vulnerability: ephemeral association attack, AKA: ntp-sybil - MITIGATION ONLY
        Reported by Matthew Van Gundy of Cisco ASIG
    Bug 3011 / CVE-2016-2516: Duplicate IPs on unconfig directives will cause an assertion botch
        Reported by Yihan Lian of the Cloud Security Team, Qihoo 360
    Bug 3010 / CVE-2016-2517: Remote configuration trustedkey/requestkey values are not properly validated
        Reported by Yihan Lian of the Cloud Security Team, Qihoo 360
    Bug 3009 / CVE-2016-2518: Crafted addpeer with hmode > 7 causes array wraparound with MATCH_ASSOC
        Reported by Yihan Lian of the Cloud Security Team, Qihoo 360
    Bug 3008 / CVE-2016-2519: ctl_getitem() return value not always checked
        Reported by Yihan Lian of the Cloud Security Team, Qihoo 360
    Bug 3007 / CVE-2016-1547: Validate crypto-NAKs, AKA: nak-dos
        Reported by Stephen Gray and Matthew Van Gundy of Cisco ASIG
    Bug 2978 / CVE-2016-1548: Interleave-pivot - MITIGATION ONLY
        Reported by Miroslav Lichvar of RedHat and separately by Jonathan Gardner of Cisco ASIG
    Bug 2952 / CVE-2015-7704: KoD fix: peer associations were broken by the fix for NtpBug2901, AKA: Symmetric active/passive mode is broken
        Reported by Michael Tatarinov, NTP Project Developer Volunteer
    Bug 2945 / Bug 2901 / CVE-2015-8138: Zero Origin Timestamp Bypass, AKA: Additional KoD Checks
        Reported by Jonathan Gardner of Cisco ASIG
    Bug 2879 / CVE-2016-1550: Improve NTP security against buffer comparison timing attacks, authdecrypt-timing, AKA: authdecrypt-timing
        Reported independently by Loganaden Velvindron, and Matthew Van Gundy and Stephen Gray of Cisco ASIG.

Signed-off-by: Peter Wagner <tripolar@gmx.at>
2016-05-04 18:49:28 +02:00

160 lines
3.8 KiB
Makefile

#
# Copyright (C) 2006-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ntp
PKG_VERSION:=4.2.8p7
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
PKG_MD5SUM:=46dfba933c3e4bc924d8e55068797578
PKG_LICENSE:=Unique
PKG_LICENSE_FILES:=COPYRIGHT html/copyright.html
PKG_FIXUP:=autoreconf
PKG_LIBTOOL_PATHS:=. sntp
PKG_CHECK_FORMAT_SECURITY:=0
include $(INCLUDE_DIR)/package.mk
define Package/ntpd/Default
SUBMENU:=Time Synchronization
SECTION:=net
CATEGORY:=Network
TITLE:=ISC ntp
MAINTAINER:=Peter Wagner <tripolar@gmx.at>
URL:=http://www.ntp.org/
DEPENDS:=+libopenssl +libpthread +libcap
endef
define Package/ntpd/Default/description
The ISC ntp suite is a collection of tools used to synchronize the
system clock with remote NTP time servers and run/monitor local NTP
servers.
endef
define Package/ntpd
$(call Package/ntpd/Default)
TITLE+= server
USERID:=ntp=123:ntp=123
endef
define Package/ntpd/description
$(call Package/ntpd/Default/description)
.
This package contains the ntpd server.
endef
define Package/ntpdate
$(call Package/ntpd/Default)
TITLE+=date
endef
define Package/ntpdate/description
$(call Package/ntpd/Default/description)
.
This package contains ntpdate.
endef
define Package/ntp-utils
$(call Package/ntpd/Default)
TITLE+= utilities
endef
define Package/ntp-utils/description
$(call Package/ntpd/Default/description)
.
This package contains ntpdc, ntpq and ntptime.
endef
define Package/ntp-keygen
$(call Package/ntpd/Default)
TITLE+=keygen
DEPENDS+= +libevent2-core
endef
define Package/ntp-keygen/description
$(call Package/ntpd/Default/description)
.
This package contains the ntp-keygen.
endef
define Package/ntpd/conffiles
/etc/ntp.conf
endef
CONFIGURE_VARS += \
ac_cv_header_md5_h=no \
ac_cv_lib_rt_sched_setscheduler=no \
ac_cv_header_dns_sd_h=no \
hw_cv_func_snprintf_c99=yes \
hw_cv_func_vsnprintf_c99=yes \
CONFIGURE_ARGS += \
--disable-all-clocks \
--disable-parse-clocks \
--without-ntpsnmpd \
--without-lineeditlibs \
--enable-NMEA \
--enable-LOCAL-CLOCK \
--enable-SHM \
--enable-ATOM \
--enable-linuxcaps \
--with-yielding-select=yes \
--with-crypto \
--with-openssl-incdir="$(STAGING_DIR)/usr/include" \
--with-openssl-libdir="$(STAGING_DIR)/usr/lib"
define Package/ntpd/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpd/ntpd $(1)/sbin/
$(INSTALL_DIR) $(1)/etc
$(INSTALL_CONF) ./files/ntp.conf $(1)/etc/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/ntpd.init $(1)/etc/init.d/ntpd
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_BIN) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd
endef
define Package/ntpd/postinst
#!/bin/sh
[ -L "$${IPKG_INSTROOT}/usr/sbin/ntpd" ] && rm -f "$${IPKG_INSTROOT}/usr/sbin/ntpd"
exit 0
endef
define Package/ntpd/postrm
#!/bin/sh
/bin/busybox ntpd -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/sbin/ntpd
exit 0
endef
define Package/ntpdate/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdate/ntpdate $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/ntpdate.init $(1)/etc/init.d/ntpdate
endef
define Package/ntp-utils/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdc/ntpdc $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpq/ntpq $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/util/ntptime $(1)/usr/sbin/
endef
define Package/ntp-keygen/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/util/ntp-keygen $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,ntpd))
$(eval $(call BuildPackage,ntpdate))
$(eval $(call BuildPackage,ntp-utils))
$(eval $(call BuildPackage,ntp-keygen))