X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=sidebyside;f=src%2Fload-fragment.c;h=3146186843f166fd8a76a70b7a379255563fcae8;hb=e025b4c306d4b0895786839ebbb934188edc6e61;hp=352db6b38593a06d565f6ead957bda81d0fe4a7f;hpb=15e11d81e7c26439f583e1cf67ac3c712430a79e;p=elogind.git diff --git a/src/load-fragment.c b/src/load-fragment.c index 352db6b38..314618684 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); @@ -1911,7 +1924,8 @@ static int load_from_path(Unit *u, const char *path) { { "KillMode", config_parse_kill_mode, 0, &(context).kill_mode, section }, \ { "KillSignal", config_parse_kill_signal, 0, &(context).kill_signal, section }, \ { "SendSIGKILL", config_parse_bool, 0, &(context).send_sigkill, section }, \ - { "UtmpIdentifier", config_parse_string_printf, 0, &(context).utmp_id, section } + { "UtmpIdentifier", config_parse_string_printf, 0, &(context).utmp_id, section }, \ + { "ControlGroupModify", config_parse_bool, 0, &(context).control_group_modify, section } const ConfigItem items[] = { { "Names", config_parse_names, 0, u, "Unit" },