diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/load-fragment.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index cb553e1252..b961916ee0 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -574,7 +574,9 @@ int config_parse_exec( void *data, void *userdata) { + _cleanup_free_ char *cmd = NULL; ExecCommand **e = data; + Unit *u = userdata; const char *p; bool semicolon; int r; @@ -583,6 +585,7 @@ int config_parse_exec( assert(lvalue); assert(rvalue); assert(e); + assert(u); e += ltype; rvalue += strspn(rvalue, WHITESPACE); @@ -593,7 +596,13 @@ int config_parse_exec( return 0; } - p = rvalue; + r = unit_full_printf(u, rvalue, &cmd); + if (r < 0) { + log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve unit specifiers on %s, ignoring: %m", rvalue); + return 0; + } + + p = cmd; do { _cleanup_free_ char *path = NULL, *firstword = NULL; bool separate_argv0 = false, ignore = false; |