Commit graph

6 commits

Author SHA1 Message Date
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
Lennart Poettering d3e84ddb88 machined: keep track of the initial leader PID of a machine
This way we can without races always determine the machine for a leader
PID. This allows machine managers to query the machine for a forked off
container/VM  without a race where the child might already have died
before we could read the cgroup information from /proc/$PID/cgroup.
2013-11-06 02:31:35 +01:00
Lennart Poettering a658cafa98 machined: simplifications 2013-11-05 01:13:05 +01:00
Lennart Poettering c335068380 machined: port over to libsystemd-bus 2013-10-30 02:08:57 +01:00
Lennart Poettering 554604b307 machined: forward scope properties array from client to systemd
This makes nspawn's --scope= switch work again.
2013-07-11 19:53:46 +02:00
Lennart Poettering 1ee306e124 machined: split out machine registration stuff from logind
Embedded folks don't need the machine registration stuff, hence it's
nice to make this optional. Also, I'd expect that machinectl will grow
additional commands quickly, for example to join existing containers and
suchlike, hence it's better keeping that separate from loginctl.
2013-07-02 03:47:23 +02:00