static bool cgm_chown(struct lxc_handler *handler) { char *cgroup_path = handler->cgroup_info->data; int i; for (i = 0; i < nr_subsystems; i++) { if (!chown_cgroup(subsystems[i], cgroup_path, handler->conf)) WARN("Failed to chown %s:%s to container root", subsystems[i], cgroup_path); } return true; }
static bool cgm_chown(void *hdata, struct lxc_conf *conf) { struct cgm_data *d = hdata; if (!d || !d->cgroup_path) return false; if (!cgm_dbus_connect()) { ERROR("Error connecting to cgroup manager"); return false; } if (!chown_cgroup(d->cgroup_path, conf)) WARN("Failed to chown %s to container root", d->cgroup_path); cgm_dbus_disconnect(); return true; }