From 70f332f43bcd6b6d08061403baf241f8705b1387 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 28 Aug 2009 15:46:25 +0000 Subject: [PATCH] - Fixed proxy authentication. --- system-config-printer-proxy-auth.patch | 50 ++++++++++++++++++++++++++ system-config-printer.spec | 7 +++- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-proxy-auth.patch diff --git a/system-config-printer-proxy-auth.patch b/system-config-printer-proxy-auth.patch new file mode 100644 index 0000000..4d057ab --- /dev/null +++ b/system-config-printer-proxy-auth.patch @@ -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 () + diff --git a/system-config-printer.spec b/system-config-printer.spec index a4887ca..ab7e398 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -7,7 +7,7 @@ Summary: A printer administration tool Name: system-config-printer Version: 1.1.12 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -18,6 +18,7 @@ Patch1: system-config-printer-get_cursor.patch Patch2: system-config-printer-statereason-icons.patch Patch3: system-config-printer-icon-load-traceback.patch Patch4: system-config-printer-polkit-1.patch +Patch5: system-config-printer-proxy-auth.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -83,6 +84,7 @@ printers. %patch2 -p1 -b .statereason-icons %patch3 -p1 -b .icon-load-traceback %patch4 -p1 -b .polkit-1 +%patch5 -p1 -b .proxy-auth %build aclocal @@ -197,6 +199,9 @@ rm -rf %buildroot exit 0 %changelog +* Fri Aug 28 2009 Tim Waugh 1.1.12-5 +- Fixed proxy authentication. + * Thu Aug 27 2009 Tim Waugh 1.1.12-4 - Ported to polkit-1.