Handle EAI_NONAME when resolving hostnames (bug #617208).
This commit is contained in:
parent
a448e5f662
commit
ac3f59889c
@ -1,12 +0,0 @@
|
||||
diff -up cups-1.4.2/cups/http-addr.c.EAI_AGAIN cups-1.4.2/cups/http-addr.c
|
||||
--- cups-1.4.2/cups/http-addr.c.EAI_AGAIN 2010-02-23 10:39:35.038261623 +0000
|
||||
+++ cups-1.4.2/cups/http-addr.c 2010-02-23 10:41:14.684385991 +0000
|
||||
@@ -253,7 +253,7 @@ httpAddrLookup(
|
||||
|
||||
if (error)
|
||||
{
|
||||
- if (error == EAI_FAIL)
|
||||
+ if (error == EAI_FAIL || error == EAI_AGAIN || error == EAI_NODATA)
|
||||
cg->need_res_init = 1;
|
||||
|
||||
return (httpAddrString(addr, name, namelen));
|
@ -1,12 +1,26 @@
|
||||
diff -up cups-1.4b2-svn8404/cups/http-addrlist.c.res_init cups-1.4b2-svn8404/cups/http-addrlist.c
|
||||
--- cups-1.4b2-svn8404/cups/http-addrlist.c.res_init 2009-03-23 17:41:03.000000000 +0000
|
||||
+++ cups-1.4b2-svn8404/cups/http-addrlist.c 2009-03-23 17:41:26.000000000 +0000
|
||||
@@ -373,7 +373,7 @@ httpAddrGetList(const char *hostname, /*
|
||||
diff -up cups-1.4.6/cups/http-addr.c.res_init cups-1.4.6/cups/http-addr.c
|
||||
--- cups-1.4.6/cups/http-addr.c.res_init 2009-04-20 22:37:14.000000000 +0100
|
||||
+++ cups-1.4.6/cups/http-addr.c 2011-01-10 16:08:49.506358955 +0000
|
||||
@@ -253,7 +253,8 @@ httpAddrLookup(
|
||||
|
||||
if (error)
|
||||
{
|
||||
- if (error == EAI_FAIL)
|
||||
+ if (error == EAI_FAIL || error == EAI_AGAIN || error == EAI_NODATA ||
|
||||
+ error == EAI_NONAME)
|
||||
cg->need_res_init = 1;
|
||||
|
||||
return (httpAddrString(addr, name, namelen));
|
||||
diff -up cups-1.4.6/cups/http-addrlist.c.res_init cups-1.4.6/cups/http-addrlist.c
|
||||
--- cups-1.4.6/cups/http-addrlist.c.res_init 2009-04-20 22:37:14.000000000 +0100
|
||||
+++ cups-1.4.6/cups/http-addrlist.c 2011-01-10 16:08:22.375947909 +0000
|
||||
@@ -373,7 +373,8 @@ httpAddrGetList(const char *hostname, /*
|
||||
|
||||
freeaddrinfo(results);
|
||||
}
|
||||
- else if (error == EAI_FAIL)
|
||||
+ else if (error == EAI_FAIL || error == EAI_AGAIN || error == EAI_NODATA)
|
||||
+ else if (error == EAI_FAIL || error == EAI_AGAIN || error == EAI_NODATA ||
|
||||
+ error == EAI_NONAME)
|
||||
cg->need_res_init = 1;
|
||||
|
||||
#else
|
||||
|
@ -8,7 +8,7 @@
|
||||
Summary: Common Unix Printing System
|
||||
Name: cups
|
||||
Version: 1.4.6
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: GPLv2
|
||||
Group: System Environment/Daemons
|
||||
Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2
|
||||
@ -59,7 +59,6 @@ Patch25: cups-str3382.patch
|
||||
Patch26: cups-force-gnutls.patch
|
||||
Patch27: cups-serialize-gnutls.patch
|
||||
Patch29: cups-0755.patch
|
||||
Patch30: cups-EAI_AGAIN.patch
|
||||
Patch31: cups-hostnamelookups.patch
|
||||
Patch33: cups-snmp-quirks.patch
|
||||
Patch34: cups-hp-deviceid-oid.patch
|
||||
@ -258,8 +257,6 @@ module.
|
||||
%patch27 -p1 -b .serialize-gnutls
|
||||
# Use mode 0755 for binaries and libraries where appropriate.
|
||||
%patch29 -p1 -b .0755
|
||||
# Re-initialise the resolver on failure in httpAddrLookup().
|
||||
%patch30 -p1 -b .EAI_AGAIN
|
||||
# Use numeric addresses for interfaces unless HostNameLookups are
|
||||
# turned on (bug #583054).
|
||||
%patch31 -p1 -b .hostnamelookups
|
||||
@ -576,6 +573,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{php_extdir}/phpcups.so
|
||||
|
||||
%changelog
|
||||
* Mon Jan 10 2011 Tim Waugh <twaugh@redhat.com> 1:1.4.6-2
|
||||
- Handle EAI_NONAME when resolving hostnames (bug #617208).
|
||||
|
||||
* Fri Jan 07 2011 Jiri Popelka <jpopelka@redhat.com> 1:1.4.6-1
|
||||
- 1.4.6.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user