From e3dedb2c04cf97e7402db7671a36a061a9a879cf Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Jan 28 2009 18:02:08 +0000 Subject: - Always supply document-name when printing a file (STR #3055). - Load MIME type rules correctly (bug #426089, STR #3059). --- diff --git a/cups-str3055.patch b/cups-str3055.patch new file mode 100644 index 0000000..a032707 --- /dev/null +++ b/cups-str3055.patch @@ -0,0 +1,25 @@ +diff -up cups-1.3.9/cups/util.c.str3055 cups-1.3.9/cups/util.c +--- cups-1.3.9/cups/util.c.str3055 2008-07-11 23:48:49.000000000 +0100 ++++ cups-1.3.9/cups/util.c 2009-01-28 17:55:52.000000000 +0000 +@@ -1253,6 +1253,21 @@ cupsPrintFiles2(http_t *http, /* + ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL, + title); + ++ if (num_files == 1) ++ { ++ /* ++ * Add the original document filename... ++ */ ++ ++ if ((base = strrchr(files[0], '/')) != NULL) ++ base ++; ++ else ++ base = files[0]; ++ ++ ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "document-name", ++ NULL, base); ++ } ++ + /* + * Then add all options... + */ diff --git a/cups-str3059.patch b/cups-str3059.patch new file mode 100644 index 0000000..f008e6b --- /dev/null +++ b/cups-str3059.patch @@ -0,0 +1,13 @@ +diff -up cups-1.3.9/scheduler/type.c.str3059 cups-1.3.9/scheduler/type.c +--- cups-1.3.9/scheduler/type.c.str3059 2008-07-11 23:48:49.000000000 +0100 ++++ cups-1.3.9/scheduler/type.c 2009-01-28 17:56:57.000000000 +0000 +@@ -187,8 +187,7 @@ mimeAddTypeRule(mime_type_t *mt, /* I - + else if (*rule == '+' && current != NULL) + { + if (logic != MIME_MAGIC_AND && +- current != NULL && current->prev != NULL && +- current->prev->prev != NULL) ++ current != NULL && current->prev != NULL) + { + /* + * OK, we have more than 1 rule in the current tree level... Make a diff --git a/cups.spec b/cups.spec index 13f7394..f0e6881 100644 --- a/cups.spec +++ b/cups.spec @@ -54,6 +54,8 @@ Patch27: cups-CVE-2008-5286.patch Patch28: cups-str2831.patch Patch29: cups-str3077.patch Patch30: cups-str3078.patch +Patch31: cups-str3059.patch +Patch32: cups-str3055.patch Patch100: cups-lspp.patch Epoch: 1 Url: http://www.cups.org/ @@ -179,6 +181,8 @@ lpd emulation. %patch28 -p1 -b .str2831 %patch29 -p1 -b .str3077 %patch30 -p1 -b .str3078 +%patch31 -p1 -b .str3059 +%patch32 -p1 -b .str3055 %if %lspp %patch100 -p1 -b .lspp @@ -459,6 +463,8 @@ rm -rf $RPM_BUILD_ROOT %changelog * Wed Jan 28 2009 Tim Waugh +- Always supply document-name when printing a file (STR #3055). +- Load MIME type rules correctly (bug #426089, STR #3059). - Fixed quotas (STR #3077, STR #3078). - Removed all patch fuzz.