HAL Security Policy exceptions

Vivek Rai vivek.rai at gmail.com
Sat Jul 29 16:23:57 PDT 2006


Hi,

I am trying to build a GUI in python that needs to list various
networking devices.

I am using python2.4-dbus_0.60-6ubuntu8_i386.deb from Ubuntu repositories.

I was trying the following code:
----
    def getEthernetDevices(self):
#        hal_service = bus.get_service("org.freedesktop.Hal")
        bus = dbus.Bus(dbus.Bus.TYPE_SYSTEM)
        hal_manager =
bus.get_object("org.freedesktop.Hal","/org/freedesktop/Hal/Manager")
        eth_devs = hal_manager.FindDeviceByCapability ("net")
----
I get the following error.. even when running as root.
---
  File "/home/mepis/workspace/netconfwizard/src/ethDevicePage.py",
line 47, in getEthernetDevices
    eth_devs = hal_manager.FindDeviceByCapability ("net")
  File "/usr/lib/python2.4/site-packages/dbus/proxies.py", line 79, in __call__
    reply_message = self._connection.send_with_reply_and_block(message, timeout)
  File "dbus_bindings.pyx", line 458, in
dbus_bindings.Connection.send_with_reply_and_block
dbus_bindings.DBusException: A security policy in place prevents this
recipient from receiving this message from this sender, see message
bus configuration file (rejected message had interface "(unset)"
member "FindDeviceByCapability" error name "(unset)" destination
"org.freedesktop.Hal" reply serial 0 requested_reply=0)
----

Curiously, I get the same error when I use the sample program to list
all the devices from python in the hal spec. (i had to modify the
get_services bit there too)
Any ideas what I need to look into?

Cheers,
Vivek


More information about the hal mailing list