diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libsystemd-bus/bus-kernel.c | 6 | ||||
-rw-r--r-- | src/libsystemd-bus/kdbus.h | 11 | ||||
-rw-r--r-- | src/libudev/libudev-monitor.c | 8 |
3 files changed, 16 insertions, 9 deletions
diff --git a/src/libsystemd-bus/bus-kernel.c b/src/libsystemd-bus/bus-kernel.c index 7d514616a4..369eac468b 100644 --- a/src/libsystemd-bus/bus-kernel.c +++ b/src/libsystemd-bus/bus-kernel.c @@ -636,7 +636,7 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) { case KDBUS_ITEM_PAYLOAD_OFF: if (!h) { - h = (struct bus_header *)((uint8_t *)bus->kdbus_buffer + d->vec.offset); + h = (struct bus_header *)((uint8_t *)k + d->vec.offset); if (!bus_header_is_complete(h, d->vec.size)) return -EBADMSG; @@ -721,11 +721,11 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) { if (idx >= begin_body) { if (!part->is_zero) - part->data = (uint8_t *)bus->kdbus_buffer + d->vec.offset; + part->data = (uint8_t *)k + d->vec.offset; part->size = d->vec.size; } else { if (!part->is_zero) - part->data = (uint8_t *)bus->kdbus_buffer + d->vec.offset + (begin_body - idx); + part->data = (uint8_t *)k + d->vec.offset + (begin_body - idx); part->size = d->vec.size - (begin_body - idx); } diff --git a/src/libsystemd-bus/kdbus.h b/src/libsystemd-bus/kdbus.h index f570c0d674..4896c38dfe 100644 --- a/src/libsystemd-bus/kdbus.h +++ b/src/libsystemd-bus/kdbus.h @@ -45,10 +45,8 @@ struct kdbus_notify_id_change { /** * struct kdbus_notify_name_change - name registry change message - * @old_id: Former owner of a name - * @new_id: New owner of a name - * @old_flags: flags from KDBUS_NAME_* the name entry used to have - * @new_flags: flags from KDBUS_NAME_* the name entry has now + * @old: ID and flags of former owner of a name + * @new: ID and flags of new owner of a name * @name: Well-known name * * Sent from kernel to userspace when the owner or activator of @@ -119,7 +117,8 @@ struct kdbus_timestamp { * struct kdbus_vec - I/O vector for kdbus payload items * @size: The size of the vector * @address: Memory address for memory addresses - * @offset: Offset in the in-message payload memory + * @offset: Offset in the in-message payload memory, + * relative to the message head * * Attached to: * KDBUS_ITEM_PAYLOAD_VEC @@ -195,7 +194,7 @@ struct kdbus_policy { /** * enum kdbus_item_type - item types to chain data in a list * @KDBUS_ITEM_PAYLOAD_VEC: Vector to data - * @KDBUS_ITEM_PAYLOAD_OFF: Data at returned offset in the pool + * @KDBUS_ITEM_PAYLOAD_OFF: Data at returned offset to message head * @KDBUS_ITEM_PAYLOAD_MEMFD: Data as sealed memfd * @KDBUS_ITEM_FDS: Attached file descriptors * @KDBUS_ITEM_BLOOM: For broadcasts, carries bloom filter diff --git a/src/libudev/libudev-monitor.c b/src/libudev/libudev-monitor.c index a6dba89376..e07e462af3 100644 --- a/src/libudev/libudev-monitor.c +++ b/src/libudev/libudev-monitor.c @@ -122,6 +122,14 @@ struct udev_monitor *udev_monitor_new_from_netlink_fd(struct udev *udev, const c else return NULL; + /* + * We do not support subscribing to uevents if no instance of udev + * is running. Uevents would otherwise broadcast the processing data + * of the host into containers, which is not acceptable. Containers + * will currently just not get any uevents. + */ + + udev_monitor = udev_monitor_new(udev); if (udev_monitor == NULL) return NULL; |