bluez-utils can't start in dbus mode

Bug #33338 reported by Andre D
82
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bluez (Ubuntu)
Won't Fix
Medium
Charles Majola

Bug Description

because of too strict security policies, hcid can't start if configured to use dbus:

root@lia /etc/init.d $hcid -n
hcid[6244]: Bluetooth HCI daemon
hcid[6244]: Can't get system message bus name: Connection ":1.117" is not allowed to own the service "org.bluez" due to security policies in the configuration file
hcid[6244]: Unable to get on D-BUS

(/etc/bluetooth/hcid.conf is set to use dbus_pin_helper)

adding an appropriate policy to /etc/dbus-1/system.d/bluez-hcid.conf fixes this:
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">

<busconfig>

  <!-- This configuration file specifies the required security policies
       for BlueZ hcid to work. -->
  <!-- ../system.conf have denied everything, so we just punch some holes -->

  <policy user="root">
    <allow own="org.bluez"/>
  </policy>

  <policy at_console="true">
    <allow send_destination="org.bluez.Device"/>
    <allow receive_sender="org.bluez.Device"/>

    <allow send_path="/org/bluez/Device"/>

    <allow send_destination="org.bluez.Manager"/>
    <allow receive_sender="org.bluez.Manager"/>

    <allow send_path="/org/bluez/Manager"/>
  </policy>

</busconfig>

root@lia /etc/init.d $hcid -n
hcid[6278]: Bluetooth HCI daemon
hcid[6278]: Starting security manager 0

Revision history for this message
Andre D (ad-andred) wrote :

ubuntu dapper,
dbus: 0.60-6ubuntu3
bluez-utils: 2.24-0ubuntu4

Revision history for this message
Łukasz Halman (lukasz-halman) wrote :

Same here. In effect bluetooth doesn't work.

Changed in bluez-utils:
status: Unconfirmed → Confirmed
Revision history for this message
Bruce Edge (bruce-edge) wrote :

I was having trouble pairing a headset, so I tried the /etc/dbus-1/system.d/bluez-hcid.conf above, then my bluetooth mouse quit.

There were no errors in the log after restarting bluez-utils.

Attempts to reconnect:
#> hcitool scan
Scanning ...
Inquiry failed: Device or resource busy

#> hidd --connect 00:0A:3A:06:5D:08
Can't get device information: File descriptor in bad state

Revision history for this message
Bruce Edge (bruce-edge) wrote :

...I take it back.
/etc/dbus-1/system.d/bluez-hcid.conf does _not_ break mouse.
Took a few reboots. Don't know why.

It didn't fix anything (for me) either though. Still can't pair hs850 headset.

Matt Zimmerman (mdz)
Changed in bluez-utils:
assignee: nobody → chmj
Revision history for this message
Andres Mujica (andres.mujica) wrote :

well, i can confirm that the message error dissapears after adding the bluez-hcid.conf file and restart dbus and bluez-utils

this applies if you have

dbus_pin_helper;

enabled on /etc/bluetooth/hcid.conf

but it shows an additional error after this:

org.freedesktop.DBus.Error.ServiceUnknown: The name org.bluez.PinAgent was not provided by any .service files

Revision history for this message
Andres Mujica (andres.mujica) wrote :

probably i should fill a new bug but, this report has some info about this.

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=190960

Revision history for this message
inos (guehring+ubuntu) wrote :

i have the same problem BUT using dbus_pin_helper is NOT enabled:

 # PIN helper
 pin_helper /usr/bin/pinwrapper;

    # D-Bus PIN helper
    # dbus_pin_helper;

anyway, after
   sudo /etc/init.d/bluez-utils restart

i have the following output:
   hcid[8545]: Bluetooth HCI daemon
   sdpd[8547]: Bluetooth SDP daemon
   hcid[8545]: Can't get system message bus name: Connection ":1.5" is not allowed to own the service "org.bluez" due to security policies in the configuration file
   hcid[8545]: Starting security manager 0

buetooth is unusable! I am sure, some time ago (about 1-2 month?) it worked without any problems...

Revision history for this message
Matthias Urlichs (smurf) wrote :

Same here. The pin helper options no longer work, any attempt at pairing from my phone is rejected after asking for the password.

Clue: syslog ays:

Mar 29 12:02:17 kiste hcid[12218]: Default passkey agent (:1.16, /org/bluez/applet) registered
Mar 29 12:02:17 kiste hcid[12218]: Got disconnected from the system message bus

... so how do I figure out *why* the disconnect happened?

Revision history for this message
Mario Limonciello (superm1) wrote :

hcid is no longer used in 4.x packages that are in intrepid. I'm closing up this bug report.

Changed in bluez:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.