Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 273909 - HAL dbus policy updates refuse pulseaudio access
Summary: HAL dbus policy updates refuse pulseaudio access
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-12 20:01 UTC by Robert Piasek (RETIRED)
Modified: 2011-01-06 16:53 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Pulseaudio systemwide instance policy file. (pulseaudio.conf,550 bytes, text/plain)
2009-06-22 22:46 UTC, Maciej Grela
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Piasek (RETIRED) gentoo-dev 2009-06-12 20:01:12 UTC
pulse is unable to query hal via dbus, as it's restricted to root user only (pulseaudio runs as non-privileged user).


Jun 12 20:39:28 [dbus-daemon] Rejected send message, 1 matched rules; type="method_call", sender=":1.9" (uid=106 pid=25992 comm="/usr/bin/pulseaudio --log-target=syslog --disallow") interface="org.freedesktop.Hal.Manager" member="FindDeviceByCapability" error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0 pid=25818 comm="/usr/sbin/hald --use-syslog --verbose=no "))                                                                                                                                                  
Jun 12 20:39:28 [pulseaudio] module-hal-detect.c: D-Bus error while parsing HAL data: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 1 matched rules; type="method_call", sender=":1.9" (uid=106 pid=25992 comm="/usr/bin/pulseaudio --log-target=syslog --disallow") interface="org.freedesktop.Hal.Manager" member="FindDeviceByCapability" error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0 pid=25818 comm="/usr/sbin/hald --use-syslog --verbose=no "))                                                 
Jun 12 20:39:28 [pulseaudio] main.c: Failed to acquire org.pulseaudio.Server: org.freedesktop.DBus.Error.AccessDenied: Connection ":1.9" is not allowed to own the service "org.pulseaudio.Server" due to security policies in the configuration file  



Reproducible: Always
Comment 1 Daniel Gryniewicz (RETIRED) gentoo-dev 2009-06-12 20:40:58 UTC
It's actually not restricted to root (root has almost no special privileges), it's restricted to plugdev.  If you don't have policykit, then the pulse user must be in the plugdev group.
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-06-13 14:50:52 UTC
Uhhh sorry that I ask but shouldn't hal allow our default system user? It sounds broken that it doesn't. Very broken.
Comment 3 Robert Piasek (RETIRED) gentoo-dev 2009-06-13 16:34:37 UTC
Err, since pulse is a system-created user, shouldn't it have access by default?

Shouldn't plugdev be used for end users, and not system created accounts?

I don't think we should expect users to mess up with policykit/group membership for portage-created accounts.
Comment 4 Daniel Gryniewicz (RETIRED) gentoo-dev 2009-06-13 17:30:20 UTC
The problem is that dbus now has default-deny.  Therefore, every single thing that needs access (in a non-policykit world) needs to have an explicit patched entry in the policy files.  This is *not* hal's fault, it's dbus.

If someone will come up with a canonical list of all the users that need access and what access they need, I'm willing to patch it in.  I've been unable to come up with any alternative other than "allow access to everyone" which got me screamed at for insecurity.  Or, I suppose, mandate policykit, which is what other distros do.
Comment 5 Daniel Gryniewicz (RETIRED) gentoo-dev 2009-06-13 17:37:08 UTC
Actually, looking at the policy files, it looks like there's no reason why you can't have multiple files giving different access to the same things.  So maybe pulseaudio can install it's own conf file giving it access to hal.  That would certainly be better than hal knowing about every possible user that needs access.

Note, I haven't tried this.
Comment 6 Craig Andrews gentoo-dev 2009-06-19 01:10:57 UTC
There should be a sticky notice on Gentoo forums, or at least a blog post, about this change. Requiring users accounts that run pulse to be a member of the plugdev group is a pretty big change... I spent a few hours researching why I suddenly couldn't play sound before finding this bug. I'd love to save other users, who will doubtlessly run into this problem, the time I spent.
Comment 7 Maciej Grela 2009-06-22 22:45:47 UTC
There is a pulseaudio trac entry open for this issue: http://pulseaudio.org/ticket/582

I had this problem when running PA as a systemwide daemon. After adding the attached pulseaudio.conf to /etc/dbus-1/system.d pulseaudio's user is allowed to access dbus and all works fine. Hope you find this policy file useful.

 
Comment 8 Maciej Grela 2009-06-22 22:46:35 UTC
Created attachment 195523 [details]
Pulseaudio systemwide instance policy file.
Comment 9 Daniel Gryniewicz (RETIRED) gentoo-dev 2009-07-23 15:21:31 UTC
Re-assigning to sound.  Either the pulse user needs to be in plugdev, or pulseaudio needs to install a dbus policy file to allow access.
Comment 10 Samuli Suominen (RETIRED) gentoo-dev 2011-01-06 16:53:48 UTC
USE="hal" was removed from pulseaudio-0.9.22 and up in favour of USE="udev".
If this is still a problem with USE="udev", please reopen.