[cups/f13/master] Handle EAI_NONAME when resolving hostnames (bug #617208).

Tim Waugh twaugh at fedoraproject.org
Mon Jan 10 16:31:14 UTC 2011


commit ac3f59889c94081a8273702abc5f2d7abffb9756
Author: Tim Waugh <twaugh at redhat.com>
Date:   Mon Jan 10 15:35:08 2011 +0000

    Handle EAI_NONAME when resolving hostnames (bug #617208).

 cups-EAI_AGAIN.patch |   12 ------------
 cups-res_init.patch  |   24 +++++++++++++++++++-----
 cups.spec            |    8 ++++----
 3 files changed, 23 insertions(+), 21 deletions(-)
---
diff --git a/cups-res_init.patch b/cups-res_init.patch
index 22c75ba..5dccf02 100644
--- a/cups-res_init.patch
+++ b/cups-res_init.patch
@@ -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
diff --git a/cups.spec b/cups.spec
index 696e666..904e0f7 100644
--- a/cups.spec
+++ b/cups.spec
@@ -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 at redhat.com> 1:1.4.6-2
+- Handle EAI_NONAME when resolving hostnames (bug #617208).
+
 * Fri Jan 07 2011 Jiri Popelka <jpopelka at redhat.com> 1:1.4.6-1
 - 1.4.6.
 


More information about the scm-commits mailing list