- temporary revert ISC 2119 change and add "libbind-errno" patch (#254501)

again
This commit is contained in:
Adam Tkac 2007-09-03 08:23:14 +00:00
parent f7ddf08324
commit 10a7d95225
3 changed files with 91 additions and 1 deletions

View File

@ -0,0 +1,56 @@
diff -up bind-9.5.0a6/lib/bind/resolv/res_init.c.2119 bind-9.5.0a6/lib/bind/resolv/res_init.c
--- bind-9.5.0a6/lib/bind/resolv/res_init.c.2119 2007-07-09 03:43:23.000000000 +0200
+++ bind-9.5.0a6/lib/bind/resolv/res_init.c 2007-09-03 10:10:24.000000000 +0200
@@ -166,9 +166,7 @@ __res_vinit(res_state statp, int preinit
#endif
int dots;
union res_sockaddr_union u[2];
- int maxns = MAXNS;
- RES_SET_H_ERRNO(statp, 0);
if (statp->_u._ext.ext != NULL)
res_ndestroy(statp);
@@ -218,22 +216,8 @@ __res_vinit(res_state statp, int preinit
statp->_u._ext.ext->nsaddrs[0].sin = statp->nsaddr;
strcpy(statp->_u._ext.ext->nsuffix, "ip6.arpa");
strcpy(statp->_u._ext.ext->nsuffix2, "ip6.int");
- } else {
- /*
- * Historically res_init() rarely, if at all, failed.
- * Examples and applications exist which do not check
- * our return code. Furthermore several applications
- * simply call us to get the systems domainname. So
- * rather then immediately fail here we store the
- * failure, which is returned later, in h_errno. And
- * prevent the collection of 'nameserver' information
- * by setting maxns to 0. Thus applications that fail
- * to check our return code wont be able to make
- * queries anyhow.
- */
- RES_SET_H_ERRNO(statp, NETDB_INTERNAL);
- maxns = 0;
- }
+ } else
+ return (-1);
#ifdef RESOLVSORT
statp->nsort = 0;
#endif
@@ -362,7 +346,7 @@ __res_vinit(res_state statp, int preinit
continue;
}
/* read nameservers to query */
- if (MATCH(buf, "nameserver") && nserv < maxns) {
+ if (MATCH(buf, "nameserver") && nserv < MAXNS) {
struct addrinfo hints, *ai;
char sbuf[NI_MAXSERV];
const size_t minsiz =
@@ -498,7 +482,7 @@ __res_vinit(res_state statp, int preinit
if ((cp = getenv("RES_OPTIONS")) != NULL)
res_setoptions(statp, cp, "env");
statp->options |= RES_INIT;
- return (statp->res_h_errno);
+ return (0);
}
static void

View File

@ -0,0 +1,26 @@
--- bind-9.3.1rc1/lib/bind/irs/irs_data.c.fix_h_errno 2004-11-29 20:15:43.000000000 -0500
+++ bind-9.3.1rc1/lib/bind/irs/irs_data.c 2005-03-09 21:05:52.000000000 -0500
@@ -222,12 +222,7 @@
void
__h_errno_set(struct __res_state *res, int err) {
-
-#if (__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)
- res->res_h_errno = err;
-#else
h_errno = res->res_h_errno = err;
-#endif
}
#endif /*__BIND_NOSTATIC*/
--- bind-9.3.1rc1/lib/bind/resolv/res_query.c.fix_h_errno 2004-03-16 07:34:19.000000000 -0500
+++ bind-9.3.1rc1/lib/bind/resolv/res_query.c 2005-03-09 21:53:34.000000000 -0500
@@ -192,6 +192,8 @@
}
return (-1);
}
+ if( n > 0 )
+ RES_SET_H_ERRNO(statp,0);
return (n);
}

View File

@ -21,7 +21,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
Name: bind
License: ISC
Version: 9.5.0
Release: 11.1.%{RELEASEVER}%{?dist}
Release: 11.2.%{RELEASEVER}%{?dist}
Epoch: 32
Url: http://www.isc.org/products/BIND/
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -65,6 +65,8 @@ Patch69: bind-9.5.0-generate-xml.patch
Patch71: bind-9.5-overflow.patch
Patch72: bind-9.5-dlz-64bit.patch
Patch75: bind-9.5-update.patch
Patch76: bind-9.5-2119_revert.patch
Patch77: bind-9.5-fix_h_errno.patch
# SDB patches
Patch11: bind-9.3.2b2-sdbsrc.patch
@ -246,6 +248,8 @@ cp -fp contrib/dbus/{dbus_mgr.h,dbus_service.h} bin/named/include/named
%endif
%patch73 -p1 -b .libidn
%patch75 -p1 -b .update
%patch76 -p1 -b .2119
%patch77 -p1 -b .errno
:;
@ -642,6 +646,10 @@ rm -rf ${RPM_BUILD_ROOT}
%{_sbindir}/bind-chroot-admin
%changelog
* Mon Sep 03 2007 Adam Tkac <atkac redhat com> 32:9.5.0-11.2.a6
- temporary revert ISC 2119 change and add "libbind-errno" patch
(#254501) again
* Thu Aug 23 2007 Adam Tkac <atkac redhat com> 32:9.5.0-11.1.a6
- removed end dots from Summary sections (skasal@redhat.com)
- fixed wrong file creation by autotools patch (skasal@redhat.com)