summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-control.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-27 12:51:22 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-27 22:02:13 +0100
commit38ce47e262fbb76b6f6514e8e80cacfc584bee5a (patch)
tree7a55696b5277a3ecf25cddb35429dfda8d4c4974 /src/libsystemd/sd-bus/bus-control.c
parent771b2724c0f9591e8f4dd7463c15bf0c957737dc (diff)
sd-bus: when we get the list of well-known names back from kdbus we shouldn't confuse the empty list with unknown information
Diffstat (limited to 'src/libsystemd/sd-bus/bus-control.c')
-rw-r--r--src/libsystemd/sd-bus/bus-control.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/bus-control.c b/src/libsystemd/sd-bus/bus-control.c
index 758715d74e..e6e905c0e0 100644
--- a/src/libsystemd/sd-bus/bus-control.c
+++ b/src/libsystemd/sd-bus/bus-control.c
@@ -692,6 +692,13 @@ static int bus_get_name_creds_kdbus(
c->mask |= SD_BUS_CREDS_UNIQUE_NAME;
}
+ /* If KDBUS_ITEM_OWNED_NAME is requested then we'll get 0 of
+ them in case the service has no names. This does not mean
+ however that the list of owned names could not be
+ acquired. Hence, let's explicitly clarify that the data is
+ complete. */
+ c->mask |= mask & SD_BUS_CREDS_WELL_KNOWN_NAMES;
+
r = bus_populate_creds_from_items(bus, conn_info, mask, c);
if (r < 0)
goto fail;