summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-kernel.c
AgeCommit message (Collapse)Author
2014-08-18memfd: fix memfd_create() syscall wrapperDaniel Mack
Unlike earlier versions, the syscall only takes 2 arguments in its final version, not 3.
2014-08-17kdbus: switch over to generic memfd implementation (ABI+API break)Daniel Mack
2014-07-26Print kdbus path when opening failsZbigniew Jędrzejewski-Szmek
This makes it easier to debug what is going on.
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-15Remove unnecessary casts in printfsZbigniew Jędrzejewski-Szmek
No functional change expected :)
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-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.
2014-03-16Use strlen even for constant stringsJosh Triplett
GCC optimizes strlen("string constant") to a constant, even with -O0. Thus, replace patterns like sizeof("string constant")-1 with strlen("string constant") where possible, for clarity. In particular, for expressions intended to add up the lengths of components going into a string, this often makes it clearer that the expression counts the trailing '\0' exactly once, by putting the +1 for the '\0' at the end of the expression, rather than hidden in a sizeof in the middle of the expression.
2014-03-13sd-bus: don't look for a 64bit value when we only have 32bit value on reply ↵Lennart Poettering
cookie hash table access This broke hashtable lookups for the message cookies on s390x, which is a 64bit BE machine where accessing 32bit values as 64bit and vice versa will explode. Also, while we are at it, be a bit more careful when dealing with the 64bit cookies we expose and the 32bit serial numbers dbus uses in its payload. Problem identified by Fridrich Strba.
2014-03-11bus: replace sd_bus_label_{escape,unescape}() by new ↵Lennart Poettering
sd_bus_path_{encode,decode}() The new calls work similarly, but enforce a that a common, fixed bus path prefix is used. This follows discussions with Simon McVittie on IRC that it should be a good idea to make sure that people don't use the escaping applied here too wildly as anything other than the last label of a bus path.
2014-03-07sd-bus: add support for policy upload on activator connectionsDaniel Mack
Activator connections may upload policy when registering to the bus. This patch contains code to translate between BusNamePolicy objects and the kdbus specific items.
2014-03-07sd-bus: sync kdbus.h (ABI break)Daniel Mack
Bring kdbus.h in sync with recent policy related changes. Most notably, KDBUS_MAKE_POLICY_OPEN is now gone. The rest doesn't matter for systemd at this point, as the policy functionality was not yet used.
2014-02-20api: in constructor function calls, always put the returned object pointer ↵Lennart Poettering
first (or second) Previously the returned object of constructor functions where sometimes returned as last, sometimes as first and sometimes as second parameter. Let's clean this up a bit. Here are the new rules: 1. The object the new object is derived from is put first, if there is any 2. The object we are creating will be returned in the next arguments 3. This is followed by any additional arguments Rationale: For functions that operate on an object we always put that object first. Constructors should probably not be too different in this regard. Also, if the additional parameters might want to use varargs which suggests to put them last. Note that this new scheme only applies to constructor functions, not to all other functions. We do give a lot of freedom for those. Note that this commit only changes the order of the new functions we added, for old ones we accept the wrong order and leave it like that.
2014-02-17doc: update punctuationJan Engelhardt
Resolve spotted issues related to missing or extraneous commas, dashes.
2014-02-01bus: update kdbus.h (ABI break)Kay Sievers
2014-01-31use memzero(foo, length); for all memset(foo, 0, length); callsGreg KH
In trying to track down a stupid linker bug, I noticed a bunch of memset() calls that should be using memzero() to make it more "obvious" that the options are correct (i.e. 0 is not the length, but the data to set). So fix up all current calls to memset(foo, 0, length) to memzero(foo, length).
2014-01-28bus: rework bloom filter logic to operate with variable bloom filterLennart Poettering
sizes and numbers of hash functions In order to make the bloom filter logic more future proof communicate bloom filter parameters from the original bus creator to the clients, and allow them to be variable within certain ranges.
2014-01-27bus: when we cannot bus activate a service because we go down, drop oneLennart Poettering
message from the queue
2014-01-24bus: update kdbus.h (ABI break)Kay Sievers
2014-01-22bus: add sd_bus_process_priority() to support prioq mode of kdbusLennart Poettering
2014-01-22bus: expose priority field of messages, in preparation for prioq supportLennart Poettering
2014-01-22bus: pass timestamp info only to caller if he asked for itLennart Poettering
2014-01-22bus: include connection name in credentials structureLennart Poettering
2014-01-22bus: when allocating a memfd for usage in a bus connection, name the memfd ↵Lennart Poettering
after the bus connection
2014-01-22bus: add support for attaching name to bus connections for debugging purposesLennart Poettering
2014-01-22bus: add API for querying the kdbus message sequence numberLennart Poettering
2014-01-21bus: implement synchronous message calls via kernel ioctlLennart Poettering
2014-01-21libsystemd: split up into subdirsTom Gundersen
We still only produce on .so, but let's keep the sources separate to make things a bit less messy.