1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00

udev: match device tags in rules using current device tags

This ensures that udev scripts using `TAG-="..."` and expecting later
udev rules to honor it will work properly. An use case is removing the
`uaccess` tag from a device without overriding the original file and
ensuring that `73-seat-uaccess.rules` won't run the uaccess builtin later.

(cherry picked from commit 3102499039)
(cherry picked from commit 7d4ea095d5)
(cherry picked from commit ca948c9601)
This commit is contained in:
msizanoen1 2022-12-27 11:57:12 +07:00 committed by Luca Boccassi
parent 0d315ca6e7
commit 1c36c0b5a1

View File

@ -1614,7 +1614,7 @@ static int udev_rule_apply_token_to_event(
case TK_M_PARENTS_TAG: {
const char *val;
FOREACH_DEVICE_TAG(dev, val)
FOREACH_DEVICE_CURRENT_TAG(dev, val)
if (token_match_string(token, val))
return token->op == OP_MATCH;
return token->op == OP_NOMATCH;