summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus
AgeCommit message (Collapse)Author
2013-11-29bus: do not fail if task information cannot be retrieved from /procKay Sievers
2013-11-29libsystemd-bus: clean up bus-control.c fileLukasz Skalski
2013-11-29bus: do not fail if cgroup information cannot be retrieved from /procKay Sievers
2013-11-29libsystemd-bus: catch up with latest kdbus changesKay Sievers
2013-11-29libsystemd-bus: follow kdbus renamesDaniel Mack
kdbus now has more generic names for the items it passes around. That allows for usage from other contexts.
2013-11-29libsystemd-bus: copy over kdbus provided 128-bit bus idDaniel Mack
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.
2013-11-29libsystemd-bus: catch up with latest kdbus changesDaniel Mack
kdbus_cmd_hello now has a new uint64_t flags field for the requested attachments. Follow that change in libsystemd-bus.
2013-11-29libsystemd-bus: sd_bus_request_name: fix return value for kdbusDaniel Mack
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.
2013-11-29libsystemd-bus: kernel: add sd_bus_kernel_translate_request_name_flagsDaniel Mack
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.
2013-11-29libsystemd-bus: make sd_bus_list_names return all connections, including ↵Daniel Mack
unique names
2013-11-29libsystemd-bus: add kdbus support for sd_bus_list_names()Daniel Mack
kdbus will tell us the minimum buffer size it needs in case the default 8kb buffer doesn't suffice.
2013-11-29libsystemd-bus: bring definitions in sync with kdbusDaniel Mack
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.
2013-11-29bus: when turning a buffer into a sd_bus_message avoid creating zero-length ↵Lennart Poettering
parts
2013-11-29bus: creds - ignore EINVAL when acessing the (inactive) LSM /proc interfaceKay Sievers
2013-11-29bus: Add KDBUS_MSG_SRC_NAMES to bus_kernel_make_message() functionLukasz Skalski
2013-11-28busctl: drop bus driver name from list of servicesLennart Poettering
2013-11-28bus: merge sd_bus_get_owner() and sd_bus_get_owner_creds() into one callLennart Poettering
Since the backing ioctl for this on kdbus is the same we retain atomicity this way.
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-28event: allow EPOLLET as event flagDavid Herrmann
EPOLLET enables edge-triggered mode (see epoll(7) for more). For most use-cases, level-triggered is just fine, but for master-TTYs we need edge-triggered to catch EPOLLHUP. master-TTYs signal EPOLLHUP if no client is connected, but a client may connect some time later (same happens during vhangup(2)). However, epoll doesn't allow masking EPOLLHUP so it's signaled constantly. To avoid this, edge-triggered mode is needed.
2013-11-28bus: add bus_name_has_owner() helperDavid Herrmann
Small helper to run a synchronous "NameHasOwner" request on the dbus-daemon.
2013-11-28bus: update kdbus.h and always subscribe to KDBUS_HELLO_ATTACH_NAMESKay Sievers
2013-11-27bus: properly handle if we get disconnected during HELLO phaseLennart Poettering
2013-11-25bus: properly return errors to client if invalid parameters are passed to ↵Lennart Poettering
built-in methods
2013-11-25delete unused variablesThomas Hindoe Paaboel Andersen
2013-11-22bus: protected dual timestamp property macro for misusageLennart Poettering
2013-11-22bus: when closing a bus, drop all refs to queued messages, so that the bus ↵Lennart Poettering
can be freed
2013-11-22bus: rework sd_bus_error APIsLennart Poettering
All calls that set a sd_bus_error structure will now return the same error converted to a negative errno. This may be used as syntactic sugar to return from a function and setting a bus_error structure in one go. Also, translate all Linux Exyz (EIO, EINVAL, EUCLEAN, EPIPE, ...) automatically into counterparts in the (new) "Posix.Error." namespace. If we fail to allocate memory for the components of a sd_bus_error automatically reset it to an OOM error which we always can write.
2013-11-22bus: deal with duplicate values from enumeratorsLennart Poettering
2013-11-22event: rename sd_event_get() to sd_event_source_get_event()Lennart Poettering
2013-11-22bus: add calls to query attached objectsLennart Poettering
2013-11-22bus: also add error parameter to object find and enumerator callbacksLennart Poettering
Just in order to bring things inline with the method and property callbacks.
2013-11-21bus: restore selinux access control to PID 1 for propertiesLennart Poettering
2013-11-21bus: properly serialize unit file change listLennart Poettering
2013-11-21logind,machined,run: properly invoke StartTransientUnit() bus callLennart 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-21bus: the :no-sender hack is now unnecessary, since the new library doesn't ↵Lennart Poettering
require this anymore
2013-11-21bus: update kdbus.hKay Sievers
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-21bus: add API calls to escape string components of objects pathsLennart Poettering
2013-11-21sd-event: try to move timer wakeups to the same spot within each minuteLennart Poettering
2013-11-20event: make sure to possibly disarm the timerfds before we reenter epoll_waitLennart Poettering
2013-11-20event: don't disarm invalid timerfdLennart Poettering
2013-11-20bus: make sure an additional ref to a busevent source doesn't cause the ↵Lennart Poettering
event source to be triggered again
2013-11-20event: whenever a time source changes pending state reshuffle elapsation prioqsLennart Poettering
2013-11-20event: when we change the io events to watch we need to figure out if a an ↵Lennart Poettering
event is pending again
2013-11-20sd-event: fix comparison functionsLennart Poettering
2013-11-20busctl: when no match is specified, add default matchLennart Poettering
2013-11-20bus: add color and indentation to bus_message_dump()Lennart Poettering
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.