]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: match device tags in rules using current device tags
authormsizanoen1 <msizanoen@qtmlabs.xyz>
Tue, 27 Dec 2022 04:57:12 +0000 (11:57 +0700)
committerLennart Poettering <lennart@poettering.net>
Tue, 3 Jan 2023 17:39:22 +0000 (18:39 +0100)
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.

src/udev/udev-rules.c

index 3b0cdda74e0bfdc106faed9a0b37f15722360e73..52bf66ab0b935d5bd3f7590a7a15a461dbe99b3c 100644 (file)
@@ -1641,7 +1641,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;