Bug 475069 - dbus access problem with bluez
Summary: dbus access problem with bluez
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: bluez
Version: 10
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Bastien Nocera
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 475096 475436 475459 475989 476116 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-07 10:49 UTC by Pierre Ossman
Modified: 2009-01-22 17:40 UTC (History)
19 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-07 09:09:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
FreeDesktop.org 18229 0 None None None Never

Description Pierre Ossman 2008-12-07 10:49:41 UTC
My bluetooth stuff no longer works, and when I run bluetooth-applet I get:

Agent registration failed: A security policy in place prevents this sender from sending this message to this recipient, see message bus configuration file (rejected message had interface "org.bluez.Adapter" member "RegisterAgent" error name "(unset)" destination "org.bluez")

/etc/dbus-1/system.d/bluetooth.conf looks ok, so I don't know why it is blocking access.

Comment 1 Ignacio Vazquez-Abrams 2008-12-07 10:58:17 UTC

*** This bug has been marked as a duplicate of bug 475068 ***

Comment 2 Ignacio Vazquez-Abrams 2008-12-07 17:30:36 UTC
Alright, not a duplicate. My bad.

Comment 3 Gabriele Turchi 2008-12-08 09:06:49 UTC
Maybe related to bug 475096 (https://bugzilla.redhat.com/show_bug.cgi?id=475096) "Bluetooth USB dongle not detected under Gnome".


At least looking at bug number... :-) 69->96

Comment 4 Bastien Nocera 2008-12-08 16:19:28 UTC
Which version of dbus?

Comment 5 Colin Walters 2008-12-08 16:27:20 UTC
The /etc/dbus-1/system.d/bluetooth.conf file needs:

    <allow send_destination="org.bluez"/>

Comment 6 Colin Walters 2008-12-08 16:38:21 UTC
Incidentally it should also *not* have:

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

The first rule allows anyone to send a message to the object "/" which is bad.  The destination rules should be enough.

