summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-message.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-bus/bus-message.c')
-rw-r--r--src/libsystemd-bus/bus-message.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c
index e0fb1f41db..5783140cf8 100644
--- a/src/libsystemd-bus/bus-message.c
+++ b/src/libsystemd-bus/bus-message.c
@@ -3555,8 +3555,10 @@ int bus_message_parse_fields(sd_bus_message *m) {
}
int bus_message_seal(sd_bus_message *m, uint64_t serial) {
- int r;
+ struct bus_body_part *part;
size_t l, a;
+ unsigned i;
+ int r;
assert(m);
@@ -3595,6 +3597,10 @@ int bus_message_seal(sd_bus_message *m, uint64_t serial) {
m->header->fields_size -= a;
}
+ for (i = 0, part = &m->body; i < m->n_body_parts; i++, part = part->next)
+ if (part->memfd >= 0 && part->sealed)
+ ioctl(part->memfd, KDBUS_CMD_MEMFD_SEAL_SET, 1);
+
m->header->serial = serial;
m->sealed = true;