diff options
author | Daniel Mack <daniel@zonque.org> | 2014-10-22 14:41:53 +0200 |
---|---|---|
committer | Daniel Mack <daniel@zonque.org> | 2014-11-11 14:14:01 +0100 |
commit | 022fb8558e797483709ab3e9fe846f04f7026dac (patch) | |
tree | 506558821d73d5a71578d3bd66377be289f16d52 /src/libsystemd/sd-bus/bus-message.h | |
parent | 7e27f3121e5a10629302b5221eb21345f832724a (diff) |
sd-bus: add sd_bus_message.verify_destination_id and .destination_ptr
kdbus learned to accept both a numerical destination ID as well as a
well-known-name. In that case, kdbus makes sure that the numerical ID is in
fact the owner of the provided name and fails otherwise.
This allows for race-free assertion of a bus name owner while sending a
message, which is a requirement for bus-proxyd.
Add two new fields to sd_bus_message, and set the numerical ID to
verify_destination_id if bus_message_setup_kmsg() is called for a
message with a well-known name.
Also, set the destination's name in the kdbus item to .destination_ptr
if it is non-NULL.
Normal users should not touch these fields, and they're not publicy
accessible.
Diffstat (limited to 'src/libsystemd/sd-bus/bus-message.h')
-rw-r--r-- | src/libsystemd/sd-bus/bus-message.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/bus-message.h b/src/libsystemd/sd-bus/bus-message.h index df792945b0..8aa71fa1d8 100644 --- a/src/libsystemd/sd-bus/bus-message.h +++ b/src/libsystemd/sd-bus/bus-message.h @@ -100,6 +100,7 @@ struct sd_bus_message { usec_t realtime; uint64_t seqnum; int64_t priority; + uint64_t verify_destination_id; bool sealed:1; bool dont_send:1; @@ -143,6 +144,7 @@ struct sd_bus_message { char sender_buffer[3 + DECIMAL_STR_MAX(uint64_t) + 1]; char destination_buffer[3 + DECIMAL_STR_MAX(uint64_t) + 1]; + char *destination_ptr; size_t header_offsets[_BUS_MESSAGE_HEADER_MAX]; unsigned n_header_offsets; |