]> git.pld-linux.org Git - packages/cups.git/commitdiff
- from cups svn
authorJan Rękorajski <baggins@pld-linux.org>
Wed, 23 Nov 2011 12:29:04 +0000 (12:29 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    cups-auth.patch -> 1.2
    cups-ssl-segfault.patch -> 1.2

cups-auth.patch
cups-ssl-segfault.patch

index 1db4d0ac90c5e547d58f1e68acba11a08a322bae..f78830f1bc64c71031a845300f2d393554d5fb24 100644 (file)
@@ -1,43 +1,72 @@
-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))
+Index: cups/request.c
+===================================================================
+--- cups/request.c     (revision 9973)
++++ cups/request.c     (revision 9974)
+@@ -248,16 +248,9 @@
+       while ((bytes = (int)read(infile, buffer, sizeof(buffer))) > 0)
+       {
+-      if (httpCheck(http))
+-      {
+-        _httpUpdate(http, &status);
+-
+-        if (status >= HTTP_MULTIPLE_CHOICES)
+-          break;
+-        }
+-
+-      if (httpWrite2(http, buffer, bytes) < bytes)
+-          break;
++        if ((status = cupsWriteRequestData(http, buffer, bytes))
++                != HTTP_CONTINUE)
++        break;
+       }
+     }
+@@ -265,13 +258,11 @@
+     * Get the server's response...
+     */
+-    if (status == HTTP_CONTINUE || status == HTTP_OK)
++    if (status != HTTP_ERROR)
+     {
+       response = cupsGetResponse(http, resource);
+-      status   = http->status;
++      status   = httpGetStatus(http);
+     }
+-    else
+-      httpFlush(http);
+     DEBUG_printf(("2cupsDoIORequest: status=%d", status));
+@@ -785,7 +776,17 @@
+     */
+     if (status >= HTTP_MULTIPLE_CHOICES)
++    {
++      _cupsSetHTTPError(status);
++
++      do
++      {
++      status = httpUpdate(http);
++      }
++      while (status != HTTP_ERROR && http->state == HTTP_POST_RECV);
++
+       httpFlush(http);
++    }
+     switch (status)
+     {
+@@ -922,6 +923,13 @@
+       if (status >= HTTP_MULTIPLE_CHOICES)
+       {
+         _cupsSetHTTPError(status);
++
++      do
++      {
++        status = httpUpdate(http);
++      }
++      while (status != HTTP_ERROR && http->state == HTTP_POST_RECV);
++
+         httpFlush(http);
+       }
index 938c3411ac6a77fe19c7c048b5e33eeab6df5014..0d42d33b1ee732a81412e1301657b207f868060e 100644 (file)
@@ -1,6 +1,17 @@
---- cups-1.5.0/cups/http.c~    2011-06-16 22:12:16.000000000 +0200
-+++ cups-1.5.0/cups/http.c     2011-08-02 14:06:25.143633360 +0200
-@@ -3814,7 +3814,7 @@
+Index: cups/http.c
+===================================================================
+--- cups/http.c        (revision 9908)
++++ cups/http.c        (revision 9909)
+@@ -3807,6 +3807,8 @@
+     any_root = cg->any_root;
+ #  ifdef HAVE_LIBSSL
++  (void)any_root;
++
+   context = SSL_CTX_new(SSLv23_client_method());
+   SSL_CTX_set_options(context, SSL_OP_NO_SSLv2); /* Only use SSLv3 or TLS */
+@@ -3815,7 +3817,7 @@
    BIO_ctrl(bio, BIO_C_SET_FILE_PTR, 0, (char *)http);
  
    http->tls = SSL_new(context);
@@ -9,7 +20,7 @@
  
    if (SSL_connect(http->tls) != 1)
    {
-@@ -4173,11 +4173,11 @@
+@@ -4200,11 +4202,11 @@
  #  ifdef HAVE_LIBSSL
    SSL_CTX     *context;               /* Context for encryption */
  
This page took 0.034883 seconds and 4 git commands to generate.