Comment 7 Pierre Ossman 2008-12-08 21:14:40 UTC
(In reply to comment #4)
> Which version of dbus?

dbus-1.2.6-1.fc10.i386

bluetooth.conf has:

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

No time to test manual modification right now I'm afraid.

Comment 8 Marcel Holtmann 2008-12-08 21:21:25 UTC
This is what BlueZ should be using and it is exactly what I committed upstream:

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

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

  <policy context="default">
    <deny send_destination="org.bluez"/>
  </policy>

New packages for F10 should follow shortly.

Comment 9 Carlos Romero 2008-12-08 23:24:50 UTC
does not seem to work with with test-discovery
patch below tested with F10, bluez-4.22, bluetooth mouse

diff -ru a/src/bluetooth.conf b/src/bluetooth.conf
--- a/src/bluetooth.conf	2008-12-05 14:08:45.000000000 -0500
+++ b/src/bluetooth.conf	2008-12-08 18:17:07.000000000 -0500
@@ -12,7 +12,7 @@
   </policy>
 
   <policy at_console="true">
-    <allow send_path="/"/>
+    <allow send_path="*"/>
 
     <allow send_destination="org.bluez.Manager"/>
     <allow receive_sender="org.bluez.Manager"/>
@@ -28,6 +28,8 @@
   </policy>
 
   <policy context="default">
+    <allow send_requested_reply="true" send_type="signal"/>
+
     <deny send_destination="org.bluez.Manager"/>
     <deny receive_sender="org.bluez.Manager"/>

Comment 10 Marcel Holtmann 2008-12-08 23:39:45 UTC
If these is about the missing DeviceFound signals, then that is a total different discussion. The signals should be allowed always and there is a D-Bus patch that fixes this.

Comment 11 Carlos Romero 2008-12-09 00:54:35 UTC
what about the agent

Dec  8 19:51:48 kcrashtop bluetoothd[2243]: Agent replied with an error: org.freedesktop.DBus.Error.AccessDenied, A security policy in place prevents this sender from sending this message to this recipient, see message bus configuration file (rejected message had interface "org.bluez.Agent" member "RequestPinCode" error name "(unset)" destination ":1.56")

Comment 12 Marcel Holtmann 2008-12-09 01:27:55 UTC
Does it help if you add a <allow send_interface="org.bluez.Agent"/> to at_console section?

Comment 13 Carlos Romero 2008-12-09 01:49:24 UTC
it did work in the default section

Comment 14 Marcel Holtmann 2008-12-09 01:59:23 UTC
My bad. It actually has to go into the user="root" section since bluetoothd is sending the message to an agent running as normal user. Can you please double-check that moving it into the user="root" section makes it work.

Comment 15 Carlos Romero 2008-12-09 02:16:19 UTC
It works.
On a side note, everything is suddenly able to pair using bluetooth applet
I was not able to cleanly pair my a2dp or keyboard til now

Comment 16 Bastien Nocera 2008-12-09 11:03:49 UTC
*** Bug 475436 has been marked as a duplicate of this bug. ***

Comment 17 Bastien Nocera 2008-12-09 11:04:00 UTC
*** Bug 475096 has been marked as a duplicate of this bug. ***

Comment 18 Bastien Nocera 2008-12-09 11:05:30 UTC
*** Bug 475279 has been marked as a duplicate of this bug. ***

Comment 19 Bastien Nocera 2008-12-09 11:06:20 UTC
*** Bug 475459 has been marked as a duplicate of this bug. ***

Comment 20 Dawid Lorenz 2008-12-09 11:27:16 UTC
How exactly /etc/dbus-1/system.d/bluetooth.conf file should look like? Mine is now:

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

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

  <policy context="default">
    <deny send_destination="org.bluez"/>
  </policy>

And I can see my Bluetooth settings (Visibility, Friendly Name, Known Devices) and I can send files to my phone from Nautilus via 'Send To...' plugin. However, BT icon is not present (unless I check 'Always display icon' opposed to 'Only display when adaptor is present'), I can't setup a new device as it can't find any BT devices, also 'Send files to device...' and 'Browse files on device...' options after right-click on icon are greyed out.

Comment 21 Fedora Update System 2008-12-09 11:31:58 UTC
bluez-utils-3.35-5.fc8 has been submitted as an update for Fedora 8.
http://admin.fedoraproject.org/updates/bluez-utils-3.35-5.fc8

Comment 22 Fedora Update System 2008-12-09 11:32:38 UTC
bluez-utils-3.36-3.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/bluez-utils-3.36-3.fc9

Comment 23 Marcel Holtmann 2008-12-09 11:34:10 UTC
We still have an issue with the signals. That has to be decided by D-Bus upstream first on how we continue. Either they add a global allow for signals or we have to do it for every daemon.

Comment 24 Fedora Update System 2008-12-09 11:36:52 UTC
bluez-4.22-2.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/bluez-4.22-2.fc10

Comment 25 Fedora Update System 2008-12-10 04:35:49 UTC
bluez-4.22-2.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update bluez'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2008-11087

Comment 26 Fedora Update System 2008-12-10 04:37:46 UTC
bluez-utils-3.35-5.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing-newkey update bluez-utils'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F8/FEDORA-2008-11103

Comment 27 Fedora Update System 2008-12-10 04:39:05 UTC
bluez-utils-3.36-3.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing-newkey update bluez-utils'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-11119

Comment 28 Miguel Morales 2008-12-10 14:16:29 UTC
Hi, I'm still having problems after update it (F10). I can't pairing any device, and it don't find any device. I can't send any file to the phone that is already paired (before the bug), in the transfer windows can see "org.openobex.Error.ConnectionAttempFaild"

All the best, Miguel

Comment 29 Bastien Nocera 2008-12-11 14:30:56 UTC
*** Bug 475989 has been marked as a duplicate of this bug. ***

Comment 30 Juhani Jaakola 2008-12-12 08:44:34 UTC
*** Bug 476116 has been marked as a duplicate of this bug. ***

Comment 31 Leonardo 2009-01-05 23:23:53 UTC
I have the same problem above. When I try to send a file to my Nokia phone, it says "org.openobex.Error.ConnectionAttempFaild". When I try to browse the device, it says "DBus error org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)". I'm testing on F10, using bluez 4.22-2. Follows dmesg output:

usb 4-2: new full speed USB device using uhci_hcd and address 4
usb 4-2: configuration #1 chosen from 1 choice
usb 4-2: New USB device found, idVendor=1caa, idProduct=0001
usb 4-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0

I need very much to use bluetooth (specially file transfer), but I can't use it on my desktop (F10) only on my laptop (Ubuntu Hardy).

If you need any more information, say me and I'll do what I can to help.

Best regards.

Comment 32 Fedora Update System 2009-01-07 09:09:18 UTC
bluez-utils-3.36-3.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 33 Fedora Update System 2009-01-07 09:25:35 UTC
bluez-4.22-2.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 34 Fedora Update System 2009-01-07 09:36:35 UTC
bluez-utils-3.35-5.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 35 Dave Hindle 2009-01-22 16:30:59 UTC
I am having trouble getting my BT dongle working. Its a Belkin F8T009 and has worked before and works fine with other distro's. Is it a bluez4 problem? The relevant part of /var/log/messages reads...

bluetoothd: HCI dev 0 up
bluetoothd: Starting security manager 0
bluetoothd: Registered interface org.bluez.Service on path /org/bluez/1923/hci0
bluetoothd: Can't write to class od device: Unknown error 4294967186 (-110)
kernel: hci_cmd_task: hci0 command tx timeout

I can't find reference to this error anywhere, but I'd be surprised if I was the only one getting it.

Comment 36 Leif Gruenwoldt 2009-01-22 16:36:29 UTC
(In reply to comment #33)
> bluez-4.22-2.fc10 has been pushed to the Fedora 10 stable repository.  If
> problems still persist, please make note of it in this bug report.

This update did not fix bluetooth for me either.

Comment 37 Bastien Nocera 2009-01-22 17:40:39 UTC
(In reply to comment #36)
> (In reply to comment #33)
> > bluez-4.22-2.fc10 has been pushed to the Fedora 10 stable repository.  If
> > problems still persist, please make note of it in this bug report.
> 
> This update did not fix bluetooth for me either.

That's very unlikely given that the dbus changes were reverted later on... File a new bug if it's actually broken.


Note You need to log in before you can comment on or make changes to this bug.