1 |
- sys-apps/systemd has it's own service to handle /dev/rfkill from |
2 |
99-systemd.rules we don't install with sys-fs/udev: |
3 |
|
4 |
SUBSYSTEM=="rfkill", TAG+="systemd", IMPORT{builtin}="path_id", |
5 |
ENV{SYSTEMD_WANTS}+="systemd-rfkill@$name.service" |
6 |
|
7 |
- so this is about sys-fs/udev (and perhaps, sys-auth/consolekit for ACLs) |
8 |
- since the udev .rules are not application specific, we should control |
9 |
it from sys-fs/udev's /lib/udev/rules.d/40-gentoo.rules |
10 |
- sys-fs/udev leaves it to root:root as: |
11 |
|
12 |
KERNEL=="rfkill", MODE="0664" |
13 |
|
14 |
- third party packages like mate-bluetooth, gnome-bluetooth install both |
15 |
their own udev .rules to adjust /dev/rfkill to plugdev: |
16 |
|
17 |
KERNEL=="rfkill", GROUP="plugdev", MODE="0664" |
18 |
|
19 |
So I'd like to propose some unification: |
20 |
|
21 |
I don't have a system with /dev/rfkill unfortunately to test this, but I |
22 |
believe we should add this to 40-gentoo.rules and create group 'rfkill': |
23 |
|
24 |
SUBSYSTEM=="rfkill", GROUP="rfkill", MODE="0664" |
25 |
|
26 |
And this line would go as /lib/udev/rules.d/70-gentoo-acl.rules (as the |
27 |
original filename in upstream ConsoleKit is 70-udev-acl.rules): |
28 |
|
29 |
SUBSYSTEM=="rfkill", TAG+="udev-acl" |
30 |
|
31 |
So that it would then look like: |
32 |
|
33 |
$ ls -ld /dev/rfkill |
34 |
crw-rw----+ 1 root rfkill 116, 1 Feb 21 16:27 /dev/rfkill |
35 |
|
36 |
Notice the "+" there for ACLs if user is active (logged in using |
37 |
ConsoleKit): |
38 |
|
39 |
$ getfacl -a /dev/rfkill |
40 |
# file: dev/rfkill |
41 |
# owner: root |
42 |
# group: rfkill |
43 |
user::rw- |
44 |
user:ssuominen:rw- |
45 |
group::rw- |
46 |
mask::rw- |
47 |
other::--- |
48 |
|
49 |
I didn't actually run that just on /dev/rfkill, but I took an example |
50 |
from /dev/snd/seq, and edited those at this mail. |
51 |
|
52 |
I'd like someone with /dev/rfkill to test I'm right, if possible, and |
53 |
verify no other cruft is interfering with it (like those of installed by |
54 |
those apps I mentioned, `grep rfkill /lib/udev/rules.d/*`) |
55 |
|
56 |
Any thoughts? |