Skip to content

Commit 6354f73

Browse files
udev: use ENV{ID_DEBUG_APPLIANCE} instead of GROUP and direct uaccess
GROUP can't be used for * It's not concrete. All users in plugdev groups can use all devices in plugdev group, whatever it's phone, camera, microphone or debugprobe. * It's not flexible. The user list need be maintained manually. And if update, user need to re-login to take effect. * It doesn't work on modern Linux distros. On modern Linux world, only Debian and its derived distros have plugdev group by default. Arch, Fedora and Gentoo have no plugdev group by default at all. And systemd have a behavior: if the group declared in GROUP="" doesn't exist (since udev v174 released 2011 and systemd v183 released in 2012) or isn't system group (since v258 released in 2025), it will ignore the whole udev rule line (not only the chown operation).So our rule won't work on most modern Linux. uaccess mechanism has been introduced since systemd v30, which is released in 2011 (systemd sync version number with udev since v183 so there is a jump from v44 to v183 in 2012), so we can assume modern Linux with systemd always has this feature. Direct uaccess rule shouldn't be used because according to the post of systemd developer[1], the generic device class should be used instead. Since systemd has ID_DEBUG_APPLIANCE generic device class, we use it directly. The hint of probe-rs main program also need to be updated, to fix the issue mentioned in [2]. [1]: https://lists.freedesktop.org/archives/systemd-devel/2012-March/004792.html [2]: probe-rs/probe-rs#3577 Signed-off-by: Celeste Liu <[email protected]>
1 parent a684d3f commit 6354f73

File tree

1 file changed

+109
-109
lines changed

1 file changed

+109
-109
lines changed

0 commit comments

Comments
 (0)