[systemd-devel] [udev] Giving exclusive rights over a sound card to a user

Léo Gillot-Lamure leo.gillot at navaati.net
Sat Dec 13 08:34:28 PST 2014


I want to give ownership of a particular sound card to a specific user
permanently, so that 1/ I have a guarantee that other users' sessions
can not emit sound on this card and 2/ the sound playing on the
specific users' session does not stop when Ctrl+Alt+F<x>'ing to
another session (due to Pulse releasing the card after noticing the
ACL changed).

To this goal the straight approach was to write an udev rule stating :
> SUBSYSTEM=="sound", ATTRS{idVendor}=="08bb", ATTRS{idProduct}=="2705, OWNER="navaati"
But this was not enough, as the ACL rights were still dynamically
granted to the user when it had a front session on the seat.

I then found out that the combination of this rule in 70-uaccess.rules :
> SUBSYSTEM=="sound", TAG+="uaccess"
and this rule in 73-seat-late.rules :
> TAG=="uaccess", ENV{MAJOR}!="", RUN{builtin}+="uaccess"
provoked the device to be ACL-managed (with udev talking to logind and stuff).

Thus I changed my udev rule to
> SUBSYSTEM=="sound", ATTRS{idVendor}=="08bb", ATTRS{idProduct}=="2705, OWNER="navaati", TAG:=""
(the doc says that the := operator forbid any subsequent overriding of
the variable, and my rule file is ordered early starting with 01-) but
my soundcard devices still have ACL.

Now I don't know what else to do or what mechanism is actually setting
these ACL...
Any ideas ?

Léo Gillot-Lamure.

More information about the systemd-devel mailing list