summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus
AgeCommit message (Collapse)Author
2014-07-31kdbus: update headerKay Sievers
2014-07-29time-util: add and use USEC/NSEC_INFINIYKay Sievers
2014-07-26Print kdbus path when opening failsZbigniew Jędrzejewski-Szmek
This makes it easier to debug what is going on.
2014-07-11endian: explicitly include endian.h wherever we want to use __BYTE_ORDERLennart Poettering
2014-07-10libsystemd: make use of our common sockaddr_union everywhereLennart Poettering
2014-07-03bus: close a bus that failed to connectLennart Poettering
2014-07-03sd-bus: support connecting to remote hosts, directly into containersLennart Poettering
systemctl -H root@foobar:waldi will now show a list of services running on container "waldi" on host "foobar", using "root" for authenticating at "foobar". Since entereing a container requires priviliges, this will only work correctly for root logins.
2014-07-02sd-bus: when an event loop terminates, explicitly close the busLennart Poettering
This makes sure we actually release the bus and all the messages it references.
2014-07-02bus: drop bus/message GC logicLennart Poettering
When a caller drops all references to a bus and its messages while the messages where still queue, this causes the bus to reference the messages, and the messages to reference the bus, without anybody else keeping a reference, which is something we so far considered a leak, and tried to fix with a GC logic that would recognize cases like this, and drop the reference. This GC logic has been broken sofar, and remained unfixed. This commit removes it altogther, replacing it with nothing. The rationale is that simply because all refs to the bus have been dropped its queued messages should *still* be written to the bus, even if the caller doesn't retain any reference to either bus nor message. This means it was actually wrong to attempt to clean up the bus in this case. The proper way how applications should handle this is by explicitly invoking sd_bus_close(), when they want busses to go away. This is probably want they want to do anyway to avoid getting spurious callbacks after they stopped using a bus.
2014-06-06sd-bus: don't allow creating message objects that are not attached to a busLennart Poettering
It seems unnecessary to support this, and we rather should avoid allowing this at all, so that people don't program against this sloppily and we end up remarshalling all the time...
2014-06-05bus: make use of sd_bus_try_close() in exit-on-idle servicesLennart Poettering
2014-06-05kdbus: when uploading bus name policy, resolve users/groups out-of-processLennart Poettering
It's not safe invoking NSS from PID 1, hence fork off worker processes that upload the policy into the kernel for busnames.
2014-05-24timedated: refuse manual system time updates when automatic timesync is enabledKay Sievers
2014-05-22cgroups: simplify CPUQuota= logicLennart Poettering
Only accept cpu quota values in percentages, get rid of period definition. It's not clear whether the CFS period controllable per-cgroup even has a future in the kernel, hence let's simplify all this, hardcode the period to 100ms and only accept percentage based quota values.
2014-05-18machined: add logic to query IP addresses of containersLennart Poettering
2014-05-16bus: fix unitialized variable access in error pathZbigniew Jędrzejewski-Szmek
2014-05-15sd-bus: make sure we properly handle NULL callback functionsLennart Poettering
2014-05-15sd-bus: fix an assert when running in kdbus modeLennart Poettering
2014-05-15sd-bus: don't hit assert when installing matchLennart Poettering
2014-05-15sd-bus: always keep slot reference while dispatching callbackLennart Poettering
Also, make sure we automatically destroy reply callbacks that are floating.
2014-05-15sd-event: introduce concept of "floating" event sourcesLennart Poettering
These are the counterpart of "floating" bus slots, i.e. event sources that are bound to the lifetime of the event object itself, and thus don't require an explicit reference to be kept.
2014-05-15Remove unnecessary casts in printfsZbigniew Jędrzejewski-Szmek
No functional change expected :)
2014-05-15sd-bus: introduce sd_bus_slot objects encapsulating callbacks or vtables ↵Lennart Poettering
attached to a bus connection This makes callback behaviour more like sd-event or sd-resolve, and creates proper object for unregistering callbacks. Taking the refernce to the slot is optional. If not taken life time of the slot will be bound to the underlying bus object (or in the case of an async call until the reply has been recieved).
2014-05-14bus: add userdata API for bus name tracker objectsLennart Poettering
2014-04-29sd-resolve: rework sd-resolve to be callback based, similar in style to ↵Lennart Poettering
sd-bus and sd-event
2014-04-25core: expose CFS CPU time quota as high-level unit propertiesLennart Poettering
2014-04-24bus: update kdbus.hKay Sievers
2014-04-23delta: draw arrows with draw_special_char()Lennart Poettering
Let's unify generation of unicode chars at one place. Also, don't add an extra space into chars we print, except for the tree chars where this is really necessary.
2014-04-23bus: simplificationLennart Poettering
2014-04-22bus: remove "on behalf" kdbus logic (ABI break)Kay Sievers
2014-04-20doc: fix items' names in PORTING-DBUS1Lukasz Skalski
2014-04-10bus: catch up with kdbus changes (ABI break)Kay Sievers
2014-04-10bus: update kdbus.hKay Sievers
2014-03-31doc: fix items' names in PORTING-DBUS1Lukasz Skalski
2014-03-24sd-bus: invert bus->is_kernel check in sd_bus_get_peer_creds()Daniel Mack
The bug was introducted in a3d59cd1 ("sd-bus: don't use assert_return() to check for disconnected bus connections")
2014-03-24util: replace close_pipe() with new safe_close_pair()Lennart Poettering
safe_close_pair() is more like safe_close(), except that it handles pairs of fds, and doesn't make and misleading allusion, as it works similarly well for socketpairs() as for pipe()s...
2014-03-24sd-event: rework API to support CLOCK_REALTIME_ALARM and ↵Lennart Poettering
CLOCK_BOOTTIME_ALARM, too
2014-03-22sd-bus: mark sd_bus_unref() as broken regarding self-refsDavid Herrmann
If you allocate a message with bus==NULL and then unref the main bus, it will free your message underneath and your program will go boom! To fix that, we really need to figure out what the semantics for self-references (m->bus) should be and when/where/what accesses are actually allowed. Same is true for the pseudo-thread-safety we employ..
2014-03-22sd-bus: add note about sd_bus_unref() recursionDavid Herrmann
In sd_bus_unref() we check for self-reference loops and destruct our queues in case we're the only reference holders. However, we do _not_ modify our own ref-count, thus effectively causing the message-destructions to enter with the same reference count as we did. The only reason this doesn't cause an endless recursion (or trigger assert(m->n_ref > 0) in sd_bus_message_unref()) is the fact that we decrease queue-counters _before_ calling _unref(). That's not obvious at all, so add a big fat note in bus_reset_queues() to everyone touching that code.
2014-03-19sd-bus: don't use assert_return() to check for disconnected bus connectionsLennart Poettering
A terminated connection is a runtime error and not a developer mistake, hence don't use assert_return() to check for it.
2014-03-19sd-bus: properly translate high-level attach flags into kdbus attach flagsLennart Poettering
2014-03-19busctl: when monitoring the bus, enable all credentialsLennart Poettering
2014-03-19sd-bus: add proper monitoring APILennart Poettering
2014-03-19busname: introduce Activating directiveDaniel Mack
Add a new config 'Activating' directive which denotes whether a busname is actually registered on the bus. It defaults to 'yes'. If set to 'no', the .busname unit only uploads policy, which will remain active as long as the unit is running.
2014-03-19core: when creating an activating busname attach all metadata fields to the ↵Lennart Poettering
messages queued for it This way we can be sure that the service the messages are ultimately intended for finds all fields it might need.
2014-03-19update kdbus.hLennart Poettering
2014-03-18sd-bus: if we got a message with fds attached even though we didn't ↵Lennart Poettering
negotiate it, refuse to take it This makes sure we don't mishandle if developers specificy a different AcceptFileDescriptors= setting in .busname units then they set for the bus connection in the activated program.
2014-03-18core: add new AcceptFD= setting to .busname unitsLennart Poettering
AcceptFD= defaults to true, thus making sure that by default fd passing is enabled for all activatable names. Since for normal bus connections fd passing is enabled too by default this makes sure fd passing works correctly regardless whether a service is already activated or not. Making this configurable on both busname units and in bus connections is messy, but unavoidable since busnames are established and may queue messages before the connection feature negotiation is done by the service eventually activated. Conversely, feature negotiation on bus connections takes place before the connection acquires its names. Of course, this means developers really should make sure to keep the settings in .busname units in sync with what they later intend to negotiate.
2014-03-18testLennart Poettering
2014-03-18util: replace close_nointr_nofail() by a more useful safe_close()Lennart Poettering
safe_close() automatically becomes a NOP when a negative fd is passed, and returns -1 unconditionally. This makes it easy to write lines like this: fd = safe_close(fd); Which will close an fd if it is open, and reset the fd variable correctly. By making use of this new scheme we can drop a > 200 lines of code that was required to test for non-negative fds or to reset the closed fd variable afterwards.