summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/ntp/ntp_4.2.8p10.bb
diff options
context:
space:
mode:
authorArmin Kuster <akuster@mvista.com>2017-03-24 09:22:55 -0700
committerJoe MacDonald <joe_macdonald@mentor.com>2017-04-25 10:24:47 -0400
commit01511d4cdedb696486f29d328a0289694661448d (patch)
tree94c8a034ac1f7a71744f942683383e4d63af1a43 /meta-networking/recipes-support/ntp/ntp_4.2.8p10.bb
parent529b1e660fe6d2ea896ed83d4fe9d9def2a75dd4 (diff)
downloadmeta-openembedded-01511d4cdedb696486f29d328a0289694661448d.tar.gz
ntp: update to 4.2.8.p10
LICENSE_FILE md5 changed do to copyright date change. NTF's NTP Project is releasing ntp-4.2.8p10, which addresses: 6 MEDIUM severity vulnerabilities (1 is about the Windows PPSAPI DLL) 5 LOW severity vulnerabilities (2 are in the Windows Installer) 4 Informational-level vulnerabilities 15 other non-security fixes and improvements All of the security issues in this release are listed in VU#633849. ntp-4.2.8p10 was released on 21 March 2017. Sec 3389 / CVE-2017-6464 / VU#325339: NTP-01-016 NTP: Denial of Service via Malformed Config (Pentest report 01.2017) Sec 3388 / CVE-2017-6462 / VU#325339: NTP-01-014 NTP: Buffer Overflow in DPTS Clock (Pentest report 01.2017) Sec 3387 / CVE-2017-6463 / VU#325339: NTP-01-012 NTP: Authenticated DoS via Malicious Config Option (Pentest report 01.2017) Sec 3386: NTP-01-011 NTP: ntpq_stripquotes() returns incorrect Value (Pentest report 01.2017) Sec 3385: NTP-01-010 NTP: ereallocarray()/eallocarray() underused (Pentest report 01.2017) Sec 3384 / CVE-2017-6455 / VU#325339: NTP-01-009 NTP: Windows: Privileged execution of User Library code (Pentest report 01.2017) Sec 3383 / CVE-2017-6452 / VU#325339: NTP-01-008 NTP: Windows Installer: Stack Buffer Overflow from Command Line (Pentest report 01.2017) Sec 3382 / CVE-2017-6459 / VU#325339: NTP-01-007 NTP: Windows Installer: Data Structure terminated insufficiently (Pentest report 01.2017) Sec 3381: NTP-01-006 NTP: Copious amounts of Unused Code (Pentest report 01.2017) Sec 3380: NTP-01-005 NTP: Off-by-one in Oncore GPS Receiver (Pentest report 01.2017) Sec 3379 / CVE-2017-6458 / VU#325339: NTP-01-004 NTP: Potential Overflows in ctl_put() functions (Pentest report 01.2017) Sec 3378 / CVE-2017-6451 / VU#325339: NTP-01-003 Improper use of snprintf() in mx4200_send() (Pentest report 01.2017) Sec 3377 / CVE-2017-6460 / VU#325339: NTP-01-002 Buffer Overflow in ntpq when fetching reslist (Pentest report 01.2017) Sec 3376: NTP-01-001 Makefile does not enforce Security Flags (Pentest report 01.2017) Sec 3361 / CVE-2016-9042 / VU#325339: 0rigin Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-support/ntp/ntp_4.2.8p10.bb')
-rw-r--r--meta-networking/recipes-support/ntp/ntp_4.2.8p10.bb170
1 files changed, 170 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/ntp/ntp_4.2.8p10.bb b/meta-networking/recipes-support/ntp/ntp_4.2.8p10.bb
new file mode 100644
index 000000000..719c60b97
--- /dev/null
+++ b/meta-networking/recipes-support/ntp/ntp_4.2.8p10.bb
@@ -0,0 +1,170 @@
1SUMMARY = "Network Time Protocol daemon and utilities"
2DESCRIPTION = "The Network Time Protocol (NTP) is used to \
3synchronize the time of a computer client or server to \
4another server or reference time source, such as a radio \
5or satellite receiver or modem."
6HOMEPAGE = "http://support.ntp.org"
7SECTION = "net"
8LICENSE = "NTP"
9LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=e877a1d567a6a58996d2b66e3e387003"
10
11DEPENDS = "libevent"
12
13SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.gz \
14 file://ntp-4.2.4_p6-nano.patch \
15 file://ntpd \
16 file://ntp.conf \
17 file://ntpdate \
18 file://ntpdate.default \
19 file://ntpdate.service \
20 file://ntpd.service \
21 file://sntp.service \
22 file://sntp \
23 file://ntpd.list \
24"
25
26SRC_URI[md5sum] = "745384ed0dedb3f66b33fe84d66466f9"
27SRC_URI[sha256sum] = "ddd2366e64219b9efa0f7438e06800d0db394ac5c88e13c17b70d0dcdf99b99f"
28
29inherit autotools update-rc.d useradd systemd pkgconfig
30
31# The ac_cv_header_readline_history is to stop ntpdc depending on either
32# readline or curses
33EXTRA_OECONF += "--with-net-snmp-config=no \
34 --without-ntpsnmpd \
35 ac_cv_header_readline_history_h=no \
36 --with-yielding_select=yes \
37 --with-locfile=redhat \
38 --without-rpath \
39 "
40CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED"
41
42USERADD_PACKAGES = "${PN}"
43NTP_USER_HOME ?= "/var/lib/ntp"
44USERADD_PARAM_${PN} = "--system --home-dir ${NTP_USER_HOME} \
45 --no-create-home \
46 --shell /bin/false --user-group ntp"
47
48# NB: debug is default-enabled by NTP; keep it default-enabled here.
49PACKAGECONFIG ??= "cap debug refclocks openssl \
50 ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
51"
52PACKAGECONFIG[openssl] = "--with-openssl-libdir=${STAGING_LIBDIR} \
53 --with-openssl-incdir=${STAGING_INCDIR} \
54 --with-crypto, \
55 --without-openssl --without-crypto, \
56 openssl"
57PACKAGECONFIG[cap] = "--enable-linuxcaps,--disable-linuxcaps,libcap"
58PACKAGECONFIG[readline] = "--with-lineeditlibs,--without-lineeditlibs,readline"
59PACKAGECONFIG[refclocks] = "--enable-all-clocks,--disable-all-clocks,pps-tools"
60PACKAGECONFIG[debug] = "--enable-debugging,--disable-debugging"
61PACKAGECONFIG[mdns] = "ac_cv_header_dns_sd_h=yes,ac_cv_header_dns_sd_h=no,mdns"
62PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
63
64do_install_append() {
65 install -d ${D}${sysconfdir}/init.d
66 install -m 644 ${WORKDIR}/ntp.conf ${D}${sysconfdir}
67 install -m 755 ${WORKDIR}/ntpd ${D}${sysconfdir}/init.d
68 install -d ${D}${bindir}
69 install -m 755 ${WORKDIR}/ntpdate ${D}${bindir}/ntpdate-sync
70
71 install -m 755 -d ${D}${NTP_USER_HOME}
72 chown ntp:ntp ${D}${NTP_USER_HOME}
73
74 # Fix hardcoded paths in scripts
75 sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
76 sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
77 sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
78 sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
79 sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${bindir}/ntpdate-sync
80 sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/ntptrace
81 sed -i '/use/i use warnings;' ${D}${sbindir}/ntptrace
82 sed -i '1s,#!.*perl,#! ${bindir}/env perl,' ${D}${sbindir}/ntp-wait
83 sed -i '/use/i use warnings;' ${D}${sbindir}/ntp-wait
84 sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/calc_tickadj
85 sed -i '/use/i use warnings;' ${D}${sbindir}/calc_tickadj
86
87 install -d ${D}/${sysconfdir}/default
88 install -m 644 ${WORKDIR}/ntpdate.default ${D}${sysconfdir}/default/ntpdate
89 install -m 0644 ${WORKDIR}/sntp ${D}${sysconfdir}/default/
90
91 install -d ${D}/${sysconfdir}/network/if-up.d
92 ln -s ${bindir}/ntpdate-sync ${D}/${sysconfdir}/network/if-up.d
93
94 install -d ${D}${systemd_unitdir}/system
95 install -m 0644 ${WORKDIR}/ntpdate.service ${D}${systemd_unitdir}/system/
96 install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/
97 install -m 0644 ${WORKDIR}/sntp.service ${D}${systemd_unitdir}/system/
98
99 install -d ${D}${systemd_unitdir}/ntp-units.d
100 install -m 0644 ${WORKDIR}/ntpd.list ${D}${systemd_unitdir}/ntp-units.d/60-ntpd.list
101
102 # Remove an empty libexecdir.
103 rmdir --ignore-fail-on-non-empty ${D}${libexecdir}
104}
105
106PACKAGES += "ntpdate sntp ${PN}-tickadj ${PN}-utils"
107# NOTE: you don't need ntpdate, use "ntpd -q -g -x"
108
109# ntp originally includes tickadj. It's split off for inclusion in small firmware images on platforms
110# with wonky clocks (e.g. OpenSlug)
111RDEPENDS_${PN} = "${PN}-tickadj"
112# Handle move from bin to utils package
113RPROVIDES_${PN}-utils = "${PN}-bin"
114RREPLACES_${PN}-utils = "${PN}-bin"
115RCONFLICTS_${PN}-utils = "${PN}-bin"
116
117SYSTEMD_PACKAGES = "${PN} ntpdate sntp"
118SYSTEMD_SERVICE_${PN} = "ntpd.service"
119SYSTEMD_SERVICE_ntpdate = "ntpdate.service"
120SYSTEMD_SERVICE_sntp = "sntp.service"
121
122RPROVIDES_${PN} += "${PN}-systemd"
123RREPLACES_${PN} += "${PN}-systemd"
124RCONFLICTS_${PN} += "${PN}-systemd"
125
126RPROVIDES_ntpdate += "ntpdate-systemd"
127RREPLACES_ntpdate += "ntpdate-systemd"
128RCONFLICTS_ntpdate += "ntpdate-systemd"
129
130RSUGGESTS_${PN} = "iana-etc"
131
132FILES_${PN} = "${sbindir}/ntpd.ntp ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd ${libdir} \
133 ${NTP_USER_HOME} \
134 ${systemd_unitdir}/ntp-units.d/60-ntpd.list ${libexecdir}\
135"
136FILES_${PN}-tickadj = "${sbindir}/tickadj"
137FILES_${PN}-utils = "${sbindir} ${datadir}/ntp/lib"
138RDEPENDS_${PN}-utils += "perl"
139FILES_ntpdate = "${sbindir}/ntpdate \
140 ${sysconfdir}/network/if-up.d/ntpdate-sync \
141 ${bindir}/ntpdate-sync \
142 ${sysconfdir}/default/ntpdate \
143 ${systemd_unitdir}/system/ntpdate.service \
144"
145FILES_sntp = "${sbindir}/sntp \
146 ${sysconfdir}/default/sntp \
147 ${systemd_unitdir}/system/sntp.service \
148 "
149
150CONFFILES_${PN} = "${sysconfdir}/ntp.conf"
151CONFFILES_ntpdate = "${sysconfdir}/default/ntpdate"
152
153INITSCRIPT_NAME = "ntpd"
154# No dependencies, so just go in at the standard level (20)
155INITSCRIPT_PARAMS = "defaults"
156
157pkg_postinst_ntpdate() {
158 if ! grep -q -s ntpdate $D/var/spool/cron/root; then
159 echo "adding crontab"
160 test -d $D/var/spool/cron || mkdir -p $D/var/spool/cron
161 echo "30 * * * * ${bindir}/ntpdate-sync silent" >> $D/var/spool/cron/root
162 fi
163}
164
165inherit update-alternatives
166
167ALTERNATIVE_PRIORITY = "100"
168
169ALTERNATIVE_${PN} = "ntpd"
170ALTERNATIVE_LINK_NAME[ntpd] = "${sbindir}/ntpd"