Age | Commit message (Collapse) | Author |
|
This way we can unify handling of credentials that are attached to
messages, or can be queried for bus name owners or connection peers.
This also adds the ability to extend incomplete credential information
with data from /proc,
Also, provide a convenience call that will automatically determine the
most appropriate credential object for an incoming message, by using the
the attached information if possible, the sending name information if
available and otherwise the peer's credentials.
|
|
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.
|
|
works for const strings
|
|
|
|
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.
|
|
Otherwise sd_bus_message cleanup would close it.
|
|
Among other things this also adds a few things necessary for the change:
- Considerably more powerful error returning APIs in libsystemd-bus
- Adapter for connecting an sd_bus to an sd_event
- As I reworked the PolicyKit logic to the new library I also made it
asynchronous, so that PolicyKit requests of one user cannot block out
another user anymore.
- We always use the macro names for common bus error. That way it is
harder to mistype them since the compiler will notice
|
|
|
|
|
|
|
|
|
|
|
|
If the user wants the fd to stay valid he should keep a reference to the
message object or duplicate the fd.
This unifies behaviour of demarshalling data fields and unix fds.
|
|
|
|
|
|
That way we can allocate an error struct on-the-fly while calling a
function. Nice!
|
|
This function always returns the server side ID. The name suggested it
was actually always the peer's ID, but that's not correct if the call is
called on a server bus context. Hence, let's correct the name a bit.
|
|
This includes code to parse and split up match strings which will also
be useful to calculate bloom filter masks when the time comes.
|
|
|
|
To make the result more visible, special return value
is used to tell automake that the test was skipped. While
at it, use the same return value in other skipped tests.
|
|
|
|
|
|
|
|
|
|
Instead of allowing certain actions fail during authentication and
connection setup, implicitly synchronize on the connection to be set up
completely before returning.
|
|
|
|
|
|
|