packages: cups/cups.spec, cups/cups-auth.patch (NEW) - rel 4 - fix client a...

baggins baggins at pld-linux.org
Fri Aug 5 21:59:09 CEST 2011


Author: baggins                      Date: Fri Aug  5 19:59:09 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 4
- fix client authentication, empty auth -> try again, and ignore HTML
  content in server response

---- Files affected:
packages/cups:
   cups.spec (1.304 -> 1.305) , cups-auth.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/cups/cups.spec
diff -u packages/cups/cups.spec:1.304 packages/cups/cups.spec:1.305
--- packages/cups/cups.spec:1.304	Fri Aug  5 13:20:31 2011
+++ packages/cups/cups.spec	Fri Aug  5 21:59:04 2011
@@ -18,7 +18,7 @@
 Summary(pt_BR.UTF-8):	Sistema Unix de Impressão
 Name:		cups
 Version:	1.5.0
-Release:	3
+Release:	4
 Epoch:		1
 License:	LGPL v2 (libraries), GPL v2 (the rest) + openssl exception
 Group:		Applications/Printing
@@ -44,6 +44,7 @@
 Patch11:	%{name}-usb.patch
 Patch12:	%{name}-desktop.patch
 Patch13:	%{name}-ssl-segfault.patch
+Patch14:	%{name}-auth.patch
 URL:		http://www.cups.org/
 BuildRequires:	acl-devel
 BuildRequires:	autoconf >= 2.60
@@ -314,6 +315,7 @@
 #%patch11 -p1
 %patch12 -p1
 %patch13 -p1
+%patch14 -p1
 
 %build
 %{__aclocal} -I config-scripts
@@ -734,6 +736,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.305  2011/08/05 19:59:04  baggins
+- rel 4
+- fix client authentication, empty auth -> try again, and ignore HTML
+  content in server response
+
 Revision 1.304  2011/08/05 11:20:31  baggins
 - really eneble debug when built with -debug
 

================================================================
Index: packages/cups/cups-auth.patch
diff -u /dev/null packages/cups/cups-auth.patch:1.1
--- /dev/null	Fri Aug  5 21:59:09 2011
+++ packages/cups/cups-auth.patch	Fri Aug  5 21:59:04 2011
@@ -0,0 +1,43 @@
+diff -ur cups-1.5.0/cups/auth.c cups-1.5.0-auth/cups/auth.c
+--- cups-1.5.0/cups/auth.c	2011-05-20 20:22:33.000000000 +0200
++++ cups-1.5.0-auth/cups/auth.c	2011-08-05 19:39:19.587496832 +0200
+@@ -276,8 +278,7 @@
+   {
+     DEBUG_printf(("1cupsDoAuthentication: Unknown auth type: \"%s\"",
+                   http->fields[HTTP_FIELD_WWW_AUTHENTICATE]));
+-    http->status = HTTP_AUTHORIZATION_CANCELED;
+-    return (-1);
++    return (1);
+   }
+ 
+   DEBUG_printf(("1cupsDoAuthentication: authstring=\"%s\"", http->authstring));
+diff -ur cups-1.5.0/cups/request.c cups-1.5.0-auth/cups/request.c
+--- cups-1.5.0/cups/request.c	2011-05-20 05:49:49.000000000 +0200
++++ cups-1.5.0-auth/cups/request.c	2011-08-05 19:40:37.981496819 +0200
+@@ -396,7 +396,7 @@
+   {
+     status = httpUpdate(http);
+   }
+-  while (status != HTTP_ERROR && http->state == HTTP_POST_RECV);
++  while (http->state == HTTP_POST_RECV);
+ 
+   DEBUG_printf(("2cupsGetResponse: status=%d", status));
+ 
+@@ -448,7 +449,7 @@
+ 
+       DEBUG_puts("2cupsGetResponse: Need authorization...");
+ 
+-      if (!cupsDoAuthentication(http, "POST", resource))
++      if (cupsDoAuthentication(http, "POST", resource) >= 0)
+         httpReconnect(http);
+       else
+         status = HTTP_AUTHORIZATION_CANCELED;
+@@ -780,7 +781,7 @@
+           return (status);
+ 
+       case HTTP_UNAUTHORIZED :
+-          if (cupsDoAuthentication(http, "POST", resource))
++          if (cupsDoAuthentication(http, "POST", resource) < 0)
+ 	    return (HTTP_AUTHORIZATION_CANCELED);
+ 
+ 	  if (httpReconnect(http))
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/cups/cups.spec?r1=1.304&r2=1.305&f=u



More information about the pld-cvs-commit mailing list