base-files/hotplug: fix dedicated group for tty devices
authorMichael Heimpold <mhei@heimpold.de>
Tue, 2 Apr 2019 19:48:11 +0000 (21:48 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Thu, 4 Apr 2019 15:09:40 +0000 (17:09 +0200)
Commit 124ab1dc0a and 5523ee3459 introduced the assignment of the
group "tty" to /dev/tty* devices in order to support unprivileged
user access to serial devices.

However, due to an improperly rebased commit this feature broke.

This patch restores the lost hunk in hotplug.json file to
re-introduce this feature and also renames the existing "tty" group
to "dialout" as this is the more typical name for such a group
on desktop systems.

Fixes: 5209cfa534 ("procd: fix hotplug.json syntax")
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Acked-by: Jo-Philipp Wich <jo@mein.io>
package/base-files/files/etc/group
package/system/procd/files/hotplug.json

index e8e2adf4ac6ea940d38c35ee6faf359877fbc2d5..5b06dc6db96418461484d112c75797bf137c683d 100644 (file)
@@ -1,8 +1,8 @@
 root:x:0:
 daemon:x:1:
 adm:x:4:
-tty:x:5:
 mail:x:8:
+dialout:x:20:
 audio:x:29:
 www-data:x:33:
 ftp:x:55:
index 1c949bbea33a0c066934aef92d53d6a096192013..f676bac79e43c00bbf3e731cb7a156dec2ffbd31 100644 (file)
                                                [ "regex", "DEVNAME", "^snd" ],
                                                [ "makedev", "/dev/%DEVNAME%", "0660", "audio" ]
                                        ],
+                                       [ "if",
+                                               [ "regex", "DEVNAME", "^tty" ],
+                                               [ "makedev", "/dev/%DEVNAME%", "0660", "dialout" ]
+                                       ],
                                        [ "if",
                                                [ "has", "DEVNAME" ],
                                                [ "makedev", "/dev/%DEVNAME%", "0600" ]