[PATCH] Use org.freedesktop.PolicyKit.AuthenticationAgent for PolicyKit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi;

Following patch replaces deprecated "ShowDialog" method with "ObtainAuthorization" one and also changes desktop dependent "org.gnome.PolicyKit" interface with "org.freedesktop.PolicyKit.AuthenticationAgent" one to permit other PolicyKit Authentication Agents (like PolicyKit-KDE).

Signed-off-by: S.Çağlar Onur <caglar@xxxxxxxxxxxxx>

diff -r 5142197392f2 src/virtManager/connection.py
--- a/src/virtManager/connection.py	Fri May 02 09:36:36 2008 -0400
+++ b/src/virtManager/connection.py	Mon May 05 17:21:05 2008 +0300
@@ -339,9 +339,9 @@
     def _do_creds_polkit(self, action):
         logging.debug("Doing policykit for %s" % action)
         bus = dbus.SessionBus()
-        obj = bus.get_object("org.gnome.PolicyKit", "/org/gnome/PolicyKit/Manager")
-        pkit = dbus.Interface(obj, "org.gnome.PolicyKit.Manager")
-        pkit.ShowDialog(action, 0)
+        obj = bus.get_object("org.freedesktop.PolicyKit.AuthenticationAgent", "/")
+        pkit = dbus.Interface(obj, "org.freedesktop.PolicyKit.AuthenticationAgent")
+        pkit.ObtainAuthorization(action, 0, os.getpid())
         return 0
 
     def _do_creds_dialog(self, creds):

Cheers
-- 
S.Çağlar Onur <caglar@xxxxxxxxxxxxx>
http://cekirdek.pardus.org.tr/~caglar/

Linux is like living in a teepee. No Windows, no Gates and an Apache in house!

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux