summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus
AgeCommit message (Collapse)Author
2014-11-21busctl: show property values in "introspect" output, add "set-property" ↵Lennart Poettering
command, and support both a terse and a verbose output format
2014-11-21busctl: when --address is specified do not assume we connect to a full busLennart Poettering
2014-11-21busctl: use canned error message on parse failureLennart Poettering
2014-11-21sd-bus: create clean error when a property Set() call with incorrect ↵Lennart Poettering
signature is passed in
2014-11-20busctl: pass error output to stdout (rather than stderr) when generate tree ↵Lennart Poettering
for all objects This is a ton more useful when some services fail, since we continue crawling then and output everything to a pager.
2014-11-20busctl: improve output of service credsLennart Poettering
2014-11-20busctl: add new "introspect" verb for introspecting objectsLennart Poettering
2014-11-20sd-bus: refuse properties that claim to be both writable and constant at the ↵Lennart Poettering
same time
2014-11-20busctl: split out introspection parser from tree logic so that we can reuse ↵Lennart Poettering
it for a future "busctl introspect" command
2014-11-17bus-socket: fix CID#996290 Unchecked return valueSusant Sahani
2014-11-14bus-proxy: properly check for bus name prefixes when enforcing policyLennart Poettering
2014-11-14busctl: introduce busctl "get-property" command for reading and dumping ↵Lennart Poettering
object properties
2014-11-14busctl: various tweaks to "busctl tree" outputLennart Poettering
2014-11-14busctl: add new "call" command to invoke methods on a serviceLennart Poettering
2014-11-14sd-bus: add sd_bus_message_is_empty() for checking whether a message carries ↵Lennart Poettering
any body
2014-11-13sd-bus: sync with kdbus upstream (ABI break)Daniel Mack
kdbus has seen a larger update than expected lately, most notably with kdbusfs, a file system to expose the kdbus control files: * Each time a file system of this type is mounted, a new kdbus domain is created. * The layout inside each mount point is the same as before, except that domains are not hierarchically nested anymore. * Domains are therefore also unnamed now. * Unmounting a kdbusfs will automatically also detroy the associated domain. * Hence, the action of creating a kdbus domain is now as privileged as mounting a filesystem. * This way, we can get around creating dev nodes for everything, which is last but not least something that is not limited by 20-bit minor numbers. The kdbus specific bits in nspawn have all been dropped now, as nspawn can rely on the container OS to set up its own kdbus domain, simply by mounting a new instance. A new set of mounts has been added to mount things *after* the kernel modules have been loaded. For now, only kdbus is in this set, which is invoked with mount_setup_late().
2014-11-11sd-bus: pass attach flags to BUS_CREATOR_INFODaniel Mack
kdbus learned parsing the attach flags for the KDBUS_CMD_BUS_CREATOR_INFO ioctl. Bits not set in this mask will not be exported. Set that field to _KDBUS_ATTACH_ALL for now. Signed-off-by: Daniel Mack <daniel@zonque.org>
2014-11-11sd-bus: add sd_bus_message.verify_destination_id and .destination_ptrDaniel Mack
kdbus learned to accept both a numerical destination ID as well as a well-known-name. In that case, kdbus makes sure that the numerical ID is in fact the owner of the provided name and fails otherwise. This allows for race-free assertion of a bus name owner while sending a message, which is a requirement for bus-proxyd. Add two new fields to sd_bus_message, and set the numerical ID to verify_destination_id if bus_message_setup_kmsg() is called for a message with a well-known name. Also, set the destination's name in the kdbus item to .destination_ptr if it is non-NULL. Normal users should not touch these fields, and they're not publicy accessible.
2014-11-10bus: when dumping string property values escape the chars we use as ↵Lennart Poettering
end-of-line and end-of-item marks
2014-11-10busctl: add "tree" command to explore object treesLennart Poettering
2014-11-05sd-bus: by default allow all creds to be passed alongLennart Poettering
2014-11-05sd-bus: sync up with new kdbus metadata attachment logic (ABI break)Daniel Mack
The metadata logic in kdbus has seen a rework, and the only mandatory change we have to follow for now is that attach_flags in kdbus_cmd_hello is now split into two parts, attach_flags_send and attach_flags_recv.
2014-11-04sd-bus: rename sd_bus_get_server_id() to sd_bus_get_owner_id()Lennart Poettering
In kdbus a "server id" is mostly a misnomer, as there isn't any "server" involved anymore. Let's rename this to "owner" id hence, since it is an ID that is picked by the owner of a bus or direct connection. This matches nicely the sd_bus_get_owner_creds() call we already have.
2014-11-04sd-bus,sd-event: unify error handling of object descriptionsLennart Poettering
a) When getting the description return ENXIO if none is set b) Allow setting a description to NULL c) return ECHILD on fork() like for other calls
2014-11-04sd-bus: make use of free_and_strdup() where it makes senseLennart Poettering
2014-11-04sd-bus: also allow setting descriptions on bus slotsLennart Poettering
2014-11-04sd-event: rename sd_event_source_set_name() to sd_event_source_get_name()Lennart Poettering
To mirror the recent name change of the concept for sd_bus objects, follow the same logic for sd_event_source objects, too.
2014-11-04sd-bus: rename "connection name" to "description" for the sd-bus API tooLennart Poettering
kdbus recently renamed this concept, and so should we in what we expose in userspace.
2014-11-04sd-bus: sync kdbus.h (ABI break)Daniel Mack
Catch up with some changes in kdbus.h: * KDBUS_{ITEM,ATTACH}_CONN_NAME were renamed to KDBUS_{ITEM,ATTACH}_CONN_DESCRIPTION, so the term 'name' is not overloaded as much. * The item types were re-ordered a little so they are lined up to the order of the corresponding KDBUS_ATTACH flags * A new item type KDBUS_ITEM_OWNED_NAME was introduced, designated to store a struct kdbus_name in item->name. KDBUS_ITEM_NAME soley stores data in item->str now * Some kerneldoc fixes
2014-10-31Make bus errno mappings non-staticZbigniew Jędrzejewski-Szmek
__attribute__((used)) is not enough to force static variables to be carried over to a compiled program from a library. Mappings defined in libsystemd-shared.a were not visible in the compiled binaries. To ensure that the mappings are present in the final binary, the tables are made non-static and are given a real unique name by which they can be referenced. To use a mapping defined not in the local compilation unit (e.g. in a library) a reference to the mapping table is added. This is done by including a declaration in the header file. Expected values in test-engine are fixed to reflect the new mappings.
2014-10-31bus: do not segfault on zeros in errno mapping tableZbigniew Jędrzejewski-Szmek
Depending on the link order, holes might appear in the body of the sd_bus_errnomap section. Ignore them. Adds a simple test to print the table to help with debugging such issues in the future.
2014-10-31sd-bus: add missing includeTom Gundersen
2014-10-30bus: add sd_bus_errnomap sectionZbigniew Jędrzejewski-Szmek
This allows custom "name" ↔ errno mappings to be registered. Tables from all compilation units are concatenated.
2014-10-30memfd: rename memfd.h to memfd-util.h to avoid any confusion with any libc ↵Lennart Poettering
provided headers
2014-10-30memfd: always use our internal utility functions where we have themLennart Poettering
2014-10-30memfd: always create our memfds with CLOEXEC setLennart Poettering
We really shouldn't create fds ever that have the flag unset.
2014-10-30busctl: add new "capture" verb to record bus messages in libpcap compatible ↵Lennart Poettering
files, for dissection with wireshark
2014-10-29sd-bus: properly handle removals of non-existing matchesLennart Poettering
2014-10-28polkit: actually generate new InteractiveAuthorizationRequired error on the ↵Lennart Poettering
right occasions
2014-10-28sd-bus: add support for new InteractiveAuthorizationRequired error from dbus ↵Lennart Poettering
spec
2014-10-27sd-bus: sync kdbus.h (ABI break)Daniel Mack
Some comment fixes and header cleanups in kdbus.h, and the task capability meta information has been factored out to its own struct.
2014-10-27sd-bus: explicitly cast asprintf() return value away we are not interested inLennart Poettering
Let's give coverity a hint what's going on here.
2014-10-27Revert "sd-bus: check return value of asprintf()"Lennart Poettering
This reverts commit b1543c4c93855b61b40118e9f14a0423dac2e078. We check b->address anyway, no need to check the return value, especially given that the other #ifdef branch don't get the same treatment.
2014-10-24sd-bus: if we don't manage to properly allocate the error message for an ↵Lennart Poettering
sd_bus_error, just go on sd_bus_error_setfv() must initialize the sd_bus_error value to some sensible value and then return a good errno code matching that. If it cannot work at all it should set the error statically to the OOM error. But if it can work half-way (i.e. initialize the name, but not the message) it should do so and still return the correct errno number for it. This effectively reverts 8bf13eb1e02b9977ae1cd331ae5dc7305a305a09
2014-10-23sd-bus: make sd_bus::reply_callbacks a OrderedHashmapMichal Schmidt
The way process_closing() picks the first entry from reply_callbacks and works with it makes it likely that it cares about the order.
2014-10-22machine: validate machine names using machine_name_is_valid() instead of ↵Lennart Poettering
string_is_safe() After all, we know have this as generic validator, so let's be correct and use it wherver applicable.
2014-10-22sd-bus: fix transition left-overs in sd_bus_get_owner_creds()Daniel Mack
sd_bus_get_owner_creds() was only halfly ported over to _cleanup_bus_creds_unref_.
2014-10-22sd-bus: implement sd_bus_get_owner_creds() for kdbusDaniel Mack
kdbus learned a new ioctl to tell userspace about a bus creator's credentials, which is what we need to implement sd_bus_get_owner_creds() for kdbus. Move the function from sd-bus.c to bus-control.c to be able to reuse the bus_populate_creds_from_items() helper.
2014-10-22sd-bus: rename sd_bus_get_owner_uid(), sd_bus_get_owner_machine_id() and ↵Daniel Mack
sd_bus_get_peer_creds() Clean up the function namespace by renaming the following: sd_bus_get_owner_uid() → sd_bus_get_name_creds_uid() sd_bus_get_owner_machine_id() → sd_bus_get_name_machine_id() sd_bus_get_peer_creds() → sd_bus_get_owner_creds()
2014-10-22sd-bus: factor out creds item iteratorDaniel Mack
We will re-use the code to walk items in order to populate a creds object, so let's factor it out first.