diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-12-02 15:28:20 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-12-02 15:29:40 +0100 |
commit | 6717d473506800363af9d2bafbf263ee054e856d (patch) | |
tree | c25bf710e766bebf53d62303e7e52412de9dddde /src/libsystemd-bus/bus-objects.c | |
parent | 99f37ad86e114b2d1c9eaedf2bc1a0004a265d26 (diff) |
bus: when replying to an incoming message and the vtable contains the expected return signature generate an error if the response message doesn't match it
Diffstat (limited to 'src/libsystemd-bus/bus-objects.c')
-rw-r--r-- | src/libsystemd-bus/bus-objects.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-objects.c b/src/libsystemd-bus/bus-objects.c index 05a62f4a3e..7cd34c991b 100644 --- a/src/libsystemd-bus/bus-objects.c +++ b/src/libsystemd-bus/bus-objects.c @@ -312,6 +312,11 @@ static int method_callbacks_run( "Invalid arguments '%s' to call %s.%s(), expecting '%s'.", signature, c->interface, c->member, strempty(c->vtable->x.method.signature)); + /* Keep track what the signature of the reply to this message + * should be, so that this can be enforced when sealing the + * reply. */ + m->enforced_reply_signature = strempty(c->vtable->x.method.result); + if (c->vtable->x.method.handler) { r = c->vtable->x.method.handler(bus, m, u, &error); return bus_maybe_reply_error(m, r, &error); |