summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-kernel.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2015-06-05 15:23:03 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2015-06-05 15:23:03 +0200
commited47f6397d19f05933c27689a74a26d9aeacd06f (patch)
tree84e9c2ed1773062438a483b379850cb64afea339 /src/libsystemd/sd-bus/bus-kernel.c
parent7ffeb45cc63e1326690fd9461b7a4719a3d4f85c (diff)
bus: don't force send-masks on kdbus buses
Right now we always pass KDBUS_ITEM_ATTACH_FLAGS_RECV to KDBUS_CMD_BUS_MAKE, effectively forcing every bus connection to do the same during KDBUS_CMD_HELLO. This used to be a workaround to make sure all metadata is always present. However, we refrained from that approach and intend to make all metadata collection solely rely on /proc access restrictions. Therefore, there is no need to force the send-flags mask on newly created buses.
Diffstat (limited to 'src/libsystemd/sd-bus/bus-kernel.c')
-rw-r--r--src/libsystemd/sd-bus/bus-kernel.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c
index 417e4d5903..572a9c6e64 100644
--- a/src/libsystemd/sd-bus/bus-kernel.c
+++ b/src/libsystemd/sd-bus/bus-kernel.c
@@ -1574,7 +1574,6 @@ int bus_kernel_create_bus(const char *name, bool world, char **s) {
make = alloca0_align(offsetof(struct kdbus_cmd, items) +
ALIGN8(offsetof(struct kdbus_item, bloom_parameter) + sizeof(struct kdbus_bloom_parameter)) +
ALIGN8(offsetof(struct kdbus_item, data64) + sizeof(uint64_t)) +
- ALIGN8(offsetof(struct kdbus_item, data64) + sizeof(uint64_t)) +
ALIGN8(offsetof(struct kdbus_item, str) + DECIMAL_STR_MAX(uid_t) + 1 + l + 1),
8);
@@ -1593,14 +1592,6 @@ int bus_kernel_create_bus(const char *name, bool world, char **s) {
make->size += ALIGN8(n->size);
- /* The buses we create make no restrictions on what metadata
- * peers can read from incoming messages. */
- n = KDBUS_ITEM_NEXT(n);
- n->type = KDBUS_ITEM_ATTACH_FLAGS_RECV;
- n->size = offsetof(struct kdbus_item, data64) + sizeof(uint64_t);
- n->data64[0] = _KDBUS_ATTACH_ANY;
- make->size += ALIGN8(n->size);
-
/* Provide all metadata via bus-owner queries */
n = KDBUS_ITEM_NEXT(n);
n->type = KDBUS_ITEM_ATTACH_FLAGS_SEND;