public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Handling /dev/rfkill, testers wanted
@ 2014-03-07 19:17 Samuli Suominen
  2014-03-07 19:39 ` Ian Stakenvicius
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Samuli Suominen @ 2014-03-07 19:17 UTC (permalink / raw
  To: gentoo-dev

- sys-apps/systemd has it's own service to handle /dev/rfkill from
99-systemd.rules we don't install with sys-fs/udev:

SUBSYSTEM=="rfkill", TAG+="systemd", IMPORT{builtin}="path_id",
ENV{SYSTEMD_WANTS}+="systemd-rfkill@$name.service"

- so this is about sys-fs/udev (and perhaps, sys-auth/consolekit for ACLs)
- since the udev .rules are not application specific, we should control
it from sys-fs/udev's /lib/udev/rules.d/40-gentoo.rules
- sys-fs/udev leaves it to root:root as:

KERNEL=="rfkill", MODE="0664"

- third party packages like mate-bluetooth, gnome-bluetooth install both
their own udev .rules to adjust /dev/rfkill to plugdev:

KERNEL=="rfkill", GROUP="plugdev",    MODE="0664"

So I'd like to propose some unification:

I don't have a system with /dev/rfkill unfortunately to test this, but I
believe we should add this to 40-gentoo.rules and create group 'rfkill':

SUBSYSTEM=="rfkill", GROUP="rfkill", MODE="0664"

And this line would go as /lib/udev/rules.d/70-gentoo-acl.rules (as the
original filename in upstream ConsoleKit is 70-udev-acl.rules):

SUBSYSTEM=="rfkill", TAG+="udev-acl"

So that it would then look like:

$ ls -ld /dev/rfkill
crw-rw----+ 1 root rfkill 116, 1 Feb 21 16:27 /dev/rfkill

Notice the "+" there for ACLs if user is active (logged in using
ConsoleKit):

$ getfacl -a /dev/rfkill
# file: dev/rfkill
# owner: root
# group: rfkill
user::rw-
user:ssuominen:rw-
group::rw-
mask::rw-
other::---

I didn't actually run that just on /dev/rfkill, but I took an example
from /dev/snd/seq, and edited those at this mail.

I'd like someone with /dev/rfkill to test I'm right, if possible, and
verify no other cruft is interfering with it (like those of installed by
those apps I mentioned, `grep rfkill /lib/udev/rules.d/*`)

Any thoughts?


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-03-08  5:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-07 19:17 [gentoo-dev] Handling /dev/rfkill, testers wanted Samuli Suominen
2014-03-07 19:39 ` Ian Stakenvicius
2014-03-07 19:55   ` Samuli Suominen
2014-03-07 19:57 ` Samuli Suominen
2014-03-07 20:15   ` Samuli Suominen
2014-03-07 22:37     ` Alexander Tsoy
2014-03-07 22:50 ` Alexander Tsoy
2014-03-08  5:43   ` Samuli Suominen
2014-03-08  0:27 ` [gentoo-dev] " Steven J. Long

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox