Author: kkaempf Date: Tue Feb 10 12:19:09 2009 New Revision: 55370 URL: http://svn.opensuse.org/viewcvs/yast?rev=55370&view=rev Log: use proper naming (according to DBus standards) for service, interface and object path Modified: trunk/core/dbus/SCR_service/DBusServer.cc trunk/core/dbus/SCR_service/org.opensuse.yast.SCR.conf.in trunk/core/dbus/SCR_service/scr_names.h.in trunk/core/dbus/SCR_service/test_SCR_dbus_server.rb.in Modified: trunk/core/dbus/SCR_service/DBusServer.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/dbus/SCR_service/DBusServer.cc?rev=55370&r1=55369&r2=55370&view=diff ============================================================================== --- trunk/core/dbus/SCR_service/DBusServer.cc (original) +++ trunk/core/dbus/SCR_service/DBusServer.cc Tue Feb 10 12:19:09 2009 @@ -177,8 +177,8 @@ // check this is a method call for the right object, interface & method if (request.type() == DBUS_MESSAGE_TYPE_METHOD_CALL - && request.interface() == YAST_SCR_SERVICE_METHODS - && request.path() == SCR_PATH) + && request.interface() == YAST_SCR_INTERFACE + && request.path() == SCR_OBJECT_PATH) { std::string method(request.method()); @@ -309,7 +309,7 @@ { y2milestone("Requesting path: %s", request.path().c_str()); // define all exported methods here - const char *introspect = (request.path() != SCR_PATH) ? + const char *introspect = (request.path() != SCR_OBJECT_PATH) ? // introcpection data for the root node DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE "<node>" @@ -324,7 +324,7 @@ // introcpection data for SCR node DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE "<node>" -" <interface name='"YAST_SCR_SERVICE_METHODS"'>" +" <interface name='"YAST_SCR_INTERFACE"'>" " <method name='"METHOD_READ"'>" " <arg name='path' type='(bsv)' direction='in'/>" " <arg name='arg' type='(bsv)' direction='in'/>" Modified: trunk/core/dbus/SCR_service/org.opensuse.yast.SCR.conf.in URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/dbus/SCR_service/org.opensuse.yast.SCR.conf.in?rev=55370&r1=55369&r2=55370&view=diff ============================================================================== --- trunk/core/dbus/SCR_service/org.opensuse.yast.SCR.conf.in (original) +++ trunk/core/dbus/SCR_service/org.opensuse.yast.SCR.conf.in Tue Feb 10 12:19:09 2009 @@ -5,6 +5,10 @@ http://lists.opensuse.org/opensuse-packaging/2009-01/msg00132.html https://bugzilla.novell.com/show_bug.cgi?id=468390 --> + +<!-- + Only a root process may start a DBus Service requesting to own YAST_SCR_SERVICE +--> <policy user="root"> <allow own="@YAST_SCR_SERVICE@"/> <allow send_destination="@YAST_SCR_SERVICE@"/> @@ -12,7 +16,7 @@ <policy context="default"> <!-- allowed iff compiled with PolicyKit --> <@ACCESS_MODE@ send_destination="@YAST_SCR_SERVICE@" - send_interface="@YAST_SCR_SERVICE_METHODS@"/> + send_interface="@YAST_SCR_INTERFACE@"/> <!-- introspection is allowed --> <allow send_destination="@YAST_SCR_SERVICE@" send_interface="org.freedesktop.DBus.Introspectable" /> Modified: trunk/core/dbus/SCR_service/scr_names.h.in URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/dbus/SCR_service/scr_names.h.in?rev=55370&r1=55369&r2=55370&view=diff ============================================================================== --- trunk/core/dbus/SCR_service/scr_names.h.in (original) +++ trunk/core/dbus/SCR_service/scr_names.h.in Tue Feb 10 12:19:09 2009 @@ -4,7 +4,7 @@ */ #define YAST_SCR_SERVICE "@YAST_SCR_SERVICE@" -#define YAST_SCR_SERVICE_METHODS "@YAST_SCR_SERVICE_METHODS@" +#define YAST_SCR_INTERFACE "@YAST_SCR_INTERFACE@" #define METHOD_READ "Read" #define METHOD_WRITE "Write" @@ -17,6 +17,6 @@ #define METHOD_UNREGISTER_ALL "UnregisterAllAgents" #define METHOD_REGISTER_NEW "RegisterNewAgents" -#define SCR_PATH "/SCR" +#define SCR_OBJECT_PATH "/SCR" #define POLKIT_PREFIX "org.opensuse.yast.scr" Modified: trunk/core/dbus/SCR_service/test_SCR_dbus_server.rb.in URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/dbus/SCR_service/test_SCR_dbus_server.rb.in?rev=55370&r1=55369&r2=55370&view=diff ============================================================================== --- trunk/core/dbus/SCR_service/test_SCR_dbus_server.rb.in (original) +++ trunk/core/dbus/SCR_service/test_SCR_dbus_server.rb.in Tue Feb 10 12:19:09 2009 @@ -27,7 +27,7 @@ objYast = yast.object("/#{yast.root}") assert objYast - poiSCR = DBus::ProxyObjectInterface.new(objYast, "@YAST_SCR_SERVICE_METHODS@") + poiSCR = DBus::ProxyObjectInterface.new(objYast, "@YAST_SCR_INTERFACE@") assert poiSCR end def test_throughput @@ -45,7 +45,7 @@ objYast = yast.object("/#{yast.root}") assert objYast - poiSCR = DBus::ProxyObjectInterface.new(objYast, "@YAST_SCR_SERVICE_METHODS@") + poiSCR = DBus::ProxyObjectInterface.new(objYast, "@YAST_SCR_INTERFACE@") res = poiSCR.define_method("Execute", "in path:(bsv), in arg:(bsv), in opt:(bsv), out ret:(bsv)") -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org