kernel-install: unquote plugin paths in KERNEL_INSTALL_PLUGINS

To support the case that paths to plugins contain spaces.

Prompted by #34459
This commit is contained in:
Yu Watanabe
2024-09-18 09:47:00 +09:00
parent 0432e28394
commit 6e1816ef16
2 changed files with 11 additions and 4 deletions
+4 -3
View File
@@ -404,15 +404,16 @@ static int context_set_path_strv(Context *c, char* const* strv, const char *sour
static int context_set_plugins(Context *c, const char *s, const char *source) {
_cleanup_strv_free_ char **v = NULL;
int r;
assert(c);
if (c->plugins || !s)
return 0;
v = strv_split(s, NULL);
if (!v)
return log_oom();
r = strv_split_full(&v, s, NULL, EXTRACT_UNQUOTE);
if (r < 0)
return log_error_errno(r, "Failed to parse plugin paths from %s: %m", source);
return context_set_path_strv(c, v, source, "plugins", &c->plugins);
}