[systemd-devel] [PATCH 1/2] logind: user access to shared devices

Oleg Samarin osamarin68 at gmail.com
Thu Dec 27 11:08:07 PST 2012


Supporting of acls on devices shared between all seats (like /dev/snd/seq): 
A user gets permitions on it when he activates a session on any seat. 
He/she losses the permitions when no his/her active sessions more exist


В Пн., 24/12/2012 в 13:08 +0100, Lennart Poettering пишет:
> boolean udev props usually use "1" instead of "Y" as positive value.
> 
> 
> > +                // all devices with shared tag are accessible with all seats
> > +                is_shared = udev_device_has_tag(d, "shared");
> 

Corrected

> We do not use C++ style // comments. Only use /* C style comments */
> please, even if C99 is fine with // too..

Corrected

> Please do not use { }  for single line if blocks. This is not PHP ;-)

Corrected

> I don't grok the the ONE_SEAT thing. Could you create a split out patch
> for that and explain in more detail what this about?

ONE_SEAT: I'd set "shared" tag for all devices that have "uaccess" tag
and neither the device itself nor some of its parent has "seat" tag, ie
it cannot be attached to a seat. There are two such
devices on my system: /dev/snd/seq and /dev/snd/timer. They are treated as accessible
from all seats.

I coudn't create a simplier udev rule for this approach, but make two
rules: the first rule sets ONE_SEAT attribute for all devices with
"seat" tag and all their descensors. And the second rule sets "shared"
tag for all devices with "uaccess" tag and without ONE_SEAT attribute.
If you know how to achieve this without ONE_SEAT, I'd like to implement
it.

Oleg.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: systemd-uaccess-shared.patch
Type: text/x-patch
Size: 5262 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20121227/29d4c3f4/attachment.bin>


More information about the systemd-devel mailing list