Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
|
|
This patch converts PID 1 to libsystemd-bus and thus drops the
dependency on libdbus. The only remaining code using libdbus is a test
case that validates our bus marshalling against libdbus' marshalling,
and this dependency can be turned off.
This patch also adds a couple of things to libsystem-bus, that are
necessary to make the port work:
- Synthesizing of "Disconnected" messages when bus connections are
severed.
- Support for attaching multiple vtables for the same interface on the
same path.
This patch also fixes the SetDefaultTarget() and GetDefaultTarget() bus
calls which used an inappropriate signature.
As a side effect we will now generate PropertiesChanged messages which
carry property contents, rather than just invalidation information.
|
|
The call is one of the most important ones we expose, where we place
major emphasis on. We should make sure to give it a short, memorable
name.
|
|
|
|
With --enable-address-sanitizer we get:
machined-dbus.c:228: undefined reference to 'manager_add_machine'
|
|
callers session, user, seat or machine object
This way clients can skip invoking GetSessionByPID() for their own PID
or a similar call to access these objects.
|
|
called with a PID == 0
|
|
|
|
|
|
src/machine/machined-dbus.c:237:13: warning: Branch condition evaluates to a garbage value
if (m)
^
|
|
|
|
clang FTW!
|
|
reply
https://bugs.freedesktop.org/show_bug.cgi?id=67273
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=67273
|
|
This makes nspawn's --scope= switch work again.
|
|
When PID 1 reloads the units logind/machined will see UnitRemoved
signals for all units. Instead of trusting these immediately, let's
check the actual unit state before considering a unit gone, so that
reloading PID 1 is not mistaken as the end of all sessions.
|
|
|
|
|
|
|
|
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.
|