summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-control.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-21 18:47:33 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-21 23:21:31 +0100
commitc20733832fdfc780380f1b276655d69782057e49 (patch)
tree3b8c6f5a1d034137cdf7d9a38cc4d97675a6b5ba /src/libsystemd-bus/bus-control.c
parent050eb34da8bfe26ecdbda072ce945210279a9753 (diff)
bus: when getting credentials of a bus name that is activatable but not activated, say we don't have anything.
Diffstat (limited to 'src/libsystemd-bus/bus-control.c')
-rw-r--r--src/libsystemd-bus/bus-control.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-control.c b/src/libsystemd-bus/bus-control.c
index c3186a08c2..f08d78a789 100644
--- a/src/libsystemd-bus/bus-control.c
+++ b/src/libsystemd-bus/bus-control.c
@@ -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;