Skip to content

Commit

Permalink
core: revert "core: resolve specifier in config_parse_exec()"
Browse files Browse the repository at this point in the history
This reverts commit cb48dfc.

Exec*-settings resolve specifiers twice:
%%U -> config_parse_exec [cb48dfc] -> %U -> service_spawn -> 0

Fixes #2637
  • Loading branch information
evverx committed Feb 18, 2016
1 parent 2525499 commit bd1b973
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/core/load-fragment.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,9 +574,7 @@ 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;
Expand All @@ -585,7 +583,6 @@ int config_parse_exec(
assert(lvalue);
assert(rvalue);
assert(e);
assert(u);

e += ltype;
rvalue += strspn(rvalue, WHITESPACE);
Expand All @@ -596,13 +593,7 @@ int config_parse_exec(
return 0;
}

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;
p = rvalue;
do {
_cleanup_free_ char *path = NULL, *firstword = NULL;
bool separate_argv0 = false, ignore = false;
Expand Down

0 comments on commit bd1b973

Please sign in to comment.