From bf133f194a358584997003b6d44d93d20717e094 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Dec 22 2009 17:06:04 +0000 Subject: - Fixed ipp authentication for servers requiring authentication for IPP-Get-Printer-Attributes (bug #548873, STR #3458). --- diff --git a/cups-str3458.patch b/cups-str3458.patch new file mode 100644 index 0000000..da43b76 --- /dev/null +++ b/cups-str3458.patch @@ -0,0 +1,19 @@ +diff -up cups-1.4.2/backend/ipp.c.str3458 cups-1.4.2/backend/ipp.c +--- cups-1.4.2/backend/ipp.c.str3458 2009-12-22 13:04:25.021208333 +0000 ++++ cups-1.4.2/backend/ipp.c 2009-12-22 13:04:26.570082893 +0000 +@@ -802,6 +802,15 @@ main(int argc, /* I - Number of comm + + return (CUPS_BACKEND_STOP); + } ++ else if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN) ++ { ++ if (!strncmp(httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE), ++ "Negotiate", 9)) ++ auth_info_required = "negotiate"; ++ ++ fprintf(stderr, "ATTR: auth-info-required=%s\n", auth_info_required); ++ return (CUPS_BACKEND_AUTH_REQUIRED); ++ } + else + { + _cupsLangPrintf(stderr, diff --git a/cups.spec b/cups.spec index cca85c7..dddd01d 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 19%{?dist} +Release: 20%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -73,6 +73,7 @@ Patch47: cups-str3428.patch Patch48: cups-str3431.patch Patch49: cups-delete-active-printer.patch Patch50: cups-gnutls-gcrypt-threads.patch +Patch51: cups-str3458.patch Patch100: cups-lspp.patch @@ -253,6 +254,7 @@ module. %patch48 -p1 -b .str3431 %patch49 -p1 -b .delete-active-printer %patch50 -p1 -b .gnutls-gcrypt-threads +%patch51 -p1 -b .str3458 %if %lspp %patch100 -p1 -b .lspp @@ -543,6 +545,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Dec 22 2009 Tim Waugh - 1:1.4.2-20 +- Fixed ipp authentication for servers requiring authentication for + IPP-Get-Printer-Attributes (bug #548873, STR #3458). + * Mon Dec 21 2009 Tim Waugh - 1:1.4.2-19 - Ensure proper thread-safety in gnutls's use of libgcrypt (bug #544619).