Age | Commit message (Collapse) | Author |
|
Also make thread_local available w/o including <threads.h>.
(as the latter hasn't been implemented, but this part is trivial)
|
|
Due to this patch, message dump (for message which includes boolean
type) is more consistent with dbus-send (which display true/false
instead of yes/no for boolean). It's only simple 'cosmetics change'.
** For dbus-send **
dbus-send --system --dest=org.freedesktop.DBus --type=method_call --print-reply / org.freedesktop.DBus.NameHasOwner string:org.freedesktop.login1
method return sender=org.freedesktop.DBus -> dest=:1.97 reply_serial=2
boolean true
** For libsystemd-bus (without this patch) **
‣ Type=method_call Endian=l Flags=0 Version=2 Serial=8
Destination=org.freedesktop.DBus Path=/org/freedesktop/DBus Interface=org.freedesktop.DBus Member=NameHasOwner
MESSAGE "s" {
STRING "org.freedesktop.login1";
};
‣ Type=method_return Endian=l Flags=1 Version=2 Serial=51 ReplySerial=8
Sender=:1.59 Destination=:1.67
UniqueName=:1.59 WellKnownNames={org.freedesktop.DBus}
MESSAGE "b" {
BOOLEAN yes;
};
For me true/false seems to be better readable than yes/no for BOOLEAN.
|
|
|
|
|
|
kdbus_cmd_{ep,ns,bus}_make are now consolidated, and bloom_size has
become an item of the dynamically sized list.
|
|
|
|
|
|
|
|
the container's namespace
setns(CLONE_NEWPID) only applies to child processes, hence let's fork
once after joining the container's namespace.
|
|
bus also switch over PID namespace
This is necessary to ensure that kdbus can collect creds of the
destination namespace when connecting.
|
|
|
|
|
|
|
|
|
|
n->path is pointing to the value now, we set s = NULL above.
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1043304
|
|
for non-static functions
|
|
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=72688
|
|
Clang is a bit more strict wrt format-nonliterals:
http://clang.llvm.org/docs/LanguageExtensions.html#format-string-checking
Adding these extra printf attributes also makes gcc able to find more
problems. E.g. this patch uncovers a format issue in udev-builtin-path_id.c
Some parts looked intetional about breaking the format-nonliteral check.
I added some supression for warnings there.
|
|
|
|
epoll, OR it in
|
|
possibly too large or too small
|
|
Previously we'd open the connection in the originating namespace, which
meant most peers of the bus would not be able to make sense of the
PID/UID/... identity of us since we didn't exist in the namespace they
run in. However they require this identity for privilege decisions,
hence disallowing access to anything from the host.
Instead, when connecting to a container, create a temporary subprocess,
make it join the container's namespace and then connect from there to
the kdbus instance. This is similar to how we do it for socket
conections already.
THis also unifies the namespacing code used by machinectl and the bus
APIs.
|
|
|
|
and dbus1)
Due to this patch, sd_bus_release_name() function
returns the same code errors for kdbus and dbus1
if we try release non-existing name or foreign
name.
|
|
|
|
|
|
When trying a couple of addresses one after the other, make sure to
reattach the fds to the event loop.
|
|
|
|
|
|
The pattern of unreffing an IO event source and then closing its fd is
frequently seen in even source callbacks. Previously this likely
resultet in us removing the fd from the epoll after it was closed which
is problematic, since while we were dispatching we always kept an extra
reference to event source objects because we might still need it later.
|
|
With this change a failing event source handler will not cause the
entire event loop to fail. Instead, we just disable the specific event
source, log a message at debug level and go on.
This also introduces a new concept of "exit code" which can be stored in
the event loop and is returned by sd_event_loop(). We also rename "quit"
to "exit" everywhere else.
Altogether this should make things more robus and keep errors local
while still providing a way to return event loop errors in a clear way.
|
|
|
|
to match against names coming/going
|
|
generate NameLost
|
|
|
|
|
|
|
|
|
|
|
|
flags conversion
|
|
that are closer to kdbus
This turns around DO_NOT_QUEUE into QUEUE which implies a more useful
default. (And negative options are awful anyway.)
|
|
|
|
containers)
|
|
to queue/starter
|
|
|
|
|
|
assert_return()
These are not programming errors, so they shouldn't use assert_return()
|
|
kdbus fortunately exposes the container's busses in the host fs, hence
we can access it directly instead of doing the namespacing dance.
|