]> git.ipfire.org Git - thirdparty/systemd.git/commit
udev-node: use symlink_atomic_full_label() to create devlink 24646/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 11 Apr 2022 03:18:13 +0000 (12:18 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 18 Sep 2022 14:23:23 +0000 (23:23 +0900)
commit6d42138593b003ca4cd1a11ead2d119e6d730841
tree980f8e8f43e2ee77c8090dea07c1f809851396fa
parent590d81002bbce1a1bcce21056d12873fb96ee3a9
udev-node: use symlink_atomic_full_label() to create devlink

If the filename of a device symlink is too long, then the temporary
filename may become invalid, and we fail to create symlink.

The function `tempfn_random()` used in symlink_atomic_full() generates
a safe temporary filename.

Note that, thanks to the PR #23043, now only one worker can handle
the same symlink simultaneously. Hence, the device ID based temporary
filename is not necessary.
src/udev/udev-node.c