From 482e5e40412ace2fb1075b27891a37e0097ccd9e Mon Sep 17 00:00:00 2001 From: Paul Wouters Date: Mon, 5 Jan 2009 13:19:32 +0000 Subject: [PATCH] - Modified scandir patch to silently fail when wildcard matches nothing - Patch to allow unbound-checkconf to find empty wildcard matches --- unbound-1.1-checkconf.patch | 15 +++++++++++++++ unbound-1.1-scandir.patch | 2 +- unbound.spec | 8 +++++++- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 unbound-1.1-checkconf.patch diff --git a/unbound-1.1-checkconf.patch b/unbound-1.1-checkconf.patch new file mode 100644 index 0000000..dc0ab86 --- /dev/null +++ b/unbound-1.1-checkconf.patch @@ -0,0 +1,15 @@ +Index: smallapp/unbound-checkconf.c +=================================================================== +--- smallapp/unbound-checkconf.c (revision 1404) ++++ smallapp/unbound-checkconf.c (working copy) +@@ -258,7 +258,9 @@ + { + struct config_strlist* p; + for(p=list; p; p=p->next) { +- check_chroot_string(desc, &p->str, chrootdir, cfg); ++ /* skip wildcard checks, may fail */ ++ if(strstr(p->str,"*") == NULL) ++ check_chroot_string(desc, &p->str, chrootdir, cfg); + } + } + diff --git a/unbound-1.1-scandir.patch b/unbound-1.1-scandir.patch index e582a31..b07d91f 100644 --- a/unbound-1.1-scandir.patch +++ b/unbound-1.1-scandir.patch @@ -38,7 +38,7 @@ Index: validator/val_anchor.c + free(fnameb); + free(fnamef); + free(globmatch); -+ return 0; ++ return 1; + } + else { + while(n--) { diff --git a/unbound.spec b/unbound.spec index 9915a77..aa1624d 100644 --- a/unbound.spec +++ b/unbound.spec @@ -1,7 +1,7 @@ Summary: Validating, recursive, and caching DNS(SEC) resolver Name: unbound Version: 1.1.1 -Release: 6%{?dist} +Release: 7%{?dist} License: BSD Url: http://www.nlnetlabs.nl/unbound/ Source: http://www.unbound.net/downloads/%{name}-%{version}.tar.gz @@ -9,6 +9,7 @@ Source1: unbound.init Source2: unbound.conf Source3: unbound.munin Patch0: unbound-1.1-scandir.patch +Patch1: unbound-1.1-checkconf.patch Group: System Environment/Daemons BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: flex, openssl-devel, ldns-devel >= 1.4.0, libevent-devel @@ -63,6 +64,7 @@ Contains libraries used by the unbound server and client applications %prep %setup -q %patch0 -p0 +%patch1 -p0 %build %configure --with-ldns= --with-libevent --with-pthreads --with-ssl \ @@ -147,6 +149,10 @@ fi %postun libs -p /sbin/ldconfig %changelog +* Mon Jan 5 2009 Paul Wouters - 1.1.1-7 +- Modified scandir patch to silently fail when wildcard matches nothing +- Patch to allow unbound-checkconf to find empty wildcard matches + * Mon Jan 5 2009 Paul Wouters - 1.1.1-6 - Added scandir patch for trusted-keys-file: option, which is used to load multiple dnssec keys in bind file format