]> git.ipfire.org Git - thirdparty/systemd.git/commit
login,udev: avoid race between systemd-logind and systemd-udevd in setting ACLs
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 13 May 2025 14:02:13 +0000 (23:02 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 13 May 2025 17:06:02 +0000 (02:06 +0900)
commitc960ca2be1cfd183675df581f049a0c022c1c802
tree7210f106c3ffe03e0116fd17a5003b34d59e113f
parent26a675dd56463cba39b627e053fd71dc32366fde
login,udev: avoid race between systemd-logind and systemd-udevd in setting ACLs

Previously, both udevd and logind modifies ACLs of a device node. Hence,
there exists a race something like the following:
1. udevd reads an old state file,
2. logind updates the state file, and apply new ACLs,
3. udevd applies ACLs based on the old state file.

This makes logind not update ACLs but trigger uevents for relevant
devices to make ACLs updated by udevd.
src/login/logind-seat.c
src/login/logind-seat.h
src/login/logind.c