[hplip/f13/master] Call cupsSetUser in cupsext's addPrinter method (bug #538352).

Tim Waugh twaugh at fedoraproject.org
Fri Nov 12 16:46:20 UTC 2010


commit edf5bda34b97c9f1ddf668fcc6a7db2c731ab9fa
Author: Tim Waugh <twaugh at redhat.com>
Date:   Fri Nov 12 16:32:44 2010 +0000

    Call cupsSetUser in cupsext's addPrinter method (bug #538352).

 hplip-addprinter.patch |   11 +++++++++++
 hplip.spec             |    9 ++++++++-
 2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/hplip-addprinter.patch b/hplip-addprinter.patch
new file mode 100644
index 0000000..f278a18
--- /dev/null
+++ b/hplip-addprinter.patch
@@ -0,0 +1,11 @@
+diff -up hplip-3.10.9/prnt/cupsext/cupsext.c~ hplip-3.10.9/prnt/cupsext/cupsext.c
+--- hplip-3.10.9/prnt/cupsext/cupsext.c~	2010-11-12 10:35:59.316957426 +0000
++++ hplip-3.10.9/prnt/cupsext/cupsext.c	2010-11-12 15:58:27.467044126 +0000
+@@ -510,6 +510,7 @@ PyObject * addPrinter( PyObject * self, 
+         strcpy( info, name );
+ 
+     /* Connect to the HTTP server */
++    cupsSetUser ("root");
+     if ( ( http = httpConnectEncrypt( cupsServer(), ippPort(), cupsEncryption() ) ) == NULL )
+     {
+         r = 0;
diff --git a/hplip.spec b/hplip.spec
index 4daf38f..bbe1696 100644
--- a/hplip.spec
+++ b/hplip.spec
@@ -42,6 +42,7 @@ Patch25: hplip-raw_deviceID-traceback.patch
 Patch26: hplip-UnicodeDecodeError.patch
 Patch27: hplip-emit-SIGNAL.patch
 Patch28: hplip-fab-root-crash.patch
+Patch29: hplip-addprinter.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -254,6 +255,10 @@ done
 # Prevent hp-fab traceback when run as root.
 %patch28 -p1 -b .fab-root-crash
 
+# Call cupsSetUser in cupsext's addPrinter method before connecting so
+# that we can get an authentication callback (bug #538352).
+%patch29 -p1 -b .addprinter
+
 sed -i.duplex-constraints \
     -e 's,\(UIConstraints.* \*Duplex\),//\1,' \
     prnt/drv/hpcups.drv.in
@@ -480,7 +485,9 @@ fi
 %postun libs -p /sbin/ldconfig
 
 %changelog
-* Thu Nov 12 2010 Tim Waugh <twaugh at redhat.com> - 3.10.9-6
+* Fri Nov 12 2010 Tim Waugh <twaugh at redhat.com> - 3.10.9-6
+- Call cupsSetUser in cupsext's addPrinter method before connecting so
+  that we can get an authentication callback (bug #538352).
 - Prevent hp-fab traceback when run as root.
 
 * Thu Nov 1 2010 Jiri Popelka <jpopelka at redhat.com> 3.10.9-5


More information about the scm-commits mailing list