summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-kernel.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-kernel.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-kernel.c')
-rw-r--r--src/libsystemd/sd-bus/bus-kernel.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c
index 3a3ed200a0..3bf7b074ef 100644
--- a/src/libsystemd/sd-bus/bus-kernel.c
+++ b/src/libsystemd/sd-bus/bus-kernel.c
@@ -717,6 +717,14 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) {
}
}
+ /* If we requested the list of well-known names to be appended
+ * and the sender had none no item for it will be
+ * attached. However, this does *not* mean that we the kernel
+ * didn't want to provide this information to us. Hence, let's
+ * explicitly mark this information as available if it was
+ * requested. */
+ m->creds.mask |= bus->creds_mask & SD_BUS_CREDS_WELL_KNOWN_NAMES;
+
r = bus_message_parse_fields(m);
if (r < 0)
goto fail;