summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/sd-bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-bus/sd-bus.c')
-rw-r--r--src/libsystemd-bus/sd-bus.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libsystemd-bus/sd-bus.c b/src/libsystemd-bus/sd-bus.c
index 37408cf7b4..1a60356311 100644
--- a/src/libsystemd-bus/sd-bus.c
+++ b/src/libsystemd-bus/sd-bus.c
@@ -1280,7 +1280,12 @@ static int bus_seal_message(sd_bus *b, sd_bus_message *m) {
assert(b);
assert(m);
- if (m->header->version > b->message_version)
+ if (b->message_version != 0 &&
+ m->header->version != b->message_version)
+ return -EPERM;
+
+ if (b->message_endian != 0 &&
+ m->header->endian != b->message_endian)
return -EPERM;
if (m->sealed) {
@@ -1298,9 +1303,6 @@ int bus_seal_synthetic_message(sd_bus *b, sd_bus_message *m) {
assert(b);
assert(m);
- if (m->header->version > b->message_version)
- return -EPERM;
-
/* The bus specification says the serial number cannot be 0,
* hence let's fill something in for synthetic messages. Since
* synthetic messages might have a fake sender and we don't