From 2b8dc83a4915d2f6cefcb746b4984e934c516057 Mon Sep 17 00:00:00 2001 From: mkasik Date: Tue, 23 Feb 2010 13:20:12 +0000 Subject: [PATCH] - Fix adding of printers without specification of ppd-name. - Patch by Tim Waugh. - Resolves: #545452 --- cups-pk-helper-add-printer-ppd-optional.patch | 16 ++++++++++++++++ cups-pk-helper.spec | 9 ++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 cups-pk-helper-add-printer-ppd-optional.patch diff --git a/cups-pk-helper-add-printer-ppd-optional.patch b/cups-pk-helper-add-printer-ppd-optional.patch new file mode 100644 index 0000000..90dafd9 --- /dev/null +++ b/cups-pk-helper-add-printer-ppd-optional.patch @@ -0,0 +1,16 @@ +--- cups-pk-helper-0.0.4/src/cups.c 2009-12-10 15:08:12.000000000 +0100 ++++ cups-pk-helper-0.0.4/src/cups.c 2009-12-10 15:09:00.000000000 +0100 +@@ -998,9 +998,11 @@ cph_cups_printer_add (CphCups *cups, + + ippAddString (request, IPP_TAG_PRINTER, IPP_TAG_NAME, + "printer-name", NULL, printer_name); +- ippAddString (request, IPP_TAG_PRINTER, IPP_TAG_NAME, +- "ppd-name", NULL, ppd_file); + ++ if (ppd_file && ppd_file[0] != '\0') { ++ ippAddString (request, IPP_TAG_PRINTER, IPP_TAG_NAME, ++ "ppd-name", NULL, ppd_file); ++ } + if (printer_uri && printer_uri[0] != '\0') { + ippAddString (request, IPP_TAG_PRINTER, IPP_TAG_URI, + "device-uri", NULL, printer_uri); diff --git a/cups-pk-helper.spec b/cups-pk-helper.spec index 798430a..adcc737 100644 --- a/cups-pk-helper.spec +++ b/cups-pk-helper.spec @@ -1,6 +1,6 @@ Name: cups-pk-helper Version: 0.0.4 -Release: 9%{?dist} +Release: 10%{?dist} Summary: A helper that makes system-config-printer use PolicyKit Group: System Environment/Base @@ -14,6 +14,7 @@ Patch2: polkit_result.patch Patch3: edit_job.patch Patch4: cups-pk-helper-ppd-name.patch Patch5: allow_authentication.patch +Patch6: cups-pk-helper-add-printer-ppd-optional.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -49,6 +50,7 @@ interfaces available under control of PolicyKit. %patch3 -p1 -b .edit-job %patch4 -p1 -b .ppd-name %patch5 -p1 -b .allow_auth +%patch6 -p1 -b .ppd %build # Patch0 modifies configure.ac @@ -78,6 +80,11 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Feb 23 2010 Marek Kasik - 0.0.4-10 +- Fix adding of printers without specification of ppd-name. +- Patch by Tim Waugh. +- Resolves: #545452 + * Tue Feb 23 2010 Marek Kasik - 0.0.4-9 - Allow inactive users and any user to authenticate - Resolves: #543085