Session bus AccessDenied

Ikke eikke@eikke.com
Sun Jan 9 08:24:10 PST 2005


Hija,

I got a problem using the session bus.

I'm testing this tiny piece of Python code, based on a sample in
DBUS-cvs:

import dbus
import gtk

class TestObject(dbus.Object):
        def __init__(self, service):
                dbus.Object.__init__(self, "/object", service,
[self.emitHelloSignal])

        def emitHelloSignal(self, message):
                # Emit the signal
                self.emit_signal(interface="org.designfu.TestService",
                        signal_name="hello")

session_bus = dbus.SessionBus()
service = dbus.Service("org.designfu.TestService", bus=session_bus)
object = TestObject(service)

gtk.main()


This is what I get in dbus-monitor --session, tough (after pasting the
output of a dbus-launch inside 2 xterms):

signal interface=org.freedesktop.DBus; member=ServiceCreated;
sender=org.freedes ktop.DBus
string:org.designfu.TestService
method call interface=org.freedesktop.DBus; member=AcquireService;
sender=:1.5
string:org.designfu.TestService
int32:0
error name=org.freedesktop.DBus.Error.AccessDenied;
sender=org.freedesktop.DBus
string:A security policy in place prevents this sender from sending this
message  to this recipient, see message bus configuration file (rejected
message had int erface "(unset)" member "(unset)" error name
"org.freedesktop.DBus.Error.Unknown Method" destination ":1.5")

Which is not what I expect.

I also tried a piece of C code I wrote myself, also emitting a signal on
the session bus, same result.

I'm running the default Gentoo dbus installation, this
is /etc/dbus-1/session.conf (comments removed):

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration
1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
   <type>session</type>

  <listen>unix:tmpdir=/tmp</listen>

  <servicedir>/usr/lib/dbus-1.0/services</servicedir>

  <policy context="default">
     <allow send_destination="*"/>
    <allow eavesdrop="true"/>
    <allow own="*"/>
    <allow user="*"/>
  </policy>

  <include ignore_missing="yes">session-local.conf</include>
</busconfig>


I also tried to setup Beagle-CVS once, same issue (AccessDenied in
dbus-monitor).

Any idea what causes this, and how to fix it?


Thanks, and regards,

Ikke

http://www.eikke.com





More information about the dbus mailing list