rpms/cups/F-9 cups-get-jobs-printer-uri-relax.patch, NONE, 1.1 cups-str3167.patch, NONE, 1.1 cups.spec, 1.438, 1.439

Tim Waugh twaugh at fedoraproject.org
Fri Apr 24 17:19:20 UTC 2009


Author: twaugh

Update of /cvs/pkgs/rpms/cups/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25385

Modified Files:
	cups.spec 
Added Files:
	cups-get-jobs-printer-uri-relax.patch cups-str3167.patch 
Log Message:
* Fri Apr 24 2009 Tim Waugh <twaugh at redhat.com> 1:1.3.10-2
- Accept Host: fields set to the ServerName value (bug #497301).
- Temporarily relax requirement to have printer-uri attribute in
  IPP-Get-Jobs request (bug #497519).


cups-get-jobs-printer-uri-relax.patch:

--- NEW FILE cups-get-jobs-printer-uri-relax.patch ---
diff -up cups-1.3.10/scheduler/ipp.c~ cups-1.3.10/scheduler/ipp.c
--- cups-1.3.10/scheduler/ipp.c~	2009-03-18 16:30:29.000000000 +0000
+++ cups-1.3.10/scheduler/ipp.c	2009-04-24 17:27:13.000000000 +0100
@@ -5976,15 +5976,16 @@ get_jobs(cupsd_client_t  *con,		/* I - C
 
   if (strcmp(uri->name, "printer-uri"))
   {
-    send_ipp_status(con, IPP_BAD_REQUEST, _("No printer-uri in request!"));
-    return;
+    cupsdLogMessage(CUPSD_LOG_WARN,
+		    "No printer-uri in IPP-Get-Jobs request!");
   }
 
   httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, scheme,
                   sizeof(scheme), username, sizeof(username), host,
 		  sizeof(host), &port, resource, sizeof(resource));
 
-  if (!strcmp(resource, "/") || !strcmp(resource, "/jobs"))
+  if (!strcmp(resource, "/") ||
+      (!strncmp(resource, "/jobs", 5) && strlen(resource) <= 6))
   {
     dest    = NULL;
     dtype   = (cups_ptype_t)0;

cups-str3167.patch:

--- NEW FILE cups-str3167.patch ---
diff -up cups-1.3.10/scheduler/conf.c.str3167 cups-1.3.10/scheduler/conf.c
--- cups-1.3.10/scheduler/conf.c.str3167	2009-04-16 20:32:04.000000000 +0100
+++ cups-1.3.10/scheduler/conf.c	2009-04-24 18:12:56.000000000 +0100
@@ -653,38 +653,44 @@ cupsdReadConfiguration(void)
     }
 
     cupsdSetString(&ServerName, temp);
-    add_alias(temp);
+  }
 
-    if (HostNameLookups || RemoteAccessEnabled)
-    {
-      struct hostent	*host;		/* Host entry to get FQDN */
 
-      if ((host = gethostbyname(temp)) != NULL)
+  add_alias(ServerName);
+
+  if (HostNameLookups || RemoteAccessEnabled)
+  {
+    struct hostent	*host;		/* Host entry to get FQDN */
+
+    if ((host = gethostbyname(ServerName)) != NULL)
+    {
+      if (strcasecmp(ServerName, host->h_name))
       {
-        if (strcasecmp(temp, host->h_name))
-        {
-	  cupsdSetString(&ServerName, host->h_name);
-	  add_alias(host->h_name);
-	}
+	cupsdSetString(&ServerName, host->h_name);
+	add_alias(host->h_name);
+      }
 
-        if (host->h_aliases)
-	{
-          for (i = 0; host->h_aliases[i]; i ++)
-	    if (strcasecmp(temp, host->h_aliases[i]))
-	      add_alias(host->h_aliases[i]);
-	}
+      if (host->h_aliases)
+      {
+	for (i = 0; host->h_aliases[i]; i ++)
+	  if (strcasecmp(ServerName, host->h_aliases[i]))
+	    add_alias(host->h_aliases[i]);
       }
     }
+  }
 
-   /*
-    * Make sure we have the base hostname added as an alias, too!
-    */
+ /*
+  * Make sure we have the base hostname added as an alias, too!
+  */
 
-    if ((slash = strchr(temp, '.')) != NULL)
-    {
-      *slash = '\0';
-      add_alias(temp);
-    }
+  if ((slash = strchr(ServerName, '.')) != NULL)
+  {
+    size_t n = slash - ServerName;
+    if (n > sizeof(temp) - 1)
+      n = sizeof(temp) - 1;
+    memcpy (temp, ServerName, n);
+    temp[n] = '\0';
+    add_alias(temp);
   }
 
   for (slash = ServerName; isdigit(*slash & 255) || *slash == '.'; slash ++);


Index: cups.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cups/F-9/cups.spec,v
retrieving revision 1.438
retrieving revision 1.439
diff -u -r1.438 -r1.439
--- cups.spec	21 Apr 2009 12:49:30 -0000	1.438
+++ cups.spec	24 Apr 2009 17:18:50 -0000	1.439
@@ -27,6 +27,8 @@
 Patch1: cups-no-gzip-man.patch
 Patch2: cups-1.1.16-system-auth.patch
 Patch3: cups-multilib.patch
+Patch4: cups-str3167.patch
+Patch5: cups-get-jobs-printer-uri-relax.patch
 Patch6: cups-banners.patch
 Patch7: cups-serverbin-compat.patch
 Patch8: cups-no-export-ssllibs.patch
@@ -145,6 +147,8 @@
 %patch1 -p1 -b .no-gzip-man
 %patch2 -p1 -b .system-auth
 %patch3 -p1 -b .multilib
+%patch4 -p1 -b .str3167
+%patch5 -p1 -b .get-jobs-printer-uri-relax
 %patch6 -p1 -b .banners
 %patch7 -p1 -b .serverbin-compat
 %patch8 -p1 -b .no-export-ssllibs
@@ -445,6 +449,11 @@
 %{cups_serverbin}/daemon/cups-lpd
 
 %changelog
+* Fri Apr 24 2009 Tim Waugh <twaugh at redhat.com> 1:1.3.10-2
+- Accept Host: fields set to the ServerName value (bug #497301).
+- Temporarily relax requirement to have printer-uri attribute in
+  IPP-Get-Jobs request (bug #497519).
+
 * Tue Apr 21 2009 Tim Waugh <twaugh at redhat.com> 1:1.3.10-1
 - 1.3.10.  No longer need ext, includeifexists, str2988,
   CVE-2008-5183, CVE-2008-5286, str3077, str3078, str3059, str3055 patches.




More information about the fedora-extras-commits mailing list