if (e) {
if (streq(e, "system"))
return sd_bus_open_system(ret);
-#if 0 /// elogind does not support systemd units
+#if 0 /// elogind does not support systemd user instances
else if (STR_IN_SET(e, "session", "user"))
return sd_bus_open_user(ret);
#endif // 0
e = secure_getenv("DBUS_STARTER_ADDRESS");
if (!e) {
-#if 0 /// elogind does not support systemd units
+#if 0 /// elogind does not support systemd user instances
if (cg_pid_get_owner_uid(0, NULL) >= 0)
return sd_bus_open_user(ret);
else
/* Finally, if nothing is set use the cached connection for
* the right scope */
-#if 0 /// elogind does not support systemd units
+#if 0 /// elogind does not support systemd user instances
if (cg_pid_get_owner_uid(0, NULL) >= 0)
return sd_bus_default_user(ret);
else
if (r < 0)
return r;
-#if 0 /// elogind does not support systemd scopes
return cg_pid_get_session(ucred.pid, session);
-#else
- return -ESRCH;
-#endif // 0
}
_public_ int sd_peer_get_owner_uid(int fd, uid_t *uid) {
if (r < 0)
return r;
-#if 0 /// elogind does not support systemd units
return cg_pid_get_owner_uid(ucred.pid, uid);
-#else
- return -ESRCH;
-#endif // 0
}
_public_ int sd_peer_get_unit(int fd, char **unit) {