- bind-9.5-2119_revert.patch and bind-9.5-fix_h_errno.patch are obsoleted

by upstream bind-9.5-_res_errno.patch
This commit is contained in:
Adam Tkac 2007-09-06 11:36:13 +00:00
parent 76b6450081
commit 89803af2ce
4 changed files with 40 additions and 87 deletions

View File

@ -1,56 +0,0 @@
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

33
bind-9.5-_res_errno.patch Normal file
View File

@ -0,0 +1,33 @@
Written-by: Mark Andrews <Mark_Andrews isc org> (upstream)
Reviewed-by: Adam Tkac <atkac redhat com>
diff -up bind-9.5.0a6/lib/bind/resolv/res_data.c._res_errno bind-9.5.0a6/lib/bind/resolv/res_data.c
--- bind-9.5.0a6/lib/bind/resolv/res_data.c._res_errno 2007-09-06 09:26:29.000000000 +0200
+++ bind-9.5.0a6/lib/bind/resolv/res_data.c 2007-09-06 09:28:14.000000000 +0200
@@ -40,7 +40,6 @@ static const char rcsid[] = "$Id: res_da
#include <unistd.h>
#include "port_after.h"
-#undef _res
const char *_res_opcodes[] = {
"QUERY",
@@ -70,6 +69,7 @@ const char *_res_sectioncodes[] = {
};
#endif
+#undef _res
#ifndef __BIND_NOSTATIC
struct __res_state _res
# if defined(__BIND_RES_TEXT)
@@ -77,6 +77,10 @@ struct __res_state _res
# endif
;
+#if defined(DO_PTHREADS) || defined(__linux)
+#define _res (*__res_state())
+#endif
+
/* Proto. */
int res_ourserver_p(const res_state, const struct sockaddr_in *);

View File

@ -1,26 +0,0 @@
--- 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.9.%{RELEASEVER}%{?dist}
Release: 12.%{RELEASEVER}%{?dist}
Epoch: 32
Url: http://www.isc.org/products/BIND/
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -65,9 +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
Patch78: bind-9.5-pool_badfree.patch
Patch79: bind-9.5-_res_errno.patch
# SDB patches
Patch11: bind-9.3.2b2-sdbsrc.patch
@ -249,9 +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
%patch78 -p1 -b .badfree
%patch79 -p1 -b .errno
:;
@ -648,6 +646,10 @@ rm -rf ${RPM_BUILD_ROOT}
%{_sbindir}/bind-chroot-admin
%changelog
* Thu Sep 06 2007 Adam Tkac <atkac redhat com> 32:9.5.0-12.a6
- bind-9.5-2119_revert.patch and bind-9.5-fix_h_errno.patch are
obsoleted by upstream bind-9.5-_res_errno.patch
* Wed Sep 05 2007 Adam Tkac <atkac redhat com> 32:9.5.0-11.9.a6
- fixed wrong resolver's dispatch pool cleanup (#275011, patch from
tmraz redhat com)