]> err.no Git - systemd/commitdiff
execute: when parsing ConrolGroup= replace wildcards
authorLennart Poettering <lennart@poettering.net>
Thu, 30 Jun 2011 00:39:29 +0000 (02:39 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 30 Jun 2011 00:39:29 +0000 (02:39 +0200)
src/load-fragment.c

index 0c2ef916522350a70b82c1c0291a6b85e5aba0a2..3146186843f166fd8a76a70b7a379255563fcae8 100644 (file)
@@ -1071,10 +1071,23 @@ static int config_parse_cgroup(
         char *state;
 
         FOREACH_WORD_QUOTED(w, l, rvalue, state) {
-                char *t;
+                char *t, *k;
                 int r;
 
-                if (!(t = cunescape_length(w, l)))
+                t = strndup(w, l);
+                if (!t)
+                        return -ENOMEM;
+
+                k = unit_full_printf(u, t);
+                free(t);
+
+                if (!k)
+                        return -ENOMEM;
+
+                t = cunescape(k);
+                free(k);
+
+                if (!t)
                         return -ENOMEM;
 
                 r = unit_add_cgroup_from_text(u, t);