chiark / gitweb /
bus: when getting credentials of a bus name that is activatable but not activated...
authorLennart Poettering <lennart@poettering.net>
Sat, 21 Dec 2013 17:47:33 +0000 (18:47 +0100)
committerLennart Poettering <lennart@poettering.net>
Sat, 21 Dec 2013 22:21:31 +0000 (23:21 +0100)
src/libsystemd-bus/bus-control.c

index c3186a0..f08d78a 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;