sd-device,udev: tag must be a valid filename
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 6 Apr 2023 23:45:35 +0000 (08:45 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 7 Apr 2023 19:49:46 +0000 (04:49 +0900)
commit0b4c70b47a6dea1841a3be5c132d562d71efe182
treed0a07493b709df40058960c1672f2326b8a3046c
parent2c5f119c3cc78bd7da0c7c56b57eca43bac464c1
sd-device,udev: tag must be a valid filename

All tags are managed under /run/udev/tags, and the directories there are
named with tags. Hence, each tag must be a valid filename.

This also makes all validity check moved to sd-device side, and
makes failure caused by setting invalid tags non-critical.

With this change, an empty string cannot be assigned to TAG=, hence the
test cases are adjusted.
src/libsystemd/sd-device/device-private.c
src/libsystemd/sd-device/sd-device.c
src/udev/udev-rules.c
test/udev-test.pl