Author: lslezak
Date: Tue Mar 3 14:43:25 2009
New Revision: 55883
URL: http://svn.opensuse.org/viewcvs/yast?rev=55883&view=rev
Log:
- DBus service - Lock() and Unlock() methods in
org.opensuse.YaST.modules.ModuleManager inteface
share the same PolicyKit ID (... .lock)
Modified:
branches/tmp/lslezak/core/dbus/namespace_service/DBusModulesServer.cc
branches/tmp/lslezak/core/dbus/namespace_service/org.opensuse.yast.modules.policy.in
Modified: branches/tmp/lslezak/core/dbus/namespace_service/DBusModulesServer.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/core/dbus/namespace_service/DBusModulesServer.cc?rev=55883&r1=55882&r2=55883&view=diff
==============================================================================
--- branches/tmp/lslezak/core/dbus/namespace_service/DBusModulesServer.cc (original)
+++ branches/tmp/lslezak/core/dbus/namespace_service/DBusModulesServer.cc Tue Mar 3 14:43:25 2009
@@ -622,8 +622,12 @@
ret += '.' + obj;
}
}
+
+ // Lock and Unlock methods share the same PolicyKit action Id "lock"
+ std::string method(msg.interface() == YAST_DBUS_MGR_INTERFACE &&
+ msg.method() == YAST_DBUS_MANAGER_UNLOCK_METHOD ? YAST_DBUS_MANAGER_LOCK_METHOD : msg.method());
- ret += '.' + msg.method();
+ ret += '.' + method;
// make it valid action ID (lowercase chars, replace invalid chars)
if (!PolKit::isValidActionID(ret))
Modified: branches/tmp/lslezak/core/dbus/namespace_service/org.opensuse.yast.modules.policy.in
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/core/dbus/namespace_service/org.opensuse.yast.modules.policy.in?rev=55883&r1=55882&r2=55883&view=diff
==============================================================================
--- branches/tmp/lslezak/core/dbus/namespace_service/org.opensuse.yast.modules.policy.in (original)
+++ branches/tmp/lslezak/core/dbus/namespace_service/org.opensuse.yast.modules.policy.in Tue Mar 3 14:43:25 2009
@@ -28,16 +28,5 @@
</defaults>
</action>
- <action id="@YAST_POLKIT_PREFIX_MANAGER@.unlock">
- <description>Unlock the Yast DBus service by application</description>
- <message>System policy prevents applications from unlocking the Yast DBus service.</message>
-
- <defaults>
-