sd-device,udev: refuse invalid devlink and store in normalized form
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 6 Apr 2023 23:44:00 +0000 (08:44 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 7 Apr 2023 18:38:19 +0000 (03:38 +0900)
commit2c5f119c3cc78bd7da0c7c56b57eca43bac464c1
tree3dfc4b4d0996e3511bc98e158327f4fad0b6f1ee
parent733b7bfd79a9bf7c46e8930ca5f235507aeed6fc
sd-device,udev: refuse invalid devlink and store in normalized form

This is especially for the case that the path contains "..".
Prompted by https://github.com/systemd/systemd/pull/27164#issuecomment-1498863858.

This also makes SYMLINK= gracefully handle paths prefixed with "/dev/",
and manage devlink paths with path_hash_ops.
src/libsystemd/sd-device/device-private.h
src/libsystemd/sd-device/sd-device.c
src/udev/udev-rules.c
test/udev-test.pl