Commit graph

98 commits

Author SHA1 Message Date
Lennart Poettering c91cb83c4d bus: rework message struct to keep header with fields in same malloc() block
This allows us to guarantee that the first payload_vec we pass to the
kernel for each message is guaranteed to include the full header and all
its field.
2013-05-15 02:56:45 +02:00
Lennart Poettering 9b29bb6853 bus: add macro for iterating through body parts of a message 2013-05-15 01:43:15 +02:00
Lennart Poettering 13c299d3a8 bus: minor fixes 2013-05-15 01:36:09 +02:00
Lennart Poettering 47e6ce32bb bus: seal off memfds when sealing messages 2013-05-15 00:46:24 +02:00
Lennart Poettering 9b05bc4866 bus: fix allocation of body parts from memfd 2013-05-14 22:52:58 +02:00
Lennart Poettering bc7fd8cdbe bus: properly handle message bodies that are a chain of memory areas rather than a single one 2013-05-14 22:28:45 +02:00
Lennart Poettering fd8d62d940 bus: catch up with latest kdbus 2013-05-10 03:38:11 +02:00
Lennart Poettering f8e013f8bf bus: add sd_bus_message_append_string_space() for zero-copy string appending 2013-05-10 03:38:11 +02:00
Lennart Poettering b3af9646f8 bus: add API for appending/reading fixed arrays 2013-05-09 20:01:21 +02:00
Lennart Poettering 102ea8e4f2 bus: parse capability kdbus meta data of messages 2013-04-23 00:14:30 -03:00
Lennart Poettering 120f919e70 bus: parse audit metadata from kdbus messages 2013-04-22 23:38:38 -03:00
Lennart Poettering bc7f3beb30 bus: parse owner uid from cgroup path, too 2013-04-22 23:27:38 -03:00
Lennart Poettering d8d3d8a781 bus: parse unit/user unit/session from cgroup path 2013-04-16 04:54:46 +02:00
Lennart Poettering 4a875b6133 kdbus: parse cgroup meta data, too 2013-04-15 01:51:37 +02:00
Lennart Poettering 42c5aaf3ba bus: fix counting of argN= matches 2013-04-14 17:45:26 +02:00
Lennart Poettering 77930f1120 kdbus: also parse cmdline message attribute 2013-04-14 03:20:23 +02:00
Lennart Poettering 69aec65cf8 kdbus: parse even more kernel meta data fields 2013-04-13 21:53:11 +02:00
Lennart Poettering acb5a3cb20 bus: parse and expose kdbus message timestamps 2013-04-12 01:57:53 +02:00
Lennart Poettering 8323bc1f90 bus: also parse PID starttime out of kdbus message 2013-04-12 01:49:52 +02:00
Lennart Poettering f9be01f3b4 bus: parse uid/gid/pid/tid meta data from kdbus messages 2013-04-12 01:45:18 +02:00
Lennart Poettering 6629161f82 bus: basic implementation of kdbus client side 2013-04-11 23:10:41 +02:00
Lennart Poettering 2100fa1099 bus: calculate iovec for messages only when we need it 2013-04-11 23:10:40 +02:00
Lennart Poettering 9be9c7cff6 macro: make sure ALIGN() can be calculated constant by the compiler
If we pass a constant value to ALIGN() gcc should have the chance to
calculate the value during compilation rather than runtime, so let's
avoid a static inline call if we can.
2013-04-11 23:10:40 +02:00
Lennart Poettering 1ef2af5ae0 bus: when we unmarshal an fd it should stay owned by the message object
If the user wants the fd to stay valid he should keep a reference to the
message object or duplicate the fd.

This unifies behaviour of demarshalling data fields and unix fds.
2013-04-10 23:23:19 +02:00
Lennart Poettering 1b492614cb bus: also remove recursive invocation of message_append_ap() 2013-04-09 21:28:11 +02:00
Lennart Poettering fe1d424d29 bus: implement message_read_ap() non-recursively
As it turns out if you pass a va_list to a function its state becomes
undefined after that function returns, and this actually does break on
x86-32.

Hence, let's reimplement message_read_ap() without the use of recursion.
Instead we now build our own stack of types in an array so that we can
decode the entire parameter list in a single stackframe.
2013-04-09 21:03:12 +02:00
Lennart Poettering 88d331d537 bus: when parsing signature strings, accept NULL as empty signature 2013-04-05 14:56:48 +02:00
Lennart Poettering 917b5dc707 bus: add convenience functions for constructing and sending method calls/signals in one call 2013-04-05 04:15:39 +02:00
Lennart Poettering 638866cbea bus: when reading a message from the socket, make sure to note down the size 2013-04-01 03:29:29 +02:00
Zbigniew Jędrzejewski-Szmek 27f6e5c782 bus: check return value from bus_type_get_alignment/size 2013-03-31 14:33:12 -04:00
Lennart Poettering 392d5b378c bus: parse matches locally and allow registration of callbacks for them
This includes code to parse and split up match strings which will also
be useful to calculate bloom filter masks when the time comes.
2013-03-31 16:16:37 +02:00
Lennart Poettering 62cfa9da28 build-sys: make gcc shut up 2013-03-26 03:03:13 +01:00
Lennart Poettering 021a1e78d7 bus: make optional whether unix socket passing is negotiated and whether hello is sent
This alos gets rid of explicit sd_open_fd() and sd_open_address()
constructors in favour of sd_new() + sd_new_start() where the
negotiation parameters may be set it in between.
2013-03-25 02:33:35 +01:00
Lennart Poettering 2c93b4efec bus: implement support for FD passing 2013-03-25 02:33:34 +01:00
Lennart Poettering 2571ead1a6 bus: implicitly collect ucred/label information 2013-03-22 03:37:10 +01:00
Lennart Poettering ed205a6bc5 bus: when parsing enforce maximum container depth 2013-03-22 02:32:34 +01:00
Lennart Poettering 9f26c90cb5 bus: reuse more code 2013-03-22 01:49:13 +01:00
Lennart Poettering 6693860fab bus: validate the entire header more closely 2013-03-22 01:15:20 +01:00
Lennart Poettering ac89bf1d53 bus: properly validate object path values 2013-03-22 00:42:53 +01:00
Lennart Poettering b8beb27816 bus: generate a nice error when attempting to add a NULL string 2013-03-22 00:24:21 +01:00
Lennart Poettering e3017af973 bus: implement full method call timeout logic 2013-03-21 22:53:29 +01:00
Tom Gundersen c66a2e0cf9 bus-message: fix typo 2013-03-21 00:01:14 +01:00
Lennart Poettering 89ffcd2ad5 bus: hook up client with socket communication 2013-03-20 23:00:10 +01:00
Lennart Poettering fbfa72b0a1 bus: introduce bus_error_is_dirty() independently of sd_bus_error_is_set() 2013-03-20 23:00:10 +01:00
Lennart Poettering 80a46c7313 bus: demarshal header fields properly 2013-03-20 23:00:10 +01:00
Lennart Poettering 9a17484d98 bus: implement demarshaller 2013-03-20 23:00:09 +01:00
Lennart Poettering 5407f2dea3 bus: suppress reply messages to method calls with no_reply set 2013-03-20 23:00:09 +01:00
Lennart Poettering de1c301ed1 bus: add basic implementation of a native bus client library 2013-03-20 23:00:09 +01:00