summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/test-bus-chat.c
AgeCommit message (Collapse)Author
2013-11-28bus: add new sd_bus_creds object to encapsulate process credentialsLennart Poettering
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.
2013-11-21bus: rework message handlers to always take an error argumentLennart Poettering
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-21bus: rename SD_BUS_ERROR_MAKE to SD_BUS_ERROR_MAKE_CONST to indicate it only ↵Lennart Poettering
works for const strings
2013-11-21bus: let's simplify things by getting rid of unnecessary bus parametersLennart Poettering
2013-11-12bus: rename sd_bus_send_with_reply_and_block() to sd_bus_call()Lennart Poettering
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.
2013-11-06pam_systemd: dup the fd received from logindZbigniew Jędrzejewski-Szmek
Otherwise sd_bus_message cleanup would close it.
2013-10-16timedated: use libsystemd-bus instead of libdbus for bus communicationLennart Poettering
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
2013-10-09bus: fix synthetic error messagesLennart Poettering
2013-05-16bus: synthesize timeout message errors instead of returning error codesLennart Poettering
2013-04-15kdbus: parse cgroup meta data, tooLennart Poettering
2013-04-14bus: remove two unused variablesZbigniew Jędrzejewski-Szmek
2013-04-13kdbus: parse even more kernel meta data fieldsLennart Poettering
2013-04-10bus: when we unmarshal an fd it should stay owned by the message objectLennart Poettering
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.
2013-04-05bus: various improvements for test-bus-chatLennart Poettering
2013-04-05bus: convert a couple of calls over to new convenience functionsLennart Poettering
2013-04-05bus: use C99 struct construction for error initializersLennart Poettering
That way we can allocate an error struct on-the-fly while calling a function. Nice!
2013-03-31bus: rename sd_bus_get_peer() to sd_bus_get_server_id()Lennart Poettering
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.
2013-03-31bus: parse matches locally and allow registration of callbacks for themLennart Poettering
This includes code to parse and split up match strings which will also be useful to calculate bloom filter masks when the time comes.
2013-03-30bus: implement server mode, and anonymous authenticationLennart Poettering
2013-03-26tests: skip bus test if bus cannot be openedZbigniew Jędrzejewski-Szmek
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.
2013-03-25bus: implement support for FD passingLennart Poettering
2013-03-22bus: implement object handler registryLennart Poettering
2013-03-22bus: implicitly collect ucred/label informationLennart Poettering
2013-03-22bus: also finish connection before returning from sd_bus_get_unique_name()Lennart Poettering
2013-03-22bus: rework synchronization logicLennart Poettering
Instead of allowing certain actions fail during authentication and connection setup, implicitly synchronize on the connection to be set up completely before returning.
2013-03-22bus: implicitly handle peer commands Ping() and GetMachineId()Lennart Poettering
2013-03-21bus: implement full method call timeout logicLennart Poettering
2013-03-20bus: hook up client with socket communicationLennart Poettering