summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-util.c
AgeCommit message (Collapse)Author
2014-01-02Move bus path definitions to def.hZbigniew Jędrzejewski-Szmek
2013-12-19bus: fix exit-on-idle for driverdLennart Poettering
2013-12-17bus-util: return errors when encounteredThomas Hindoe Paaboel Andersen
Introduced in: 9f6eb1cd58f2ddf2eb6ba0e4de056e13d938af75 313333b403439360c0396a50d77d0a1ee2bca4df
2013-12-14bus: return negative errno on errorZbigniew Jędrzejewski-Szmek
https://bugs.freedesktop.org/show_bug.cgi?id=72688
2013-12-13event: rework sd-event exit logicLennart Poettering
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.
2013-12-13bus: make sure exit-on-idle logic works on kdbus systems that do not ↵Lennart Poettering
generate NameLost
2013-12-12timedated: make sure GetAll() succeeds in systems lacking /dev/rtc (such as ↵Lennart Poettering
containers)
2013-12-03bus: don't make use of the private bus socket if kdbus is availableLennart Poettering
2013-12-03bus: internalize a lot of protocol definitionsLennart Poettering
We shouldn export what isn't necessary or useful to clients, so let's add the protocol definitions we only need internally into a private header.
2013-12-01bus: bus_open_user_systemd() fall back to bus if runtime dir is not setKay Sievers
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-28bus: add bus_name_has_owner() helperDavid Herrmann
Small helper to run a synchronous "NameHasOwner" request on the dbus-daemon.
2013-11-25delete unused variablesThomas Hindoe Paaboel Andersen
2013-11-21bus: properly serialize unit file change listLennart Poettering
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-20core: convert PID 1 to libsystemd-busLennart Poettering
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.
2013-11-20bus: fix error-path in bus_map_all_properties()David Herrmann
We shouldn't return positive integers on errors. Fix the typo by removing the negation.
2013-11-12bus: introduce concept of a default bus for each thread and make use of it ↵Lennart Poettering
everywhere We want to emphasize bus connections as per-thread communication primitives, hence introduce a concept of a per-thread default bus, and make use of it everywhere.
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-09bus: fix build with old glibcZbigniew Jędrzejewski-Szmek
2013-11-08systemctl: restore ability to directly connect to PID1 from systemctlLennart Poettering
2013-11-08systemctl: port to libsystemd-busMarc-Antoine Perennou
2013-11-07bus: log message parsing errors everywhere with a generalized ↵Lennart Poettering
bus_log_parse_error()
2013-11-07bus: fix bus_print_property with strvMarc-Antoine Perennou
2013-11-07bus: make bus_print_all_properties work for non machinectl casesSimon Peeters
add a destination parameter and skip properties we can't read
2013-11-07consistently use "int" when retrieving "bool" from bus messagesKay Sievers
2013-11-05bus: fix deserialization of polkit responseLennart Poettering
2013-11-05bus: update bus_map_all_properties()Kay Sievers
2013-11-05bus: make it easy to serialize C99 bools and uids/gids/pids via vtable ↵Lennart Poettering
properties
2013-11-02bus: make bus_map_all_properties() call idempotentKay Sievers
2013-11-02bus: use internal helper to read org.freedesktop.DBus.Properties::GetAll ↵Kay Sievers
variables
2013-10-30bus-util: avoid infinite loopTom Gundersen
2013-10-30localectl: port to libsystemd-busKay Sievers
2013-10-30run: add support for executing commands remotely via SSH or in a containerLennart Poettering
Also, unify the transport logic a bit, since we reuse the same scheme in many of our client tools.
2013-10-30bus: move ssh support into public API of libsystem-busLennart Poettering
2013-10-30machinectl: port to sd-busTom Gundersen
2013-10-22bus: avoid 'bool' storage when retrieving 'b' from the messageKay Sievers
Just use an unsigned int as a bool type to avoid issues in the public message reading API; sizeof(bool) == 1, but the code copies 4 bytes at the pointers destination.
2013-10-18bus: automatically flush bus queue when we exit the event loopLennart Poettering
This way, we do not have to call it manually
2013-10-18fsck: port to sd-busTom Gundersen
2013-10-16bus: fix default exit on idle timeoutLennart Poettering
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