diff --git a/cups-get-jobs-printer-uri-relax.patch b/cups-get-jobs-printer-uri-relax.patch new file mode 100644 index 0000000..e0f4dd7 --- /dev/null +++ b/cups-get-jobs-printer-uri-relax.patch @@ -0,0 +1,23 @@ +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; diff --git a/cups-str3167.patch b/cups-str3167.patch new file mode 100644 index 0000000..5068c52 --- /dev/null +++ b/cups-str3167.patch @@ -0,0 +1,72 @@ +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 ++); diff --git a/cups.spec b/cups.spec index 37c15d6..83fa086 100644 --- a/cups.spec +++ b/cups.spec @@ -27,6 +27,8 @@ Source15: textonly.ppd 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 @@ lpd emulation. %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 @@ rm -rf $RPM_BUILD_ROOT %{cups_serverbin}/daemon/cups-lpd %changelog +* Fri Apr 24 2009 Tim Waugh 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 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.