From ac3f59889c94081a8273702abc5f2d7abffb9756 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Jan 10 2011 16:12:36 +0000 Subject: Handle EAI_NONAME when resolving hostnames (bug #617208). --- diff --git a/cups-EAI_AGAIN.patch b/cups-EAI_AGAIN.patch deleted file mode 100644 index 033e7f8..0000000 --- a/cups-EAI_AGAIN.patch +++ /dev/null @@ -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)); 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 1:1.4.6-2 +- Handle EAI_NONAME when resolving hostnames (bug #617208). + * Fri Jan 07 2011 Jiri Popelka 1:1.4.6-1 - 1.4.6.