summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-06-30 02:39:29 +0200
committerLennart Poettering <lennart@poettering.net>2011-06-30 02:39:29 +0200
commitf284f69a7b0ed1eb4aa812251902e055b0e530b1 (patch)
treed9c0cd64ddae00467bd7fd87ae5fd337ff485c82 /src
parentd42d27ead91e470cb12986d928441e56c0f543ca (diff)
execute: when parsing ConrolGroup= replace wildcards
Diffstat (limited to 'src')
-rw-r--r--src/load-fragment.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/load-fragment.c b/src/load-fragment.c
index 0c2ef91652..3146186843 100644
--- a/src/load-fragment.c
+++ b/src/load-fragment.c
@@ -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);