summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-kernel.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-01-22 16:28:58 +0100
committerLennart Poettering <lennart@poettering.net>2014-01-22 16:40:40 +0100
commitcccb0b2cdbd25e90ae92d2d5b107125cb1ca3433 (patch)
treef004ea3e54e6022bfd625b0cbdb4eb97a2a495c0 /src/libsystemd/sd-bus/bus-kernel.c
parent8d1db1d154c1134c9bf92b202ef198cc79979ea8 (diff)
bus: include connection name in credentials structure
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 833ea5574d..95efbbeeb8 100644
--- a/src/libsystemd/sd-bus/bus-kernel.c
+++ b/src/libsystemd/sd-bus/bus-kernel.c
@@ -568,6 +568,11 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) {
goto fail;
break;
+ case KDBUS_ITEM_CONN_NAME:
+ m->creds.conn_name = d->str;
+ m->creds.mask |= SD_BUS_CREDS_CONNECTION_NAME & bus->creds_mask;
+ break;
+
case KDBUS_ITEM_FDS:
case KDBUS_ITEM_SECLABEL:
break;
@@ -1240,6 +1245,9 @@ int kdbus_translate_attach_flags(uint64_t mask, uint64_t *kdbus_mask) {
if (mask & SD_BUS_CREDS_WELL_KNOWN_NAMES)
m |= KDBUS_ATTACH_NAMES;
+ if (mask & SD_BUS_CREDS_CONNECTION_NAME)
+ m |= KDBUS_ATTACH_CONN_NAME;
+
*kdbus_mask = m;
return 0;
}