- Fixed proxy authentication.
This commit is contained in:
parent
7f1ff64d34
commit
70f332f43b
50
system-config-printer-proxy-auth.patch
Normal file
50
system-config-printer-proxy-auth.patch
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
diff -up system-config-printer-1.1.12/jobviewer.py.proxy-auth system-config-printer-1.1.12/jobviewer.py
|
||||||
|
--- system-config-printer-1.1.12/jobviewer.py.proxy-auth 2009-08-28 16:40:54.624947867 +0100
|
||||||
|
+++ system-config-printer-1.1.12/jobviewer.py 2009-08-28 16:42:01.430823181 +0100
|
||||||
|
@@ -604,10 +604,8 @@ class JobViewer (GtkGUI, monitor.Watcher
|
||||||
|
else:
|
||||||
|
(serverport, rest) = urllib.splithost (rest)
|
||||||
|
(server, port) = urllib.splitnport (serverport)
|
||||||
|
- username = pwd.getpwuid (os.getuid ())[0]
|
||||||
|
keyring_attrs.update ({ "server": str (server.lower ()),
|
||||||
|
- "protocol": str (scheme),
|
||||||
|
- "user": str (username)})
|
||||||
|
+ "protocol": str (scheme)})
|
||||||
|
|
||||||
|
if job in self.authenticated_jobs:
|
||||||
|
# We've already tried to authenticate this job before.
|
||||||
|
@@ -656,19 +654,9 @@ class JobViewer (GtkGUI, monitor.Watcher
|
||||||
|
c._end_operation ()
|
||||||
|
nonfatalException ()
|
||||||
|
|
||||||
|
- self.display_auth_info_dialog (job)
|
||||||
|
-
|
||||||
|
- def on_auth_notification_closed (self, notification, reason=None):
|
||||||
|
- job = notification.get_data ('job-id')
|
||||||
|
- debugprint ("auth notification closed for job %s" % job)
|
||||||
|
- self.auth_notifications[job].set_data ('closed', True)
|
||||||
|
- del self.auth_notifications[job]
|
||||||
|
-
|
||||||
|
- def on_auth_notification_authenticate (self, notification, action):
|
||||||
|
- job = notification.get_data ('job-id')
|
||||||
|
- keyring_attrs = notification.get_data ('keyring-attrs')
|
||||||
|
- debugprint ("auth notification authenticate for job %s" % job)
|
||||||
|
- self.display_auth_info_dialog (job, keyring_attrs)
|
||||||
|
+ username = pwd.getpwuid (os.getuid ())[0]
|
||||||
|
+ keyring_attrs["user"] = str (username)
|
||||||
|
+ self.display_auth_info_dialog (job, keyring_attrs)
|
||||||
|
|
||||||
|
def display_auth_info_dialog (self, job, keyring_attrs=None):
|
||||||
|
data = self.jobs[job]
|
||||||
|
@@ -759,8 +747,9 @@ class JobViewer (GtkGUI, monitor.Watcher
|
||||||
|
attrs.get ("protocol"))
|
||||||
|
ind = auth_info_required.index ('password')
|
||||||
|
secret = auth_info[ind]
|
||||||
|
- gnomekeyring.item_create_sync (keyring, type, name,
|
||||||
|
- attrs, secret, True)
|
||||||
|
+ id = gnomekeyring.item_create_sync (keyring, type, name,
|
||||||
|
+ attrs, secret, True)
|
||||||
|
+ debugprint ("keyring: created id %d for %s" % (id, name))
|
||||||
|
except:
|
||||||
|
nonfatalException ()
|
||||||
|
|
@ -7,7 +7,7 @@
|
|||||||
Summary: A printer administration tool
|
Summary: A printer administration tool
|
||||||
Name: system-config-printer
|
Name: system-config-printer
|
||||||
Version: 1.1.12
|
Version: 1.1.12
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://cyberelk.net/tim/software/system-config-printer/
|
URL: http://cyberelk.net/tim/software/system-config-printer/
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
@ -18,6 +18,7 @@ Patch1: system-config-printer-get_cursor.patch
|
|||||||
Patch2: system-config-printer-statereason-icons.patch
|
Patch2: system-config-printer-statereason-icons.patch
|
||||||
Patch3: system-config-printer-icon-load-traceback.patch
|
Patch3: system-config-printer-icon-load-traceback.patch
|
||||||
Patch4: system-config-printer-polkit-1.patch
|
Patch4: system-config-printer-polkit-1.patch
|
||||||
|
Patch5: system-config-printer-proxy-auth.patch
|
||||||
|
|
||||||
BuildRequires: cups-devel >= 1.2
|
BuildRequires: cups-devel >= 1.2
|
||||||
BuildRequires: python-devel >= 2.4
|
BuildRequires: python-devel >= 2.4
|
||||||
@ -83,6 +84,7 @@ printers.
|
|||||||
%patch2 -p1 -b .statereason-icons
|
%patch2 -p1 -b .statereason-icons
|
||||||
%patch3 -p1 -b .icon-load-traceback
|
%patch3 -p1 -b .icon-load-traceback
|
||||||
%patch4 -p1 -b .polkit-1
|
%patch4 -p1 -b .polkit-1
|
||||||
|
%patch5 -p1 -b .proxy-auth
|
||||||
|
|
||||||
%build
|
%build
|
||||||
aclocal
|
aclocal
|
||||||
@ -197,6 +199,9 @@ rm -rf %buildroot
|
|||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Aug 28 2009 Tim Waugh <twaugh@redhat.com> 1.1.12-5
|
||||||
|
- Fixed proxy authentication.
|
||||||
|
|
||||||
* Thu Aug 27 2009 Tim Waugh <twaugh@redhat.com> 1.1.12-4
|
* Thu Aug 27 2009 Tim Waugh <twaugh@redhat.com> 1.1.12-4
|
||||||
- Ported to polkit-1.
|
- Ported to polkit-1.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user