chiark / gitweb /
bus: when getting credentials of a bus name that is activatable but not activated...
[elogind.git] / src / libsystemd-bus / bus-control.c
index c3186a08c2d1f33cd6189c144c2b625d8efcdbf7..f08d78a7891d1a40dbef1abe4247ce952d80d4ac 100644 (file)
@@ -387,6 +387,10 @@ static int bus_get_owner_kdbus(
 
         conn_info = (struct kdbus_conn_info *) ((uint8_t *) bus->kdbus_buffer + cmd->offset);
 
+        /* Non-activated names are considered not available */
+        if (conn_info->flags & KDBUS_HELLO_ACTIVATOR)
+                return name[0] == ':' ? -ENXIO : -ENOENT;
+
         c = bus_creds_new();
         if (!c)
                 return -ENOMEM;