1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00

udev: do not unescape command result

This fixes a bug introduced by 28a5065149.

Fixes RHBZ#1935062 (https://bugzilla.redhat.com/show_bug.cgi?id=1935062).
This commit is contained in:
Yu Watanabe 2021-03-05 09:37:24 +09:00
parent f385c44787
commit 86c783d93d

View File

@ -1746,9 +1746,10 @@ static int udev_rule_apply_token_to_event(
return token->op == OP_NOMATCH;
}
lines = strv_split_newlines(result);
if (!lines)
return log_oom();
r = strv_split_newlines_full(&lines, result, EXTRACT_RETAIN_ESCAPE);
if (r < 0)
log_rule_warning_errno(dev, rules, r,
"Failed to extract lines from result of command \"%s\", ignoring: %m", buf);
STRV_FOREACH(line, lines) {
char *key, *value;