]> git.ipfire.org Git - thirdparty/systemd.git/commit
udev-rules: ignore OWNER=/GROUP= with unknown user/group
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 22 Jan 2025 20:59:04 +0000 (05:59 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 23 Jan 2025 17:33:18 +0000 (02:33 +0900)
commita1ee55e3c9eaa02737cb74cf3fc93583b307c8cd
treed371294c76b3b07539b3a8efd2a08067482757c2
parente89eaeb0274a51a59e00e7290ee682d46e324b73
udev-rules: ignore OWNER=/GROUP= with unknown user/group

Previously, when an unknown or invalid user/group is specified,
a token was installed with UID_INVALID/GID_INVALID. That's not only
meaningless in most cases, but also clears previous assignment,
if multiple OWNER=/GROUP= token exist for the same device, e.g.

KERNEL=="sda", GROUP="disk"
KERNEL=="sda", GROUP="nonexistentuser"

This makes when an unknown user/group is specified, the line will be
ignored. Hence, in the above example, the device will be owned by the
group "disk".
src/udev/udev-rules.c