]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: fix SECLABEL{selinux} issue (#15064)
authorValery0xff <valery.chernous@gmail.com>
Wed, 11 Mar 2020 00:20:36 +0000 (02:20 +0200)
committerGitHub <noreply@github.com>
Wed, 11 Mar 2020 00:20:36 +0000 (09:20 +0900)
Add SECLABEL{selinux}="some value" cause udevadm crash
systemd-udevd[x]: Worker [x] terminated by signal 11 (SEGV)

It happens since 25de7aa7b90 (Yu Watanabe 2019-04-25 01:21:11 +0200)
when udev rules processing changed to token model. Yu forgot store
attr to SECLABEL token so fix it.

src/udev/udev-rules.c

index b9b350d1ef7a4f8064a7a7bd1e6b796d4bfaff7a..b990f68e933c19933290c2e08d402a8e7cf260c0 100644 (file)
@@ -921,7 +921,7 @@ static int parse_token(UdevRules *rules, const char *key, char *attr, UdevRuleOp
                         op = OP_ASSIGN;
                 }
 
-                r = rule_line_add_token(rule_line, TK_A_SECLABEL, op, value, NULL);
+                r = rule_line_add_token(rule_line, TK_A_SECLABEL, op, value, attr);
         } else if (streq(key, "RUN")) {
                 if (is_match || op == OP_REMOVE)
                         return log_token_invalid_op(rules, key);