Age | Commit message (Collapse) | Author |
|
We must return a negative error code from getttyname_malloc but
that would not be the case if ttyname_r returned a negative value.
ttyname_r should only return EBADF, ENOTTY, or ERANGE so it should
be safe to change.
|
|
introduced in 1ca208fb4f93e5869704af1812cbff7130a2fc03
|
|
|
|
|
|
Since we want to retain the ability to break kernel ←→ userspace ABI
after the next release, let's not make use by default of kdbus, so that
people with future kernels will not suddenly break with current systemd
versions.
kdbus support is left in all builds but must now be explicitly requested
at runtime (for example via setting $DBUS_SESSION_BUS). Via a configure
switch the old behaviour can be restored. In fact, we change autogen.sh
to do this, so that git builds (which run autogen.sh) get kdbus by
default, but tarball builds (which ue the configure defaults) do not get
it, and hence this stays out of the distros by default.
|
|
|
|
We probably shouldn't use "Posix.Error" since many of the errors have
nothing to do with Posix.
|
|
require deep copies
This should fix issues with incorrectly copying bus error messages out
of sd_bus_message objects.
Original bug found by: Djalal Harouni
|
|
|
|
|
|
|
|
|
|
|
|
The name list and query functions now work differently in kdbus, as the
result is stored in the connection's pool, rather than being copied back
through the ioctl buffer. That also safes us some logic, as we don't
have to resize the communication buffer in a loop with growing buffer
sizes.
Due to this, KDBUS_CMD_MSG_RELEASE was renamed to KDBUS_CMD_FREE, as it
is now used outside the message logic as well.
|
|
|
|
|
|
|
|
because the destination is unavailable
|
|
The signals appear entirely redundant due to NameOwnerChange, hence
don't do them in the new library, instead leave them for the
compatibility bridge only.
Also, set the serial number for synthesized messages to (uint32_t) -1.
|
|
time the Makefile changes
We don't do this for .c files either, even they are also influence quite
a bit by makefile settings. Given that XSLT is a lot slower then the
rest of the build let's make our build a bit faster if people end up
touching the Makefile.
|
|
fa6ccbf42360cdd794ae3164b76e0cc8f0bd62de
197941a8d5d74d79ca45ae73ec114939a8e88244
547708f59edd73d98edcbe84e95b41f7b3321f3b
|
|
|
|
NameOwnerChange
|
|
|
|
We need this so that one incoming kernel message can result in two
high-level bus messages, for the case where we synthesize NameAcquired
and NameOwnerChanged in the same instance.
|
|
|
|
... to keep the namespace clean.
|
|
|
|
Factor out code from sd_bus_negotiate_attach_creds() to a generic
translate function, so it can be used from other places.
|
|
Just a preparation for upcoming kdbus support.
|
|
|
|
|
|
|
|
|
|
matches against NameOwnerChange
|
|
|
|
|
|
|
|
|
|
|
|
kdbus now has more generic names for the items it passes around. That
allows for usage from other contexts.
|
|
|
|
kdbus now copies the bus unique id back to userspace in the hello
ioctl(). Use these bytes to set the server id of the sd_bus.
|
|
kdbus_cmd_hello now has a new uint64_t flags field for the requested
attachments. Follow that change in libsystemd-bus.
|
|
Augment systemd-stdio-bridge a bit to make it a 1:1 bridge from legacy
DBus clients to kdbus. In particular,
* allow setting the bus path of the upstream bus as command line
argument
* use sd_listen_fds() for systemd's socket activation
* omit calling sd_bus_negotiate_fds() when upstream bus is kdbus
* reply to bus send errors with proper dbus error messages
* treat -ECONNRESET as expected end-of-connection condition
|
|
kdbus returns -EALREADY if the requesting connection is already the
owner of a name, and -EEXIST if the name already exists and the
connection is not able to take it over.
Also, n->flags needs a translation as well to match the SD_BUS_* enum
values.
|
|
Flags used to request a name from kdbus are not identical to what DBus
and sd_bus use internally. Introduce a simple function to do the
translation for us. It's factored out to a separate function so the
dbus-driver instance can make use of it as well.
|
|
unique names
|
|
kdbus will tell us the minimum buffer size it needs in case the default
8kb buffer doesn't suffice.
|
|
In particular, KDBUS_ITEM_NEXT is now called KDBUS_PART_NEXT, and
KDBUS_ITEM_FOREACH was renamed to KDBUS_PART_FOREACH and takes one more
argument to make it more flexible.
|