summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-control.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-12-04 23:36:02 +0100
committerKay Sievers <kay@vrfy.org>2013-12-05 00:22:28 +0100
commit65dae17a2f890b12a07dd4901b3db02b1031c463 (patch)
tree111af98c07c8a491a56c27225fe210a8c2c99832 /src/libsystemd-bus/bus-control.c
parenta8053f197e228437a6c49101a7c513b4955f7883 (diff)
bus: switch to multiple KDBUS_ITEM_NAME including the flags
Diffstat (limited to 'src/libsystemd-bus/bus-control.c')
-rw-r--r--src/libsystemd-bus/bus-control.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/libsystemd-bus/bus-control.c b/src/libsystemd-bus/bus-control.c
index b1172899d0..186724e8ad 100644
--- a/src/libsystemd-bus/bus-control.c
+++ b/src/libsystemd-bus/bus-control.c
@@ -504,14 +504,11 @@ static int bus_get_owner_kdbus(
}
break;
- case KDBUS_ITEM_NAMES:
+ case KDBUS_ITEM_NAME:
if (mask & SD_BUS_CREDS_WELL_KNOWN_NAMES) {
- c->well_known_names_size = item->size - KDBUS_PART_HEADER_SIZE;
- c->well_known_names = memdup(item->data, c->well_known_names_size);
- if (!c->well_known_names) {
- r = -ENOMEM;
+ r = strv_extend(&c->well_known_names, item->name.name);
+ if (r < 0)
goto fail;
- }
c->mask |= SD_BUS_CREDS_WELL_KNOWN_NAMES;
}