From 3703c7c026d8eb0af75d6cdd0a3e7209ad03d4a6 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Wed, 15 Apr 2020 19:27:10 +0300 Subject: [PATCH] dnsmasq: update to 2.81. --- srcpkgs/dnsmasq/patches/CVE-2019-14834.patch | 45 -------------------- srcpkgs/dnsmasq/patches/nettle35.patch | 42 ------------------ srcpkgs/dnsmasq/template | 7 +-- 3 files changed, 4 insertions(+), 90 deletions(-) delete mode 100644 srcpkgs/dnsmasq/patches/CVE-2019-14834.patch delete mode 100644 srcpkgs/dnsmasq/patches/nettle35.patch diff --git a/srcpkgs/dnsmasq/patches/CVE-2019-14834.patch b/srcpkgs/dnsmasq/patches/CVE-2019-14834.patch deleted file mode 100644 index 77748e31bdc..00000000000 --- a/srcpkgs/dnsmasq/patches/CVE-2019-14834.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 69bc94779c2f035a9fffdb5327a54c3aeca73ed5 Mon Sep 17 00:00:00 2001 -From: Simon Kelley -Date: Wed, 14 Aug 2019 20:44:50 +0100 -Subject: [PATCH] Fix memory leak in helper.c - -Thanks to Xu Mingjie for spotting this. ---- - src/helper.c | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -diff --git a/src/helper.c b/src/helper.c -index 33ba120..c392eec 100644 ---- src/helper.c -+++ src/helper.c -@@ -80,7 +80,8 @@ int create_helper(int event_fd, int err_fd, uid_t uid, gid_t gid, long max_fd) - pid_t pid; - int i, pipefd[2]; - struct sigaction sigact; -- -+ unsigned char *alloc_buff = NULL; -+ - /* create the pipe through which the main program sends us commands, - then fork our process. */ - if (pipe(pipefd) == -1 || !fix_fd(pipefd[1]) || (pid = fork()) == -1) -@@ -186,11 +187,16 @@ int create_helper(int event_fd, int err_fd, uid_t uid, gid_t gid, long max_fd) - struct script_data data; - char *p, *action_str, *hostname = NULL, *domain = NULL; - unsigned char *buf = (unsigned char *)daemon->namebuff; -- unsigned char *end, *extradata, *alloc_buff = NULL; -+ unsigned char *end, *extradata; - int is6, err = 0; - int pipeout[2]; - -- free(alloc_buff); -+ /* Free rarely-allocated memory from previous iteration. */ -+ if (alloc_buff) -+ { -+ free(alloc_buff); -+ alloc_buff = NULL; -+ } - - /* we read zero bytes when pipe closed: this is our signal to exit */ - if (!read_write(pipefd[0], (unsigned char *)&data, sizeof(data), 1)) --- -1.7.10.4 diff --git a/srcpkgs/dnsmasq/patches/nettle35.patch b/srcpkgs/dnsmasq/patches/nettle35.patch deleted file mode 100644 index 90e83d2e00d..00000000000 --- a/srcpkgs/dnsmasq/patches/nettle35.patch +++ /dev/null @@ -1,42 +0,0 @@ -From: Vladislav Grishenko -Date: Wed, 26 Jun 2019 15:27:11 +0000 (+0500) -Subject: Fix build with libnettle 3.5 -X-Git-Url: http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commitdiff_plain;h=ab73a746a0d6fcac2e682c5548eeb87fb9c9c82e;hp=69bc94779c2f035a9fffdb5327a54c3aeca73ed5 - -Fix build with libnettle 3.5 ---- - -diff --git a/src/crypto.c b/src/crypto.c -index ebb871e..fecc64a 100644 ---- src/crypto.c -+++ src/crypto.c -@@ -275,6 +275,10 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len - static struct ecc_point *key_256 = NULL, *key_384 = NULL; - static mpz_t x, y; - static struct dsa_signature *sig_struct; -+#if NETTLE_VERSION_MAJOR == 3 && NETTLE_VERSION_MINOR < 4 -+#define nettle_get_secp_256r1() (&nettle_secp_256r1) -+#define nettle_get_secp_384r1() (&nettle_secp_384r1) -+#endif - - if (!sig_struct) - { -@@ -294,7 +298,7 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len - if (!(key_256 = whine_malloc(sizeof(struct ecc_point)))) - return 0; - -- nettle_ecc_point_init(key_256, &nettle_secp_256r1); -+ nettle_ecc_point_init(key_256, nettle_get_secp_256r1()); - } - - key = key_256; -@@ -307,7 +311,7 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len - if (!(key_384 = whine_malloc(sizeof(struct ecc_point)))) - return 0; - -- nettle_ecc_point_init(key_384, &nettle_secp_384r1); -+ nettle_ecc_point_init(key_384, nettle_get_secp_384r1()); - } - - key = key_384; - diff --git a/srcpkgs/dnsmasq/template b/srcpkgs/dnsmasq/template index a4e6be72e78..c142d48d343 100644 --- a/srcpkgs/dnsmasq/template +++ b/srcpkgs/dnsmasq/template @@ -1,7 +1,7 @@ # Template file for 'dnsmasq' pkgname=dnsmasq -version=2.80 -revision=7 +version=2.81 +revision=1 conf_files="/etc/dnsmasq.conf" hostmakedepends="pkg-config" makedepends="dbus-devel libcap-devel libidn2-devel $(vopt_if dnssec nettle-devel)" @@ -9,8 +9,9 @@ short_desc="Lightweight, easy to configure DNS forwarder and DHCP server" maintainer="Orphaned " license="GPL-2.0-or-later" homepage="http://www.thekelleys.org.uk/dnsmasq/doc.html" +changelog="http://www.thekelleys.org.uk/dnsmasq/CHANGELOG" distfiles="http://www.thekelleys.org.uk/${pkgname}/${pkgname}-${version}.tar.gz" -checksum=9e4a58f816ce0033ce383c549b7d4058ad9b823968d352d2b76614f83ea39adc +checksum=3c28c68c6c2967c3a96e9b432c0c046a5df17a426d3a43cffe9e693cf05804d0 system_accounts="dnsmasq" dnsmasq_homedir="/var/chroot"