Proxy Call Error
John (J5) Palmieri
johnp at redhat.com
Thu Aug 21 13:47:29 PDT 2008
On Thu, 2008-08-21 at 12:28 -0300, Daniel Morales wrote:
> Hi, thanks both for the quick answers.
>
> I think the problem is the difference between 'system-services' and
> 'services'.
> The service i wrote doesn't points to be a 'system' one, so as many
> others programs i install the .services file in
> '$(datadir)/dbus-1/services' => /usr/share/dbus-1/services/.
>
> If i grep 'User=' /usr/share/dbus-1/services/* none of them uses 'User='.
>
> Is any difference about to write a 'system-' and just a 'service'?
>
> Basically what i'm doing to start the service is:
>
> dbus_g_bus_get()
> dbus_g_proxy_new_for_name ()
> dbus_g_proxy_call () // The "RequestName"
> dbus_g_connection_register_g_object ()
>
> Maybe i'm just missing something, but using a inspector shows me that
> the methods are 'there'. Also, if i use dbus-send shows me the same
> error, so definitly the error comes from the service and not from the
> client.
>
> Any other idea?
>
> Thanks much
>
> --
> Daniel
System services are started by the system bus which can launch an app as
any user, even root which is why you need to give it the User=
configuration option in the .service file placed
in /usr/share/dbus-1/system-services. This is a powerful and in the
wrong hands, dangerous feature and all security implications should be
considered. Note also when writing any system services, not just ones
that can be started by the bus, you will need a corresponding .conf
security policy file in /etc/dbus-1/system.d/ in order to be able to
register a name on the bus and receive (and send) messages (man
dbus-daemon will give you more information about policy files).
Session services, the ones you see service files for
in /usr/share/dbus-1/services/ are always started via the session bus as
the session's user.
The thing to remember is that system services are started when a request
comes over the system bus and session services are started when the
request comes over the session bus. Please read the documentation on
http://dbus.freedesktop.org for more information regarding the different
busses.
--
John (J5) Palmieri <johnp at redhat.com>
More information about the dbus
mailing list