Re: [HIGH] STR #4291: servername/version=1.1 does not work from client.conf

Michael Sweet <[email protected]> Tue, 12 Mar 2013 07:26:09 -0700 (PDT)
Newsgroups gmane.comp.printing.cups.bugs
Message-ID <[email protected]>

--PART-BOUNDARY
Content-Type: text/plain

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR Closed w/Resolution]

Fixed in Subversion repository.

Link: https://www.cups.org/str.php?L4291
Version: 1.6-current
Fix Version: 1.7-current (r10902)
--PART-BOUNDARY
Content-Type: text/plain
Content-Disposition: attachment; filename="str4291-1.6.patch"

Index: cups/usersys.c
===================================================================
--- cups/usersys.c	(revision 10901)
+++ cups/usersys.c	(working copy)
@@ -3,7 +3,7 @@
  *
  *   User, system, and password routines for CUPS.
  *
- *   Copyright 2007-2012 by Apple Inc.
+ *   Copyright 2007-2013 by Apple Inc.
  *   Copyright 1997-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -951,37 +951,8 @@
   }
 
   if ((!cg->server[0] || !cg->ipp_port) && cups_server)
-  {
-    if (!cg->server[0])
-    {
-     /*
-      * Copy server name...
-      */
+    cupsSetServer(cups_server);
 
-      strlcpy(cg->server, cups_server, sizeof(cg->server));
-
-      if (cg->server[0] != '/' && (value = strrchr(cg->server, ':')) != NULL &&
-	  !strchr(value, ']') && isdigit(value[1] & 255))
-        *value++ = '\0';
-      else
-        value = NULL;
-
-      if (cg->server[0] == '/')
-	strcpy(cg->servername, "localhost");
-      else
-	strlcpy(cg->servername, cg->server, sizeof(cg->servername));
-    }
-    else if (cups_server[0] != '/' &&
-             (value = strrchr(cups_server, ':')) != NULL &&
-	     !strchr(value, ']') && isdigit(value[1] & 255))
-      value ++;
-    else
-      value = NULL;
-
-    if (!cg->ipp_port && value)
-      cg->ipp_port = atoi(value);
-  }
-
   if (!cg->server[0])
   {
 #ifdef CUPS_DEFAULT_DOMAINSOCKET
Index: CHANGES.txt
===================================================================
--- CHANGES.txt	(revision 10901)
+++ CHANGES.txt	(working copy)
@@ -1,4 +1,4 @@
-CHANGES.txt - 1.6.2 - 2013-03-11
+CHANGES.txt - 1.6.2 - 2013-03-12
 --------------------------------
 
 
@@ -49,7 +49,7 @@
 	- 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)
+	  work with CUPS 1.3.x or older servers (STR #4231, STR #4291)
 	- The SNMP backend now tries to work around broken printers that use a
 	  newline to separate key/value pairs.
 	- The IPP backend did not send a cancel request to printers when a job

--PART-BOUNDARY
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
cups-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/cups-bugs

--PART-BOUNDARY--