summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus
AgeCommit message (Collapse)Author
2014-03-17core, libsystemd, systemd, timedate, udev: spelling fixesMiklos Vajna
2014-03-17systemctl: introduce -r switch to show units running in local containers in ↵Lennart Poettering
addition to the host
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-14sd-bus: don't choke if somebody sends us a message with a unix fd count of 0Lennart Poettering
It's kinda pointless to include a unix fd header field in messages if it carries the value 0, but let's do this anyway...
2014-03-14sd-bus: don't access invalid memory if a signal matcher was freed from its ↵Lennart Poettering
own callback
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-13bus: fix memory leak when kdbus is not enabledLennart Poettering
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-08sd-bus: sync kdbus.hDaniel Mack
2014-03-08sd-bus: check for potential integer overflow in KDBUS_ITEM_FOREACH()Daniel Mack
For large values of item->size, the 'part' pointer can wrap around, which results in an illegal pointer, but currently passes the for-loop condition.
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-03-06man: describe functions for appending to messagesZbigniew Jędrzejewski-Szmek
2014-03-05systemd-run: support all currently exported properties with -pLennart Poettering
2014-03-05core: make the LimitXYZ= properties settable for transient service unitsLennart Poettering
2014-03-05systemd-run: add new --property= switch that can set arbitrary properties ↵Lennart Poettering
for the unit that is created The code for parsing these properties is shared with "systemctl set-property", which means all the resource control settings are immediately available.
2014-03-04Introduce strv_consume which takes ownershipZbigniew Jędrzejewski-Szmek
This mirrors set_consume and makes the common use a bit nicer.
2014-03-03silence warningThomas Hindoe Paaboel Andersen
2014-03-03bus: add sd_bus_track object for tracking peers, and port core over to itLennart Poettering
This is primarily useful for services that need to track clients which reference certain objects they maintain, or which explicitly want to subscribe to certain events. Something like this is done in a large number of services, and not trivial to do. Hence, let's unify this at one place. This also ports over PID 1 to use this to ensure that subscriptions to job and manager events are correctly tracked. As a side-effect this makes sure we properly serialize and restore the track list across daemon reexec/reload, which didn't work correctly before. This also simplifies how we distribute messages to broadcast to the direct busses: we only track subscriptions for the API bus and implicitly assume that all direct busses are subscribed. This should be a pretty OK simplification since clients connected via direct bus connections are shortlived anyway.
2014-02-25Use /var/run/dbus/system_bus_socket for the D-Bus socketZbigniew Jędrzejewski-Szmek
2014-02-26Revert back to /var/run at a couple of problemsLennart Poettering
This partially reverts 41a55c46ab8fb4ef6727434227071321fc762cce Some specifications we want to stay compatibility actually document /var/run, not /run, and we should stay compatible with that. In order to make sure our D-Bus implementation works on any system, regardless if running systemd or not, we should always use /var/run which is the only path mandated by the D-Bus spec. Similar, glibc hardcodes the utmp location to /var/run, and this is exposed in _UTMP_PATH in limits.h, hence let's stay in sync with this public API, too. We simply do not support systems where /var/run is not a symlink → /run. Hence both are equivalent. Staying compatible with upstream specifications hence weighs more than cleaning up superficial appearance.
2014-02-25Replace /var/run with /run in remaining placesZbigniew Jędrzejewski-Szmek
/run was already used almost everywhere, fix the remaining places for consistency.
2014-02-23src/shared/ cannot reference symbols from librariesKay Sievers
../src/shared/unit-name.c:462: error: undefined reference to 'sd_bus_label_escape' ../src/shared/unit-name.c:477: error: undefined reference to 'sd_bus_label_unescape' collect2: error: ld returned 1 exit status
2014-02-20libsystemd: fix compiler warning in property_get_set_callbacks_run()Daniel Mack
gcc (4.8.2, arm) doesn't understand that vtable_property_get_userdata() will always set 'u' when it returns > 0. Hence, the warning is bogus, but anyway. src/libsystemd/sd-bus/bus-objects.c:510:19: warning: 'u' may be used uninitialized in this function [-Wmaybe-uninitialized] (and yes, indeed, even the reported line numbers are bogus in this case)
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-20sd-bus: the bus returned should be the first argJason A. Donenfeld
This matches the API of previous headers, such as sd-journal.h.
2014-02-19bus: fix unreffing logicLennart Poettering
2014-02-19make gcc shut upLennart Poettering
If -flto is used then gcc will generate a lot more warnings than before, among them a number of use-without-initialization warnings. Most of them without are false positives, but let's make them go away, because it doesn't really matter.
2014-02-19busctl: add --no-legend and use in bash completionThomas Hindoe Paaboel Andersen
2014-02-18util: generalize code that checks whether PIDs are alive or unwaited forLennart Poettering
2014-02-17doc: update punctuationJan Engelhardt
Resolve spotted issues related to missing or extraneous commas, dashes.
2014-02-16bus: fix match_parse for unquoted matchesSimon Peeters
2014-02-05bus: properly unset default bus pointer when destroying last referenceLennart Poettering
2014-02-03bus: when closing the bus don't end up in a recursive destruction deadlockLennart Poettering
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: update kdbus.h (ABI break)Kay Sievers
2014-01-28bus: update bloom filter description a bitLennart Poettering
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: add API calls for connecting to starter busLennart Poettering
Add new calls sd_bus_open() and sd_bus_default() for connecting to the starter bus a service was invoked for, or -- if the process is not a bus-activated service -- the appropriate bus for the scope the process has been started in.
2014-01-27bus: when we cannot bus activate a service because we go down, drop oneLennart Poettering
message from the queue
2014-01-24bus: bump memfd vs. copy limit to 512k to reflect recent benchmarksKay Sievers
2014-01-24bus: update kdbus.h (ABI break)Kay Sievers
2014-01-24bus: update kdbus.h (ABI break)Kay Sievers
2014-01-22bus: change API to expose "inverted" no_reply and no_auto_start message ↵Lennart Poettering
flags non-inverted
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-22busctl: include connection name in busctl outputLennart Poettering
2014-01-22bus: unescape connection name when reading it from credentialsLennart Poettering
2014-01-22bus: pass timestamp info only to caller if he asked for itLennart Poettering