r31703 - in /packages/experimental/gnome-shell/debian: changelog patches/08-polkit-Find-the-best-user-to-authenticate-as.patch patches/series

sjoerd at users.alioth.debian.org sjoerd at users.alioth.debian.org
Sun Nov 20 22:24:24 UTC 2011


Author: sjoerd
Date: Sun Nov 20 22:24:20 2011
New Revision: 31703

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=31703
Log:
* debian/patches/06-polkit-Find-the-best-user-to-authenticate-as.patch:
  + Added. When picking a user to authenticate with, try the current user
    first, then root and if all else fails the first user that is allowed to
    authenticate. (from upstream git)

Added:
    packages/experimental/gnome-shell/debian/patches/08-polkit-Find-the-best-user-to-authenticate-as.patch
Modified:
    packages/experimental/gnome-shell/debian/changelog
    packages/experimental/gnome-shell/debian/patches/series

Modified: packages/experimental/gnome-shell/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/experimental/gnome-shell/debian/changelog?rev=31703&op=diff
==============================================================================
--- packages/experimental/gnome-shell/debian/changelog [utf-8] (original)
+++ packages/experimental/gnome-shell/debian/changelog [utf-8] Sun Nov 20 22:24:20 2011
@@ -1,3 +1,12 @@
+gnome-shell (3.2.1-5) UNRELEASED; urgency=low
+
+  * debian/patches/06-polkit-Find-the-best-user-to-authenticate-as.patch:
+    + Added. When picking a user to authenticate with, try the current user
+      first, then root and if all else fails the first user that is allowed to
+      authenticate. (from upstream git)
+
+ -- Sjoerd Simons <sjoerd at debian.org>  Sun, 20 Nov 2011 22:20:46 +0000
+
 gnome-shell (3.2.1-4) experimental; urgency=low
 
   * 05-NetworkMenu-don-t-query-DBus-properties-of-removed-o.patch:

Added: packages/experimental/gnome-shell/debian/patches/08-polkit-Find-the-best-user-to-authenticate-as.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/experimental/gnome-shell/debian/patches/08-polkit-Find-the-best-user-to-authenticate-as.patch?rev=31703&op=file
==============================================================================
--- packages/experimental/gnome-shell/debian/patches/08-polkit-Find-the-best-user-to-authenticate-as.patch (added)
+++ packages/experimental/gnome-shell/debian/patches/08-polkit-Find-the-best-user-to-authenticate-as.patch [utf-8] Sun Nov 20 22:24:20 2011
@@ -1,0 +1,49 @@
+From b98e1daac76ea0a5417ca1efd0ba668fb8ec4816 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen at redhat.com>
+Date: Thu, 17 Nov 2011 22:42:37 -0500
+Subject: [PATCH] polkit: Find the best user to authenticate as
+
+We prefer to ask the user for his own password. If PolicyKit
+is not configured to accept that, try the root password. If
+PolicyKit does not accept that either, ask for password of
+the first user that PolicyKit _will_ accept. The last case
+is a bit broken, but should rarely occur in real-life
+configurations.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=651547
+---
+ js/ui/polkitAuthenticationAgent.js |    9 +++++++--
+ 1 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/js/ui/polkitAuthenticationAgent.js b/js/ui/polkitAuthenticationAgent.js
+index 2d7063a..6f01039 100644
+--- a/js/ui/polkitAuthenticationAgent.js
++++ b/js/ui/polkitAuthenticationAgent.js
+@@ -27,6 +27,7 @@ const AccountsService = imports.gi.AccountsService;
+ const Clutter = imports.gi.Clutter;
+ const St = imports.gi.St;
+ const Pango = imports.gi.Pango;
++const GLib = imports.gi.GLib;
+ const Gio = imports.gi.Gio;
+ const Mainloop = imports.mainloop;
+ const Polkit = imports.gi.Polkit;
+@@ -88,10 +89,14 @@ AuthenticationDialog.prototype = {
+         if (userNames.length > 1) {
+             log('polkitAuthenticationAgent: Received ' + userNames.length +
+                 ' identities that can be used for authentication. Only ' +
+-                'considering the first one.');
++                'considering one.');
+         }
+ 
+-        let userName = userNames[0];
++        let userName = GLib.get_user_name();
++        if (userNames.indexOf(userName) < 0)
++            userName = 'root';
++        if (userNames.indexOf(userName) < 0)
++            userName = userNames[0];
+ 
+         this._user = AccountsService.UserManager.get_default().get_user(userName);
+         let userRealName = this._user.get_real_name()
+-- 
+1.7.7.3
+

Modified: packages/experimental/gnome-shell/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/experimental/gnome-shell/debian/patches/series?rev=31703&op=diff
==============================================================================
--- packages/experimental/gnome-shell/debian/patches/series [utf-8] (original)
+++ packages/experimental/gnome-shell/debian/patches/series [utf-8] Sun Nov 20 22:24:20 2011
@@ -3,3 +3,4 @@
 05-NetworkMenu-don-t-query-DBus-properties-of-removed-o.patch
 06-NetworkMenu-fix-regression-in-access-point-removed.patch
 07-NetworkMenu-fix-logic-for-updating-wifi-icon.patch
+08-polkit-Find-the-best-user-to-authenticate-as.patch




More information about the pkg-gnome-commits mailing list