free(c->cgroup_root);
free(c->description);
- free(c->supplementary_gids);
- c->supplementary_gids = NULL;
+ c->supplementary_gids = mfree(c->supplementary_gids);
strv_free(c->well_known_names);
c->well_known_names = NULL;
if (!c->session) {
const char *shifted;
+ log_debug_elogind("Shifting cgroup \"%s\", root \"%s\"",
+ c->cgroup, c->cgroup_root ? c->cgroup_root : "NULL");
r = cg_shift_path(c->cgroup, c->cgroup_root, &shifted);
if (r < 0)
return r;
+ log_debug_elogind("Shifted: \"%s\"", shifted);
r = cg_path_get_session(shifted, (char**) &c->session);
if (r < 0)
return r;
if (r < 0)
return r;
+/// elogind does not support systemd slices
+#if 0
return cg_path_get_owner_uid(shifted, uid);
+#else
+ *uid = c->uid;
+ return 0;
+#endif // 0
}
_public_ int sd_bus_creds_get_cmdline(sd_bus_creds *c, char ***cmdline) {
return 0;
}
-/// UNNEEDED by elogind
-#if 0
_public_ int sd_bus_creds_get_audit_session_id(sd_bus_creds *c, uint32_t *sessionid) {
assert_return(c, -EINVAL);
assert_return(sessionid, -EINVAL);
*sessionid = c->audit_session_id;
return 0;
}
-#endif // 0
_public_ int sd_bus_creds_get_audit_login_uid(sd_bus_creds *c, uid_t *uid) {
assert_return(c, -EINVAL);
return r;
} else {
if (c->cmdline_size == 0) {
- free(c->cmdline);
- c->cmdline = NULL;
+ c->cmdline = mfree(c->cmdline);
}
c->mask |= SD_BUS_CREDS_CMDLINE;