summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp.inc15
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/0001-define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch13
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/0003-link-with-lcrypto.patch13
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/0004-Fix-out-of-tree-builds.patch109
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/0006-site.h-enable-gentle-shutdown.patch13
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch40
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/0010-build-shared-libs.patch208
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/0011-Moved-the-call-to-isc_app_ctxstart-to-not-get-signal.patch81
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/0012-dhcp-correct-the-intention-for-xml2-lib-search.patch13
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/0013-fixup_use_libbind.patch64
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/CVE-2017-3144.patch74
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp_4.4.1.bb (renamed from meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb)13
12 files changed, 181 insertions, 475 deletions
diff --git a/meta/recipes-connectivity/dhcp/dhcp.inc b/meta/recipes-connectivity/dhcp/dhcp.inc
index e94370786a..3e65e5cf29 100644
--- a/meta/recipes-connectivity/dhcp/dhcp.inc
+++ b/meta/recipes-connectivity/dhcp/dhcp.inc
@@ -8,7 +8,7 @@ easier to administer devices."
8HOMEPAGE = "http://www.isc.org/" 8HOMEPAGE = "http://www.isc.org/"
9 9
10LICENSE = "ISC" 10LICENSE = "ISC"
11LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;md5=c5c64d696107f84b56fe337d14da1753" 11LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;md5=004a4db50a1e20972e924a8618747c01"
12 12
13DEPENDS = "openssl bind" 13DEPENDS = "openssl bind"
14 14
@@ -24,7 +24,7 @@ SRC_URI = "http://ftp.isc.org/isc/dhcp/${PV}/dhcp-${PV}.tar.gz \
24UPSTREAM_CHECK_URI = "ftp://ftp.isc.org/isc/dhcp/" 24UPSTREAM_CHECK_URI = "ftp://ftp.isc.org/isc/dhcp/"
25UPSTREAM_CHECK_REGEX = "(?P<pver>\d+\.\d+\.(\d+?))/" 25UPSTREAM_CHECK_REGEX = "(?P<pver>\d+\.\d+\.(\d+?))/"
26 26
27inherit autotools systemd useradd update-rc.d 27inherit autotools-brokensep systemd useradd update-rc.d
28 28
29USERADD_PACKAGES = "${PN}-server" 29USERADD_PACKAGES = "${PN}-server"
30USERADD_PARAM_${PN}-server = "--system --no-create-home --home-dir /var/run/${BPN} --shell /bin/false --user-group ${BPN}" 30USERADD_PARAM_${PN}-server = "--system --no-create-home --home-dir /var/run/${BPN} --shell /bin/false --user-group ${BPN}"
@@ -48,11 +48,17 @@ EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \
48 --with-srv6-lease-file=${localstatedir}/lib/dhcp/dhcpd6.leases \ 48 --with-srv6-lease-file=${localstatedir}/lib/dhcp/dhcpd6.leases \
49 --with-cli-lease-file=${localstatedir}/lib/dhcp/dhclient.leases \ 49 --with-cli-lease-file=${localstatedir}/lib/dhcp/dhclient.leases \
50 --with-cli6-lease-file=${localstatedir}/lib/dhcp/dhclient6.leases \ 50 --with-cli6-lease-file=${localstatedir}/lib/dhcp/dhclient6.leases \
51 --with-libbind=${STAGING_LIBDIR}/ \
52 --enable-paranoia --disable-static \ 51 --enable-paranoia --disable-static \
53 --with-randomdev=/dev/random \ 52 --with-randomdev=/dev/random \
53 --with-libbind=${STAGING_DIR_HOST} \
54 --enable-libtool \
54 " 55 "
55 56
57#Enable shared libs per dhcp README
58do_configure_prepend () {
59 cp configure.ac+lt configure.ac
60}
61
56do_install_append () { 62do_install_append () {
57 install -d ${D}${sysconfdir}/init.d 63 install -d ${D}${sysconfdir}/init.d
58 install -d ${D}${sysconfdir}/default 64 install -d ${D}${sysconfdir}/default
@@ -96,8 +102,7 @@ PACKAGES += "dhcp-libs dhcp-server dhcp-server-config dhcp-client dhcp-relay dhc
96PACKAGES_remove = "${PN}" 102PACKAGES_remove = "${PN}"
97RDEPENDS_${PN}-dev = "" 103RDEPENDS_${PN}-dev = ""
98RDEPENDS_${PN}-staticdev = "" 104RDEPENDS_${PN}-staticdev = ""
99 105FILES_${PN}-libs = "${libdir}/libdhcpctl.so.0* ${libdir}/libomapi.so.0* ${libdir}/libdhcp.so.0*"
100FILES_${PN}-libs = "${libdir}/libdhcpctl.so.0* ${libdir}/libomapi.so.0*"
101 106
102FILES_${PN}-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server" 107FILES_${PN}-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server"
103RRECOMMENDS_${PN}-server = "dhcp-server-config" 108RRECOMMENDS_${PN}-server = "dhcp-server-config"
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0001-define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch b/meta/recipes-connectivity/dhcp/dhcp/0001-define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch
index e5b3cf9bc5..d1b57f0bb4 100644
--- a/meta/recipes-connectivity/dhcp/dhcp/0001-define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch
+++ b/meta/recipes-connectivity/dhcp/dhcp/0001-define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch
@@ -11,11 +11,11 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
11 includes/site.h | 3 ++- 11 includes/site.h | 3 ++-
12 1 file changed, 2 insertions(+), 1 deletion(-) 12 1 file changed, 2 insertions(+), 1 deletion(-)
13 13
14diff --git a/includes/site.h b/includes/site.h 14Index: dhcp-4.4.1/includes/site.h
15index b2f7fd7..280fbb9 100644 15===================================================================
16--- a/includes/site.h 16--- dhcp-4.4.1.orig/includes/site.h
17+++ b/includes/site.h 17+++ dhcp-4.4.1/includes/site.h
18@@ -149,7 +149,8 @@ 18@@ -148,7 +148,8 @@
19 /* Define this if you want the dhcpd.conf file to go somewhere other than 19 /* Define this if you want the dhcpd.conf file to go somewhere other than
20 the default location. By default, it goes in /etc/dhcpd.conf. */ 20 the default location. By default, it goes in /etc/dhcpd.conf. */
21 21
@@ -25,6 +25,3 @@ index b2f7fd7..280fbb9 100644
25 25
26 /* Network API definitions. You do not need to choose one of these - if 26 /* Network API definitions. You do not need to choose one of these - if
27 you don't choose, one will be chosen for you in your system's config 27 you don't choose, one will be chosen for you in your system's config
28--
291.8.3.1
30
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0003-link-with-lcrypto.patch b/meta/recipes-connectivity/dhcp/dhcp/0003-link-with-lcrypto.patch
index 810c7b6dad..5b35933a54 100644
--- a/meta/recipes-connectivity/dhcp/dhcp/0003-link-with-lcrypto.patch
+++ b/meta/recipes-connectivity/dhcp/dhcp/0003-link-with-lcrypto.patch
@@ -18,11 +18,11 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
18 configure.ac | 4 ++++ 18 configure.ac | 4 ++++
19 1 file changed, 4 insertions(+) 19 1 file changed, 4 insertions(+)
20 20
21diff --git a/configure.ac b/configure.ac 21Index: dhcp-4.4.1/configure.ac
22index cdfa352..44fb57e 100644 22===================================================================
23--- a/configure.ac 23--- dhcp-4.4.1.orig/configure.ac
24+++ b/configure.ac 24+++ dhcp-4.4.1/configure.ac
25@@ -591,6 +591,10 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[void foo() __attribute__((noreturn)); 25@@ -612,6 +612,10 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],
26 # Look for optional headers. 26 # Look for optional headers.
27 AC_CHECK_HEADERS(sys/socket.h net/if_dl.h net/if6.h regex.h) 27 AC_CHECK_HEADERS(sys/socket.h net/if_dl.h net/if6.h regex.h)
28 28
@@ -33,6 +33,3 @@ index cdfa352..44fb57e 100644
33 # Solaris needs some libraries for functions 33 # Solaris needs some libraries for functions
34 AC_SEARCH_LIBS(socket, [socket]) 34 AC_SEARCH_LIBS(socket, [socket])
35 AC_SEARCH_LIBS(inet_ntoa, [nsl]) 35 AC_SEARCH_LIBS(inet_ntoa, [nsl])
36--
371.8.3.1
38
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0004-Fix-out-of-tree-builds.patch b/meta/recipes-connectivity/dhcp/dhcp/0004-Fix-out-of-tree-builds.patch
index 7d1d867986..b71c93dd6d 100644
--- a/meta/recipes-connectivity/dhcp/dhcp/0004-Fix-out-of-tree-builds.patch
+++ b/meta/recipes-connectivity/dhcp/dhcp/0004-Fix-out-of-tree-builds.patch
@@ -19,82 +19,75 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
19 server/Makefile.am | 2 +- 19 server/Makefile.am | 2 +-
20 6 files changed, 9 insertions(+), 5 deletions(-) 20 6 files changed, 9 insertions(+), 5 deletions(-)
21 21
22diff --git a/client/Makefile.am b/client/Makefile.am 22Index: dhcp-4.4.1/common/Makefile.am
23index 2cb83d8..4730bb3 100644 23===================================================================
24--- a/client/Makefile.am 24--- dhcp-4.4.1.orig/common/Makefile.am
25+++ b/client/Makefile.am 25+++ dhcp-4.4.1/common/Makefile.am
26@@ -7,11 +7,11 @@ SUBDIRS = . tests
27 BINDLIBDIR = @BINDDIR@/lib
28
29 AM_CPPFLAGS = -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
30- -DLOCALSTATEDIR='"$(localstatedir)"'
31+ -DLOCALSTATEDIR='"$(localstatedir)"' -I$(top_srcdir)/includes
32
33 dist_sysconf_DATA = dhclient.conf.example
34 sbin_PROGRAMS = dhclient
35-dhclient_SOURCES = clparse.c dhclient.c dhc6.c \
36+dhclient_SOURCES = $(srcdir)/clparse.c $(srcdir)/dhclient.c $(srcdir)/dhc6.c \
37 scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
38 scripts/netbsd scripts/nextstep scripts/openbsd \
39 scripts/solaris scripts/openwrt
40diff --git a/common/Makefile.am b/common/Makefile.am
41index 113aee8..0f24fbb 100644
42--- a/common/Makefile.am
43+++ b/common/Makefile.am
44@@ -1,4 +1,5 @@ 26@@ -1,4 +1,5 @@
45-AM_CPPFLAGS = -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"' 27-AM_CPPFLAGS = -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"'
46+AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"' 28+AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"'
47+ 29+
48 AM_CFLAGS = $(LDAP_CFLAGS) 30 AM_CFLAGS = $(LDAP_CFLAGS)
49 31
50 noinst_LIBRARIES = libdhcp.a 32 lib_LIBRARIES = libdhcp.a
51diff --git a/dhcpctl/Makefile.am b/dhcpctl/Makefile.am 33Index: dhcp-4.4.1/dhcpctl/Makefile.am
52index ceb0de1..ba8dd8b 100644 34===================================================================
53--- a/dhcpctl/Makefile.am 35--- dhcp-4.4.1.orig/dhcpctl/Makefile.am
54+++ b/dhcpctl/Makefile.am 36+++ dhcp-4.4.1/dhcpctl/Makefile.am
55@@ -1,5 +1,7 @@ 37@@ -3,6 +3,8 @@ BINDLIBDNSDIR=@BINDLIBDNSDIR@
56 BINDLIBDIR = @BINDDIR@/lib 38 BINDLIBISCCFGDIR=@BINDLIBISCCFGDIR@
39 BINDLIBISCDIR=@BINDLIBISCDIR@
57 40
58+AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir) 41+AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir)
59+ 42+
60 bin_PROGRAMS = omshell 43 bin_PROGRAMS = omshell
61 lib_LIBRARIES = libdhcpctl.a 44 lib_LIBRARIES = libdhcpctl.a
62 noinst_PROGRAMS = cltest 45 noinst_PROGRAMS = cltest
63diff --git a/omapip/Makefile.am b/omapip/Makefile.am 46Index: dhcp-4.4.1/server/Makefile.am
64index 446a594..dd1afa0 100644 47===================================================================
65--- a/omapip/Makefile.am 48--- dhcp-4.4.1.orig/server/Makefile.am
66+++ b/omapip/Makefile.am 49+++ dhcp-4.4.1/server/Makefile.am
67@@ -1,4 +1,5 @@ 50@@ -4,7 +4,7 @@
68 BINDLIBDIR = @BINDDIR@/lib 51 # production code. Sadly, we are not there yet.
52 SUBDIRS = . tests
53
54-AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
55+AM_CPPFLAGS = -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes
56
57 dist_sysconf_DATA = dhcpd.conf.example
58 sbin_PROGRAMS = dhcpd
59Index: dhcp-4.4.1/client/Makefile.am
60===================================================================
61--- dhcp-4.4.1.orig/client/Makefile.am
62+++ dhcp-4.4.1/client/Makefile.am
63@@ -5,7 +5,7 @@
64 SUBDIRS = . tests
65
66 AM_CPPFLAGS = -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"'
67-AM_CPPFLAGS += -DLOCALSTATEDIR='"$(localstatedir)"'
68+AM_CPPFLAGS += -DLOCALSTATEDIR='"$(localstatedir)"' -I$(top_srcdir)/includes
69
70 dist_sysconf_DATA = dhclient.conf.example
71 sbin_PROGRAMS = dhclient
72Index: dhcp-4.4.1/omapip/Makefile.am
73===================================================================
74--- dhcp-4.4.1.orig/omapip/Makefile.am
75+++ dhcp-4.4.1/omapip/Makefile.am
76@@ -2,6 +2,7 @@ BINDLIBIRSDIR=@BINDLIBIRSDIR@
77 BINDLIBDNSDIR=@BINDLIBDNSDIR@
78 BINDLIBISCCFGDIR=@BINDLIBISCCFGDIR@
79 BINDLIBISCDIR=@BINDLIBISCDIR@
69+AM_CPPFLAGS = -I$(top_srcdir)/includes 80+AM_CPPFLAGS = -I$(top_srcdir)/includes
70 81
71 lib_LIBRARIES = libomapi.a 82 lib_LIBRARIES = libomapi.a
72 noinst_PROGRAMS = svtest 83 noinst_PROGRAMS = svtest
73diff --git a/relay/Makefile.am b/relay/Makefile.am 84Index: dhcp-4.4.1/relay/Makefile.am
74index 3060eca..6d652f6 100644 85===================================================================
75--- a/relay/Makefile.am 86--- dhcp-4.4.1.orig/relay/Makefile.am
76+++ b/relay/Makefile.am 87+++ dhcp-4.4.1/relay/Makefile.am
77@@ -1,6 +1,6 @@ 88@@ -1,4 +1,4 @@
78 BINDLIBDIR = @BINDDIR@/lib
79
80-AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"' 89-AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"'
81+AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes 90+AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes
82 91
83 sbin_PROGRAMS = dhcrelay 92 sbin_PROGRAMS = dhcrelay
84 dhcrelay_SOURCES = dhcrelay.c 93 dhcrelay_SOURCES = dhcrelay.c
85diff --git a/server/Makefile.am b/server/Makefile.am
86index 54feedf..3990b9c 100644
87--- a/server/Makefile.am
88+++ b/server/Makefile.am
89@@ -6,7 +6,7 @@ SUBDIRS = . tests
90
91 BINDLIBDIR = @BINDDIR@/lib
92
93-AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
94+AM_CPPFLAGS = -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes
95
96 dist_sysconf_DATA = dhcpd.conf.example
97 sbin_PROGRAMS = dhcpd
98--
991.8.3.1
100
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0006-site.h-enable-gentle-shutdown.patch b/meta/recipes-connectivity/dhcp/dhcp/0006-site.h-enable-gentle-shutdown.patch
index c62b283d50..6ef70ccacd 100644
--- a/meta/recipes-connectivity/dhcp/dhcp/0006-site.h-enable-gentle-shutdown.patch
+++ b/meta/recipes-connectivity/dhcp/dhcp/0006-site.h-enable-gentle-shutdown.patch
@@ -12,11 +12,11 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
12 includes/site.h | 2 +- 12 includes/site.h | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-) 13 1 file changed, 1 insertion(+), 1 deletion(-)
14 14
15diff --git a/includes/site.h b/includes/site.h 15Index: dhcp-4.4.1/includes/site.h
16index 280fbb9..e6c2972 100644 16===================================================================
17--- a/includes/site.h 17--- dhcp-4.4.1.orig/includes/site.h
18+++ b/includes/site.h 18+++ dhcp-4.4.1/includes/site.h
19@@ -296,7 +296,7 @@ 19@@ -295,7 +295,7 @@
20 situations. We plan to revisit this feature and may 20 situations. We plan to revisit this feature and may
21 make non-backwards compatible changes including the 21 make non-backwards compatible changes including the
22 removal of this define. Use at your own risk. */ 22 removal of this define. Use at your own risk. */
@@ -25,6 +25,3 @@ index 280fbb9..e6c2972 100644
25 25
26 /* Include old error codes. This is provided in case you 26 /* Include old error codes. This is provided in case you
27 are building an external program similar to omshell for 27 are building an external program similar to omshell for
28--
291.8.3.1
30
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch b/meta/recipes-connectivity/dhcp/dhcp/0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch
index 43c26ea21c..feb0754fff 100644
--- a/meta/recipes-connectivity/dhcp/dhcp/0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch
+++ b/meta/recipes-connectivity/dhcp/dhcp/0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch
@@ -15,13 +15,13 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
15 configure.ac | 11 +++++++++++ 15 configure.ac | 11 +++++++++++
16 1 file changed, 11 insertions(+) 16 1 file changed, 11 insertions(+)
17 17
18diff --git a/configure.ac b/configure.ac 18Index: dhcp-4.4.1/configure.ac
19index 44fb57e..8e9f509 100644 19===================================================================
20--- a/configure.ac 20--- dhcp-4.4.1.orig/configure.ac
21+++ b/configure.ac 21+++ dhcp-4.4.1/configure.ac
22@@ -611,6 +611,17 @@ AC_CHECK_FUNCS(strlcat) 22@@ -642,6 +642,17 @@ if test "$have_nanosleep" = "rt"; then
23 # For HP/UX we need -lipv6 for if_nametoindex, perhaps others. 23 LIBS="-lrt $LIBS"
24 AC_SEARCH_LIBS(if_nametoindex, [ipv6]) 24 fi
25 25
26+AC_ARG_WITH(libxml2, 26+AC_ARG_WITH(libxml2,
27+ AS_HELP_STRING([--with-libxml2], [link against libxml2. this is needed if bind was built with xml2 support enabled]), 27+ AS_HELP_STRING([--with-libxml2], [link against libxml2. this is needed if bind was built with xml2 support enabled]),
@@ -37,6 +37,26 @@ index 44fb57e..8e9f509 100644
37 # check for /dev/random (declares HAVE_DEV_RANDOM) 37 # check for /dev/random (declares HAVE_DEV_RANDOM)
38 AC_MSG_CHECKING(for random device) 38 AC_MSG_CHECKING(for random device)
39 AC_ARG_WITH(randomdev, 39 AC_ARG_WITH(randomdev,
40-- 40Index: dhcp-4.4.1/configure.ac+lt
411.8.3.1 41===================================================================
42 42--- dhcp-4.4.1.orig/configure.ac+lt
43+++ dhcp-4.4.1/configure.ac+lt
44@@ -909,6 +909,18 @@ elif test "$want_libtool" = "yes" -a "$u
45 fi
46 AM_CONDITIONAL(INSTALL_BIND, test "$want_install_bind" = "yes")
47
48+AC_ARG_WITH(libxml2,
49+ AS_HELP_STRING([--with-libxml2], [link against libxml2. this is needed if bind was built with xml2 support enabled]),
50+ with_libxml2="$withval", with_libxml2="no")
51+
52+if test x$with_libxml2 != xno; then
53+ AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],,
54+ [if test x$with_libxml2 != xauto; then
55+ AC_MSG_FAILURE([*** Cannot find xmlTextWriterStartElement with -lxml2 and libxml2 was requested])
56+ fi])
57+fi
58+
59+
60 # OpenLDAP support.
61 AC_ARG_WITH(ldap,
62 AS_HELP_STRING([--with-ldap],[enable OpenLDAP support in dhcpd (default is no)]),
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0010-build-shared-libs.patch b/meta/recipes-connectivity/dhcp/dhcp/0010-build-shared-libs.patch
deleted file mode 100644
index f128731c64..0000000000
--- a/meta/recipes-connectivity/dhcp/dhcp/0010-build-shared-libs.patch
+++ /dev/null
@@ -1,208 +0,0 @@
1From 76c370a929e5ab5dbc81c2fbcf4e50f4fbc08ce9 Mon Sep 17 00:00:00 2001
2From: Kai Kang <kai.kang@windriver.com>
3Date: Tue, 15 Aug 2017 15:53:37 +0800
4Subject: [PATCH 10/11] build shared libs
5
6Upstream-Status: Pending
7
8Port patches from Fedora to build shared libs rather than static libs.
9
10Signed-off-by: Kai Kang <kai.kang@windriver.com>
11
12Rebase to 4.3.6
13
14Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
15---
16 client/Makefile.am | 4 ++--
17 common/tests/Makefile.am | 13 +++++--------
18 configure.ac | 12 ++----------
19 dhcpctl/Makefile.am | 14 ++++++--------
20 omapip/Makefile.am | 7 +++----
21 relay/Makefile.am | 5 ++---
22 server/Makefile.am | 7 +++----
23 server/tests/Makefile.am | 7 +++----
24 8 files changed, 26 insertions(+), 43 deletions(-)
25
26diff --git a/client/Makefile.am b/client/Makefile.am
27index 84d8131..e776bf0 100644
28--- a/client/Makefile.am
29+++ b/client/Makefile.am
30@@ -15,7 +15,7 @@ dhclient_SOURCES = $(srcdir)/clparse.c $(srcdir)/dhclient.c $(srcdir)/dhc6.c \
31 scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
32 scripts/netbsd scripts/nextstep scripts/openbsd \
33 scripts/solaris scripts/openwrt
34-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
35- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
36+dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
37+ -L$(BINDLIBDIR) -lirs -ldns -lisccfg -lisc
38 man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
39 EXTRA_DIST = $(man_MANS)
40diff --git a/common/tests/Makefile.am b/common/tests/Makefile.am
41index 2f98d22..8745e88 100644
42--- a/common/tests/Makefile.am
43+++ b/common/tests/Makefile.am
44@@ -15,26 +15,23 @@ ATF_TESTS += alloc_unittest dns_unittest misc_unittest ns_name_unittest
45 alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
46 alloc_unittest_LDADD = $(ATF_LDFLAGS)
47 alloc_unittest_LDADD += ../libdhcp.a \
48- ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
49- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
50+ ../../omapip/libomapi.la -L$(BINDLIBDIR) -ldns -lisccfg -lisc
51
52 dns_unittest_SOURCES = dns_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
53 dns_unittest_LDADD = $(ATF_LDFLAGS)
54 dns_unittest_LDADD += ../libdhcp.a \
55- ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
56- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
57+ ../../omapip/libomapi.la -L$(BINDLIBDIR) -ldns -lisccfg -lisc
58
59 misc_unittest_SOURCES = misc_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
60 misc_unittest_LDADD = $(ATF_LDFLAGS)
61 misc_unittest_LDADD += ../libdhcp.a \
62- ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
63- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
64+ ../../omapip/libomapi.la -L$(BINDLIBDIR) -ldns -lisccfg -lisc
65
66 ns_name_unittest_SOURCES = ns_name_test.c $(top_srcdir)/tests/t_api_dhcp.c
67 ns_name_unittest_LDADD = $(ATF_LDFLAGS)
68 ns_name_unittest_LDADD += ../libdhcp.a \
69- ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
70- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
71+ ../../omapip/libomapi.a -L$(BINDLIBDIR) \
72+ -ldns -lisccfg -lisc
73
74 check: $(ATF_TESTS)
75 @if test $(top_srcdir) != ${top_builddir}; then \
76diff --git a/configure.ac b/configure.ac
77index 8e9f509..bfe988a 100644
78--- a/configure.ac
79+++ b/configure.ac
80@@ -47,16 +47,8 @@ AM_CONDITIONAL(CROSS_COMPILING, test "$cross_compiling" = "yes")
81 # Use this to define _GNU_SOURCE to pull in the IPv6 Advanced Socket API.
82 AC_USE_SYSTEM_EXTENSIONS
83
84-AC_PROG_RANLIB
85-
86-AC_PATH_PROG(AR, ar)
87-AC_SUBST(AR)
88-
89-if test "X$AR" = "X"; then
90- AC_MSG_ERROR([
91-ar program not found. Please fix your PATH to include the directory in
92-which ar resides, or set AR in the environment with the full path to ar.])
93-fi
94+# Use libtool to simplify building of shared libraries
95+AC_PROG_LIBTOOL
96
97 AC_CONFIG_HEADERS([includes/config.h])
98
99diff --git a/dhcpctl/Makefile.am b/dhcpctl/Makefile.am
100index 9b2486e..784cdf7 100644
101--- a/dhcpctl/Makefile.am
102+++ b/dhcpctl/Makefile.am
103@@ -3,19 +3,17 @@ BINDLIBDIR = @BINDDIR@
104 AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir)
105
106 bin_PROGRAMS = omshell
107-lib_LIBRARIES = libdhcpctl.a
108+lib_LTLIBRARIES = libdhcpctl.la
109 noinst_PROGRAMS = cltest
110 man_MANS = omshell.1 dhcpctl.3
111 EXTRA_DIST = $(man_MANS)
112
113 omshell_SOURCES = omshell.c
114-omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
115- $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
116- $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
117+omshell_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
118+ -L$(BINDLIBDIR) -lirs -ldns -lisccfg -lisc
119
120-libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
121+libdhcpctl_la_SOURCES = dhcpctl.c callback.c remote.c
122
123 cltest_SOURCES = cltest.c
124-cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
125- $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
126- $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
127+cltest_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
128+ -L$(BINDLIBDIR) -lirs -ldns -lisccfg -lisc
129diff --git a/omapip/Makefile.am b/omapip/Makefile.am
130index e4a8599..c0c7a1e 100644
131--- a/omapip/Makefile.am
132+++ b/omapip/Makefile.am
133@@ -1,10 +1,10 @@
134 BINDLIBDIR = @BINDDIR@
135 AM_CPPFLAGS = -I$(top_srcdir)/includes
136
137-lib_LIBRARIES = libomapi.a
138+lib_LTLIBRARIES = libomapi.la
139 noinst_PROGRAMS = svtest
140
141-libomapi_a_SOURCES = protocol.c buffer.c alloc.c result.c connection.c \
142+libomapi_la_SOURCES = protocol.c buffer.c alloc.c result.c connection.c \
143 errwarn.c listener.c dispatch.c generic.c support.c \
144 handle.c message.c convert.c hash.c auth.c inet_addr.c \
145 array.c trace.c toisc.c iscprint.c isclib.c
146@@ -13,6 +13,5 @@ man_MANS = omapi.3
147 EXTRA_DIST = $(man_MANS)
148
149 svtest_SOURCES = test.c
150-svtest_LDADD = libomapi.a $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
151- $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
152+svtest_LDADD = libomapi.la -L$(BINDLIBDIR) -lirs -ldns -lisccfg -lisc
153
154diff --git a/relay/Makefile.am b/relay/Makefile.am
155index b3bf578..f47009f 100644
156--- a/relay/Makefile.am
157+++ b/relay/Makefile.am
158@@ -4,9 +4,8 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes
159
160 sbin_PROGRAMS = dhcrelay
161 dhcrelay_SOURCES = dhcrelay.c
162-dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
163- $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
164- $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
165+dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
166+ -L$(BINDLIBDIR) -lirs -ldns -lisccfg -lisc
167 man_MANS = dhcrelay.8
168 EXTRA_DIST = $(man_MANS)
169
170diff --git a/server/Makefile.am b/server/Makefile.am
171index b5d8c2d..d7f876d 100644
172--- a/server/Makefile.am
173+++ b/server/Makefile.am
174@@ -15,10 +15,9 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \
175 dhcpv6.c mdb6.c ldap.c ldap_casa.c leasechain.c ldap_krb_helper.c
176
177 dhcpd_CFLAGS = $(LDAP_CFLAGS)
178-dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
179- ../dhcpctl/libdhcpctl.a $(BINDLIBDIR)/libirs.a \
180- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \
181- $(BINDLIBDIR)/libisc.a $(LDAP_LIBS)
182+dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
183+ ../dhcpctl/libdhcpctl.la -L$(BINDLIBDIR) \
184+ -lirs -ldns -lisccfg -lisc $(LDAP_LIBS)
185
186 man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
187 EXTRA_DIST = $(man_MANS)
188diff --git a/server/tests/Makefile.am b/server/tests/Makefile.am
189index 9821081..de95872 100644
190--- a/server/tests/Makefile.am
191+++ b/server/tests/Makefile.am
192@@ -19,10 +19,9 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpars.c ../db.c ../class.c \
193 ../ddns.c ../dhcpleasequery.c ../dhcpv6.c ../mdb6.c \
194 ../ldap.c ../ldap_casa.c ../dhcpd.c ../leasechain.c
195
196-DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a \
197- $(top_builddir)/dhcpctl/libdhcpctl.a $(BINDLIBDIR)/libirs.a \
198- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \
199- $(BINDLIBDIR)/libisc.a
200+DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.la \
201+ $(top_builddir)/dhcpctl/libdhcpctl.la \
202+ -L$(BINDLIBDIR) -lirs -ldns -lisccfg -lisc
203
204 ATF_TESTS =
205 if HAVE_ATF
206--
2071.8.3.1
208
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0011-Moved-the-call-to-isc_app_ctxstart-to-not-get-signal.patch b/meta/recipes-connectivity/dhcp/dhcp/0011-Moved-the-call-to-isc_app_ctxstart-to-not-get-signal.patch
deleted file mode 100644
index 67bb4631ae..0000000000
--- a/meta/recipes-connectivity/dhcp/dhcp/0011-Moved-the-call-to-isc_app_ctxstart-to-not-get-signal.patch
+++ /dev/null
@@ -1,81 +0,0 @@
1From 37725f3e22edb50e0ca2d1fff971321a5a4d5112 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Wed, 12 Jul 2017 03:05:13 -0400
4Subject: [PATCH 11/11] Moved the call to isc_app_ctxstart() to not get signal
5 block by all threads
6
7Signed-off-by: Francis Dupont <fdupont@isc.org>
8
9In https://source.isc.org/git/bind9.git, since the following
10commit applied:
11...
12commit b99bfa184bc9375421b5df915eea7dfac6a68a99
13Author: Evan Hunt <each@isc.org>
14Date: Wed Apr 10 13:49:57 2013 -0700
15
16 [master] unify internal and export libraries
17
18 3550. [func] Unified the internal and export versions of the
19 BIND libraries, allowing external clients to use
20 the same libraries as BIND. [RT #33131]
21...
22(git show b99bfa184bc9375421b5df915eea7dfac6a68a99 -- ./lib/isc/unix/app.c)
23
24In this commit, if bind9 enable threads(ISC_PLATFORM_USETHREADS),
25it blocks signal SIGHUP, SIGINT and SIGTERM in isc__app_ctxstart.
26Which caused dhclient/dhcpd could not be stopped by SIGTERM.
27
28It caused systemd's reboot hung which send SIGTERM by default.
29
30Upstream-Status: Backport [https://source.isc.org/git/dhcp.git]
31Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
32---
33 omapip/isclib.c | 25 +++++++++++++++----------
34 1 file changed, 15 insertions(+), 10 deletions(-)
35
36diff --git a/omapip/isclib.c b/omapip/isclib.c
37index ce86490..6a04345 100644
38--- a/omapip/isclib.c
39+++ b/omapip/isclib.c
40@@ -185,16 +185,6 @@ dhcp_context_create(int flags,
41 if (result != ISC_R_SUCCESS)
42 goto cleanup;
43
44- result = isc_app_ctxstart(dhcp_gbl_ctx.actx);
45- if (result != ISC_R_SUCCESS)
46- return (result);
47- dhcp_gbl_ctx.actx_started = ISC_TRUE;
48-
49- /* Not all OSs support suppressing SIGPIPE through socket
50- * options, so set the sigal action to be ignore. This allows
51- * broken connections to fail gracefully with EPIPE on writes */
52- handle_signal(SIGPIPE, SIG_IGN);
53-
54 result = isc_taskmgr_createinctx(dhcp_gbl_ctx.mctx,
55 dhcp_gbl_ctx.actx,
56 1, 0,
57@@ -217,6 +207,21 @@ dhcp_context_create(int flags,
58 result = isc_task_create(dhcp_gbl_ctx.taskmgr, 0, &dhcp_gbl_ctx.task);
59 if (result != ISC_R_SUCCESS)
60 goto cleanup;
61+
62+ result = isc_app_ctxstart(dhcp_gbl_ctx.actx);
63+ if (result != ISC_R_SUCCESS)
64+ return (result);
65+ dhcp_gbl_ctx.actx_started = ISC_TRUE;
66+
67+ /* Not all OSs support suppressing SIGPIPE through socket
68+ * options, so set the sigal action to be ignore. This allows
69+ * broken connections to fail gracefully with EPIPE on writes */
70+ handle_signal(SIGPIPE, SIG_IGN);
71+
72+ /* Reset handlers installed by isc_app_ctxstart()
73+ * to default for control-c and kill */
74+ handle_signal(SIGINT, SIG_DFL);
75+ handle_signal(SIGTERM, SIG_DFL);
76 }
77
78 #if defined (NSUPDATE)
79--
801.8.3.1
81
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0012-dhcp-correct-the-intention-for-xml2-lib-search.patch b/meta/recipes-connectivity/dhcp/dhcp/0012-dhcp-correct-the-intention-for-xml2-lib-search.patch
index 2d3af9db0b..39ba65fbc4 100644
--- a/meta/recipes-connectivity/dhcp/dhcp/0012-dhcp-correct-the-intention-for-xml2-lib-search.patch
+++ b/meta/recipes-connectivity/dhcp/dhcp/0012-dhcp-correct-the-intention-for-xml2-lib-search.patch
@@ -19,11 +19,11 @@ Signed-off-by: Awais Belal <awais_belal@mentor.com>
19 configure.ac | 2 +- 19 configure.ac | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-) 20 1 file changed, 1 insertion(+), 1 deletion(-)
21 21
22diff --git a/configure.ac b/configure.ac 22Index: dhcp-4.4.1/configure.ac
23index bfe988a..f0459e6 100644 23===================================================================
24--- a/configure.ac 24--- dhcp-4.4.1.orig/configure.ac
25+++ b/configure.ac 25+++ dhcp-4.4.1/configure.ac
26@@ -608,7 +608,7 @@ AC_ARG_WITH(libxml2, 26@@ -647,7 +647,7 @@ AC_ARG_WITH(libxml2,
27 with_libxml2="$withval", with_libxml2="no") 27 with_libxml2="$withval", with_libxml2="no")
28 28
29 if test x$with_libxml2 != xno; then 29 if test x$with_libxml2 != xno; then
@@ -32,6 +32,3 @@ index bfe988a..f0459e6 100644
32 [if test x$with_libxml2 != xauto; then 32 [if test x$with_libxml2 != xauto; then
33 AC_MSG_FAILURE([*** Cannot find xmlTextWriterStartElement with -lxml2 and libxml2 was requested]) 33 AC_MSG_FAILURE([*** Cannot find xmlTextWriterStartElement with -lxml2 and libxml2 was requested])
34 fi]) 34 fi])
35--
362.11.1
37
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0013-fixup_use_libbind.patch b/meta/recipes-connectivity/dhcp/dhcp/0013-fixup_use_libbind.patch
new file mode 100644
index 0000000000..fcec010bd0
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/0013-fixup_use_libbind.patch
@@ -0,0 +1,64 @@
1lib and include path is hardcoded for use_libbind
2
3use libdir and includedir vars
4
5Upstream-Status: Pending
6Signed-off-by: Armin Kuster <akuster808@gmail.com>
7
8Index: dhcp-4.4.1/configure.ac+lt
9===================================================================
10--- dhcp-4.4.1.orig/configure.ac+lt
11+++ dhcp-4.4.1/configure.ac+lt
12@@ -801,22 +801,22 @@ no)
13 if test ! -d "$use_libbind"; then
14 AC_MSG_ERROR([Cannot find bind directory at $use_libbind])
15 fi
16- if test ! -d "$use_libbind/include" -o \
17- ! -f "$use_libbind/include/isc/buffer.h"
18+ if test ! -d "$use_libbind/$includedir" -o \
19+ ! -f "$use_libbind/$includedir/isc/buffer.h"
20 then
21- AC_MSG_ERROR([Cannot find bind includes at $use_libbind/include])
22+ AC_MSG_ERROR([Cannot find bind includes at $use_libbind/$includedir])
23 fi
24- if test ! -d "$use_libbind/lib" -o \
25- \( ! -f "$use_libbind/lib/libisc.a" -a \
26- ! -f "$use_libbind/lib/libisc.la" \)
27+ if test ! -d "$use_libbind/$libdir" -o \
28+ \( ! -f "$use_libbind/$libdir/libisc.a" -a \
29+ ! -f "$use_libbind/$libdir/libisc.la" \)
30 then
31- AC_MSG_ERROR([Cannot find bind libraries at $use_libbind/lib])
32+ AC_MSG_ERROR([Cannot find bind libraries at $use_libbind/$libdir])
33 fi
34 BINDDIR="$use_libbind"
35- BINDLIBIRSDIR="$BINDDIR/lib"
36- BINDLIBDNSDIR="$BINDDIR/lib"
37- BINDLIBISCCFGDIR="$BINDDIR/lib"
38- BINDLIBISCDIR="$BINDDIR/lib"
39+ BINDLIBIRSDIR="$BINDDIR/$libdir"
40+ BINDLIBDNSDIR="$BINDDIR/$libdir"
41+ BINDLIBISCCFGDIR="$BINDDIR/$libdir"
42+ BINDLIBISCDIR="$BINDDIR/$libdir"
43 DISTCHECK_LIBBIND_CONFIGURE_FLAG="--with-libbind=$use_libbind"
44 ;;
45 esac
46@@ -856,14 +856,14 @@ AC_ARG_ENABLE(libtool,
47
48 if test "$use_libbind" != "no"; then
49 if test "$want_libtool" = "yes" -a \
50- ! -f "$use_libbind/lib/libisc.la"
51+ ! -f "$use_libbind/$libdir/libisc.la"
52 then
53- AC_MSG_ERROR([Cannot find dynamic libraries at $use_libbind/lib])
54+ AC_MSG_ERROR([Cannot find dynamic libraries at $use_libbind/$libdir])
55 fi
56 if test "$want_libtool" = "no" -a \
57- ! -f "$use_libbind/lib/libisc.a"
58+ ! -f "$use_libbind/$libdir/libisc.a"
59 then
60- AC_MSG_ERROR([Cannot find static libraries at $use_libbind/lib])
61+ AC_MSG_ERROR([Cannot find static libraries at $use_libbind/$libdir])
62 fi
63 fi
64
diff --git a/meta/recipes-connectivity/dhcp/dhcp/CVE-2017-3144.patch b/meta/recipes-connectivity/dhcp/dhcp/CVE-2017-3144.patch
deleted file mode 100644
index 2b2688cb2f..0000000000
--- a/meta/recipes-connectivity/dhcp/dhcp/CVE-2017-3144.patch
+++ /dev/null
@@ -1,74 +0,0 @@
1From 8cfdedee369c26d2869b6ec4a64460b5f5a30934 Mon Sep 17 00:00:00 2001
2From: Thomas Markwalder <tmark@isc.org>
3Date: Thu, 7 Dec 2017 11:39:30 -0500
4Subject: [PATCH] [v4_3] Plugs a socket descriptor leak in OMAPI
5
6 Merges in rt46767.
7
8Upstream-Status: Backport
9[https://source.isc.org/cgi-bin/gitweb.cgi?p=dhcp.git;a=commitdiff;h=5097bc0559f592683faac1f67bf350e1bddf6ed4]
10
11CVE: CVE-2017-3144
12
13Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
14Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
15---
16 RELNOTES | 7 +++++++
17 omapip/buffer.c | 9 +++++++++
18 omapip/message.c | 2 +-
19 3 files changed, 17 insertions(+), 1 deletion(-)
20
21diff --git a/RELNOTES b/RELNOTES
22index dd40aaf..3741b80 100644
23--- a/RELNOTES
24+++ b/RELNOTES
25@@ -66,6 +66,13 @@ We welcome comments from DHCP users, about this or anything else we do.
26 Email Vicky Risk, Product Manager at vicky@isc.org or discuss on
27 dhcp-users@lists.isc.org.
28
29+- Plugged a socket descriptor leak in OMAPI, that can occur when there is
30+ data pending to be written to an OMAPI connection, when the connection
31+ is closed by the reader. Thanks to Pavel Zhukov at RedHat for bringing
32+ this issue to our attention and whose patch helped guide us in the right
33+ direction.
34+ [ISc-Bugs #46767]
35+
36 Changes since 4.3.6b1
37
38 - None
39diff --git a/omapip/buffer.c b/omapip/buffer.c
40index f7fdc32..809034d 100644
41--- a/omapip/buffer.c
42+++ b/omapip/buffer.c
43@@ -566,6 +566,15 @@ isc_result_t omapi_connection_writer (omapi_object_t *h)
44 omapi_buffer_dereference (&buffer, MDL);
45 }
46 }
47+
48+ /* If we had data left to write when we're told to disconnect,
49+ * we need recall disconnect, now that we're done writing.
50+ * See rt46767. */
51+ if (c->out_bytes == 0 && c->state == omapi_connection_disconnecting) {
52+ omapi_disconnect (h, 1);
53+ return ISC_R_SHUTTINGDOWN;
54+ }
55+
56 return ISC_R_SUCCESS;
57 }
58
59diff --git a/omapip/message.c b/omapip/message.c
60index 59ccdc2..21bcfc3 100644
61--- a/omapip/message.c
62+++ b/omapip/message.c
63@@ -339,7 +339,7 @@ isc_result_t omapi_message_unregister (omapi_object_t *mo)
64 }
65
66 #ifdef DEBUG_PROTOCOL
67-static const char *omapi_message_op_name(int op) {
68+const char *omapi_message_op_name(int op) {
69 switch (op) {
70 case OMAPI_OP_OPEN: return "OMAPI_OP_OPEN";
71 case OMAPI_OP_REFRESH: return "OMAPI_OP_REFRESH";
72--
732.7.4
74
diff --git a/meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb b/meta/recipes-connectivity/dhcp/dhcp_4.4.1.bb
index cc135493e5..159abbc405 100644
--- a/meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb
+++ b/meta/recipes-connectivity/dhcp/dhcp_4.4.1.bb
@@ -7,16 +7,15 @@ SRC_URI += "file://0001-define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.pat
7 file://0005-dhcp-client-fix-invoke-dhclient-script-failed-on-Rea.patch \ 7 file://0005-dhcp-client-fix-invoke-dhclient-script-failed-on-Rea.patch \
8 file://0006-site.h-enable-gentle-shutdown.patch \ 8 file://0006-site.h-enable-gentle-shutdown.patch \
9 file://0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch \ 9 file://0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch \
10 file://0008-tweak-to-support-external-bind.patch \
11 file://0009-remove-dhclient-script-bash-dependency.patch \ 10 file://0009-remove-dhclient-script-bash-dependency.patch \
12 file://0010-build-shared-libs.patch \
13 file://0011-Moved-the-call-to-isc_app_ctxstart-to-not-get-signal.patch \
14 file://0012-dhcp-correct-the-intention-for-xml2-lib-search.patch \ 11 file://0012-dhcp-correct-the-intention-for-xml2-lib-search.patch \
15 file://CVE-2017-3144.patch \ 12 file://0013-fixup_use_libbind.patch \
16 " 13"
17 14
18SRC_URI[md5sum] = "afa6e9b3eb7539ea048421a82c668adc" 15SRC_URI[md5sum] = "18c7f4dcbb0a63df25098216d47b1ede"
19SRC_URI[sha256sum] = "a41eaf6364f1377fe065d35671d9cf82bbbc8f21207819b2b9f33f652aec6f1b" 16SRC_URI[sha256sum] = "2a22508922ab367b4af4664a0472dc220cc9603482cf3c16d9aff14f3a76b608"
17
18LDFLAGS_append = " -pthread"
20 19
21PACKAGECONFIG ?= "" 20PACKAGECONFIG ?= ""
22PACKAGECONFIG[bind-httpstats] = "--with-libxml2,--without-libxml2,libxml2" 21PACKAGECONFIG[bind-httpstats] = "--with-libxml2,--without-libxml2,libxml2"