- assert(s->user->cgroup_path);
-
- if (!s->cgroup_path) {
- if (asprintf(&p, "%s/%s", s->user->cgroup_path, s->id) < 0) {
- log_error("Out of memory");
- return -ENOMEM;
- }
- } else
- p = s->cgroup_path;
-
- r = session_create_one_group(s, SYSTEMD_CGROUP_CONTROLLER, p);
- if (r < 0) {
- log_error("Failed to create "SYSTEMD_CGROUP_CONTROLLER":%s: %s", p, strerror(-r));
- free(p);
- s->cgroup_path = NULL;
- return r;
- }
-
- s->cgroup_path = p;
-
- STRV_FOREACH(k, s->controllers) {
-
- if (strv_contains(s->reset_controllers, *k))
- continue;
-
- r = session_create_one_group(s, *k, p);
- if (r < 0)
- log_warning("Failed to create %s:%s: %s", *k, p, strerror(-r));
- }
-
- STRV_FOREACH(k, s->manager->controllers) {
-
- if (strv_contains(s->reset_controllers, *k) ||
- strv_contains(s->manager->reset_controllers, *k) ||
- strv_contains(s->controllers, *k))
- continue;