From 19e2adf8307c8a908da80ceef335517139e5bf64 Mon Sep 17 00:00:00 2001 From: mike Date: Mon, 13 Feb 2012 23:43:07 +0000 Subject: [PATCH] Detect authentication errors for all requests. git-svn-id: http://svn.easysw.com/public/cups/trunk@10277 7a7537e8-13f0-0310-91df-b6672ffda945 --- backend/ipp.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/ipp.c b/backend/ipp.c index bcaab37..d4719e4 100644 --- a/backend/ipp.c +++ b/backend/ipp.c @@ -898,7 +898,9 @@ main(int argc, /* I - Number of command-line args */ return (CUPS_BACKEND_STOP); } - else if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN) + else if (ipp_status == IPP_NOT_AUTHORIZED || + ipp_status == IPP_FORBIDDEN || + ipp_status == IPP_AUTHENTICATION_CANCELED) { const char *www_auth = httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE); /* WWW-Authenticate field value */ @@ -1472,11 +1474,12 @@ main(int argc, /* I - Number of command-line args */ _cupsLangPrintFilter(stderr, "ERROR", _("Print file was not accepted.")); - if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN) + if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN || + ipp_status == IPP_AUTHENTICATION_CANCELED) { const char *www_auth = httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE); /* WWW-Authenticate field value */ - + if (!strncmp(www_auth, "Negotiate", 9)) auth_info_required = "negotiate"; else if (www_auth[0]) -- 1.7.7.6