chiark / gitweb /
Prep 235: Enabled sd_peer_get_session() and sd_peer_get_owner_uid() to try to work...
authorSven Eden <yamakuzure@gmx.net>
Tue, 9 Jan 2018 17:57:22 +0000 (18:57 +0100)
committerSven Eden <yamakuzure@gmx.net>
Tue, 9 Jan 2018 17:57:22 +0000 (18:57 +0100)
src/libelogind/sd-bus/sd-bus.c
src/libelogind/sd-login/sd-login.c

index 1af0792d34580f1cfd94a9b5c790cc34569ef9ed..b180fab3383462cf3dbd7df4f4fc07648b5fec92 100644 (file)
@@ -1020,7 +1020,7 @@ _public_ int sd_bus_open(sd_bus **ret) {
         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
@@ -1028,7 +1028,7 @@ _public_ int sd_bus_open(sd_bus **ret) {
 
         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
@@ -3283,7 +3283,7 @@ _public_ int sd_bus_default(sd_bus **ret) {
         /* 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
index f7692cd82b8246f6b8c0550b226357eec1c74d6d..0b406f41ccbea9d9010fd557256e686b11f69273 100644 (file)
@@ -180,11 +180,7 @@ _public_ int sd_peer_get_session(int fd, char **session) {
         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) {
@@ -198,11 +194,7 @@ _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) {