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

This commit is contained in:
Tim Waugh 2010-11-12 16:32:44 +00:00
parent 284d663dfa
commit edf5bda34b
2 changed files with 19 additions and 1 deletions

11
hplip-addprinter.patch Normal file
View File

@ -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;

View File

@ -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@redhat.com> - 3.10.9-6
* Fri Nov 12 2010 Tim Waugh <twaugh@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@redhat.com> 3.10.9-5