Blame 0007-core-revert-core-resolve-specifier-in-config_parse_e.patch

2b6823
From 31acc428d9bfa04582ca7c5ec3580ef2b7aed172 Mon Sep 17 00:00:00 2001
2b6823
From: Evgeny Vereshchagin <evvers@ya.ru>
2b6823
Date: Wed, 17 Feb 2016 22:32:36 +0000
2b6823
Subject: [PATCH] core: revert "core: resolve specifier in config_parse_exec()"
2b6823
2b6823
This reverts commit cb48dfca6a8bc15d9081651001a16bf51e03838a.
2b6823
2b6823
Exec*-settings resolve specifiers twice:
2b6823
%%U -> config_parse_exec [cb48dfca6a8] -> %U -> service_spawn -> 0
2b6823
2b6823
Fixes #2637
2b6823
2b6823
(cherry picked from commit bd1b973fb326e9b7587494fd6108e5ded46e9163)
2b6823
---
2b6823
 src/core/load-fragment.c | 11 +----------
2b6823
 1 file changed, 1 insertion(+), 10 deletions(-)
2b6823
2b6823
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
2b6823
index b3dec7b8cc..8804b3ac41 100644
2b6823
--- a/src/core/load-fragment.c
2b6823
+++ b/src/core/load-fragment.c
2b6823
@@ -574,9 +574,7 @@ int config_parse_exec(
2b6823
                 void *data,
2b6823
                 void *userdata) {
2b6823
 
2b6823
-        _cleanup_free_ char *cmd = NULL;
2b6823
         ExecCommand **e = data;
2b6823
-        Unit *u = userdata;
2b6823
         const char *p;
2b6823
         bool semicolon;
2b6823
         int r;
2b6823
@@ -585,7 +583,6 @@ int config_parse_exec(
2b6823
         assert(lvalue);
2b6823
         assert(rvalue);
2b6823
         assert(e);
2b6823
-        assert(u);
2b6823
 
2b6823
         e += ltype;
2b6823
         rvalue += strspn(rvalue, WHITESPACE);
2b6823
@@ -596,13 +593,7 @@ int config_parse_exec(
2b6823
                 return 0;
2b6823
         }
2b6823
 
2b6823
-        r = unit_full_printf(u, rvalue, &cmd);
2b6823
-        if (r < 0) {
2b6823
-                log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve unit specifiers on %s, ignoring: %m", rvalue);
2b6823
-                return 0;
2b6823
-        }
2b6823
-
2b6823
-        p = cmd;
2b6823
+        p = rvalue;
2b6823
         do {
2b6823
                 _cleanup_free_ char *path = NULL, *firstword = NULL;
2b6823
                 bool separate_argv0 = false, ignore = false;