]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Don't set auth-info-required all of the time (STR #4205)
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 12 Dec 2012 12:27:27 +0000 (12:27 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 12 Dec 2012 12:27:27 +0000 (12:27 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10749 7a7537e8-13f0-0310-91df-b6672ffda945

CHANGES-1.6.txt
scheduler/printers.c

index 6cedd07ec675a7ab594191b80218a050091caf77..f3d2427c7be701865c856f6670ce4c3b93f3d8d4 100644 (file)
@@ -7,6 +7,8 @@ CHANGES IN CUPS V1.6.2
        - Security: All file, directory, user, and group settings are now stored
          in a separate cups-files.conf configuration file that cannot be set
          through the CUPS web interface or APIs (STR #4223)
+       - The scheduler incorrectly advertised auth-info-required for local
+         queues needing local authentication (STR #4205)
        - CUPS 1.6 clients using the ServerName directive in client.conf did not
          work with CUPS 1.3.x or older servers (STR #4231)
        - The SNMP backend now tries to work around broken printers that use a
index 8c0a9fa9afd4190d594d1e05449f73f932f83f13..106ef3d944451d37c5ae0d9bc31f009bfa7875c9 100644 (file)
@@ -2030,23 +2030,12 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
 {
   int          i;                      /* Looping var */
   char         resource[HTTP_MAX_URI]; /* Resource portion of URI */
-  int          num_air;                /* Number of auth-info-required values */
-  const char   * const *air;           /* auth-info-required values */
   cupsd_location_t *auth;              /* Pointer to authentication element */
   const char   *auth_supported;        /* Authentication supported */
   ipp_t                *oldattrs;              /* Old printer attributes */
   ipp_attribute_t *attr;               /* Attribute data */
   char         *name,                  /* Current user/group name */
                *filter;                /* Current filter */
-  static const char * const air_none[] =
-               {                       /* No authentication */
-                 "none"
-               };
-  static const char * const air_userpass[] =
-               {                       /* Basic/Digest authentication */
-                 "username",
-                 "password"
-               };
 
 
   DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name,
@@ -2070,19 +2059,6 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
   */
 
   auth_supported = "requesting-user-name";
-  num_air        = 1;
-  air            = air_none;
-
-  if (p->num_auth_info_required > 0 && strcmp(p->auth_info_required[0], "none"))
-  {
-    num_air = p->num_auth_info_required;
-    air     = p->auth_info_required;
-  }
-  else if (p->type & CUPS_PRINTER_AUTHENTICATED)
-  {
-    num_air = 2;
-    air     = air_userpass;
-  }
 
   if (p->type & CUPS_PRINTER_CLASS)
     snprintf(resource, sizeof(resource), "/classes/%s", p->name);
@@ -2161,8 +2137,10 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
                 "job-k-limit", p->k_limit);
   ippAddInteger(p->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
                 "job-page-limit", p->page_limit);
-  ippAddStrings(p->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
-               "auth-info-required", num_air, NULL, air);
+  if (p->num_auth_info_required > 0 && strcmp(p->auth_info_required[0], "none"))
+    ippAddStrings(p->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
+                 "auth-info-required", p->num_auth_info_required, NULL,
+                 p->auth_info_required);
 
   if (cupsArrayCount(Banners) > 0)
   {