Systemd/src/libsystemd-bus
Lennart Poettering ebcf1f97de bus: rework message handlers to always take an error argument
Message handler callbacks can be simplified drastically if the
dispatcher automatically replies to method calls if errors are returned.

Thus: add an sd_bus_error argument to all message handlers. When we
dispatch a message handler and it returns negative or a set sd_bus_error
we send this as message error back to the client. This means errors
returned by handlers by default are given back to clients instead of
rippling all the way up to the event loop, which is desirable to make
things robust.

As a side-effect we can now easily turn the SELinux checks into normal
function calls, since the method call dispatcher will generate the right
error replies automatically now.

Also, make sure we always pass the error structure to all property and
method handlers as last argument to follow the usual style of passing
variables for return values as last argument.
2013-11-21 21:12:36 +01:00
..
.gitignore build-sys: add .pc file for libsystemd-bus 2013-11-07 03:27:58 +01:00
bus-bloom.c Remove dead code and unexport some calls 2013-11-08 18:12:45 +01:00
bus-bloom.h Remove dead code and unexport some calls 2013-11-08 18:12:45 +01:00
bus-container.c machinectl: add new command to spawn a getty inside a container 2013-10-31 01:43:38 +01:00
bus-container.h bus: add API call to create bus connection to the system bus of local containers 2013-10-30 15:37:02 +01:00
bus-control.c bus: set no_auto_start flag for GetMachineId calls, so that we don't auto-start if we want to know the machine of a bus service 2013-11-12 00:12:44 +01:00
bus-control.h bus: calculate bloom filter for match 2013-05-20 10:13:38 +02:00
bus-convenience.c bus: let's simplify things by getting rid of unnecessary bus parameters 2013-11-21 02:07:35 +01:00
bus-dump.c bus: add color and indentation to bus_message_dump() 2013-11-20 20:58:16 +01:00
bus-dump.h bus: add missing dump.[ch] 2013-11-12 12:11:24 +01:00
bus-error.c bus: rename SD_BUS_ERROR_MAKE to SD_BUS_ERROR_MAKE_CONST to indicate it only works for const strings 2013-11-21 02:11:06 +01:00
bus-error.h core: convert PID 1 to libsystemd-bus 2013-11-20 20:52:36 +01:00
bus-internal.c bus: the :no-sender hack is now unnecessary, since the new library doesn't require this anymore 2013-11-21 21:12:36 +01:00
bus-internal.h bus: the :no-sender hack is now unnecessary, since the new library doesn't require this anymore 2013-11-21 21:12:36 +01:00
bus-introspect.c bus: let's simplify things by getting rid of unnecessary bus parameters 2013-11-21 02:07:35 +01:00
bus-introspect.h core: convert PID 1 to libsystemd-bus 2013-11-20 20:52:36 +01:00
bus-kernel.c bus: let's simplify things by getting rid of unnecessary bus parameters 2013-11-21 02:07:35 +01:00
bus-kernel.h libsystemd-bus/bus-kernel.h: set MEMFD_MIN_SIZE to 128k 2013-06-05 12:25:02 +02:00
bus-match.c bus: rework message handlers to always take an error argument 2013-11-21 21:12:36 +01:00
bus-match.h bus: make sure we can match well-known names 2013-10-30 02:08:57 +01:00
bus-message.c bus: rework message handlers to always take an error argument 2013-11-21 21:12:36 +01:00
bus-message.h bus: let's simplify things by getting rid of unnecessary bus parameters 2013-11-21 02:07:35 +01:00
bus-objects.c bus: rework message handlers to always take an error argument 2013-11-21 21:12:36 +01:00
bus-objects.h bus: split up overly long sd-bus.c into three files 2013-10-11 20:18:10 +02:00
bus-signature.c core: convert PID 1 to libsystemd-bus 2013-11-20 20:52:36 +01:00
bus-signature.h libsystemd-bus: add lightweight object vtable implementation for exposing objects on the bus 2013-10-09 02:40:07 +02:00
bus-socket.c bus: let's simplify things by getting rid of unnecessary bus parameters 2013-11-21 02:07:35 +01:00
bus-socket.h bus: add API call to create bus connection to the system bus of local containers 2013-10-30 15:37:02 +01:00
bus-type.c bus: when NULL is specified as property callback, automatically handle serialization on Get() 2013-10-11 06:10:15 +02:00
bus-type.h bus: add API for appending/reading fixed arrays 2013-05-09 20:01:21 +02:00
bus-util.c bus: rework message handlers to always take an error argument 2013-11-21 21:12:36 +01:00
bus-util.h bus: rework message handlers to always take an error argument 2013-11-21 21:12:36 +01:00
busctl.c busctl: when no match is specified, add default match 2013-11-20 20:58:16 +01:00
event-util.h timedated: use libsystemd-bus instead of libdbus for bus communication 2013-10-16 06:15:02 +02:00
kdbus.h bus: update kdbus.h 2013-11-21 20:16:56 +01:00
libsystemd-bus.pc.in bus: indicate in .pc file that we need libsystemd-id128 definitions 2013-11-07 03:54:13 +01:00
libsystemd-bus.sym bus: add API calls to escape string components of objects paths 2013-11-21 01:03:26 +01:00
Makefile bus: add basic implementation of a native bus client library 2013-03-20 23:00:09 +01:00
sd-bus.c bus: rework message handlers to always take an error argument 2013-11-21 21:12:36 +01:00
sd-event.c sd-event: try to move timer wakeups to the same spot within each minute 2013-11-21 00:46:13 +01:00
sd-memfd.c bus: export libsystemd-bus as a public library 2013-11-06 14:56:47 -05:00
sd-utf8.c bus: actually export sd_utf8_is_valid() and sd_ascii_is_valid() 2013-11-10 23:54:55 +01:00
test-bus-chat.c bus: rework message handlers to always take an error argument 2013-11-21 21:12:36 +01:00
test-bus-introspect.c bus: rework message handlers to always take an error argument 2013-11-21 21:12:36 +01:00
test-bus-kernel-benchmark.c bus: let's simplify things by getting rid of unnecessary bus parameters 2013-11-21 02:07:35 +01:00
test-bus-kernel-bloom.c timedated: use libsystemd-bus instead of libdbus for bus communication 2013-10-16 06:15:02 +02:00
test-bus-kernel.c bus: TIMESTAMP is optional kdbus metadata now, NAMES are always added 2013-11-18 01:30:57 +01:00
test-bus-marshal.c bus: let's simplify things by getting rid of unnecessary bus parameters 2013-11-21 02:07:35 +01:00
test-bus-match.c bus: rework message handlers to always take an error argument 2013-11-21 21:12:36 +01:00
test-bus-memfd.c Fix write-only use of a few variables 2013-10-13 17:56:54 -04:00
test-bus-objects.c bus: rework message handlers to always take an error argument 2013-11-21 21:12:36 +01:00
test-bus-server.c bus: rename SD_BUS_ERROR_MAKE to SD_BUS_ERROR_MAKE_CONST to indicate it only works for const strings 2013-11-21 02:11:06 +01:00
test-bus-signature.c bus: unify code to find parents of an object path with 2013-10-11 23:20:54 +02:00
test-bus-zero-copy.c bus: beautify bus_message_dump() output a bit 2013-11-12 00:12:44 +01:00
test-event.c bus: introduce concept of a "default" event loop per-thread and make use of it everywhere 2013-11-12 00:12:43 +01:00