summaryrefslogtreecommitdiff
path: root/src/libsystemd
AgeCommit message (Collapse)Author
2014-03-06sd-rtnl/networkd: use new rtnl_message_read() API and drop helperTom Gundersen
With the new sd_rtnl_message_read_string(), there is no longer a need for rtnl_message_get_ifname().
2014-03-06sd-rtnl:introduce table-based lookup and typesafe read() functionsSusant Sahani
This patch introduces new netlink attribute parsing logic which is table based lookup and sd_rtnl_message_read_* methods for reading attributes. By doing this user does not have to loop for the attribute values . Only providing the attribute type it gets the attribute values which is optimized and sd_rtnl_message_read_* methods are simplified.
2014-03-05sd-rtnl: do not blindly enter containers in message_read()Tom Gundersen
We need a separate container_enter() function, which will be part of a largerg API change. For now, just fix message_read().
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-03sd-network: IPv4 link-local support [v2]Umut Tezduyar Lindskog
Implements IPv4LL with respect to RFC 3927 (http://tools.ietf.org/rfc/rfc3927.txt) and integrates it with networkd. Majority of the IPv4LL state machine is taken from avahi (http://avahi.org/) project's autoip. IPv4LL can be enabled by IPv4LL=yes under [Network] section of .network file. IPv4LL works independent of DHCP but if DHCP lease is aquired, then LL address will be dropped. [tomegun: removed a trailing newline and a compiler warning]
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-25nspawn: add new switch --network-macvlan= to add a macvlan device to the ↵Lennart Poettering
container
2014-02-24Remove dead lines in various placesZbigniew Jędrzejewski-Szmek
As pointed-out by clang -Wunreachable-code. No behaviour changes.
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-23build-sys: remove libsystemd.sym duplicateDavid Herrmann
sd_memfd_new is available twice. Remove the second one.
2014-02-22build-sys: fix libsystemd --enable-kdbus symbol exportKay Sievers
2014-02-22test: always use assert_se in testsTom Gundersen
2014-02-21event: add new kind of event source called "post"Lennart Poettering
This new event source is triggered by the dispatching of any non-post event source. It can thus be used to do clean-up or recheck work, triggered by any other event source having been executed. This is different from "defer" event source which are unconditionally triggered as long as they are enabled. A "defer" event source that does nothing will result in the event loop busy looping unless it is turned off eventually. This is different for "post" event sources that will be only triggered when some other non-post ran, and will thus not keep the event loop busy on its own.
2014-02-21sd-event: Fix systemd crash when using timer units.Thomas Bächler
There was a copy-paste error introduced in commit c2ba3ad6604ef2e189d7e0a36d6911116e84d3ab which causes the following error when using timer units: Assertion '(x->type == SOURCE_MONOTONIC && y->type == SOURCE_MONOTONIC) || (x->type == SOURCE_REALTIME && y->type == SOURCE_REALTIME)' failed at src/libsystemd/sd-event/sd-event.c:264, function latest_time_prioq_compare(). Aborting.
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-19build-sys: export experimental symbols only with --enable-kdbusKay Sievers
2014-02-19bus: fix unreffing logicLennart Poettering
2014-02-19build-sys: merge libsystemd-journal into libsystemdKay Sievers
2014-02-19sd-id128: use new dev_urandom() callLennart 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-19sd-rtnl: test - include missing.h to build on old kernelsTom Gundersen
2014-02-19missing.h: add some IFLA_* constantsTom Gundersen
These were added to the kernel between 3.5 and 3.9, let's not require such recent kernels (yet).
2014-02-19event: fix crash on child-source state modificationsDavid Herrmann
Setting a child-source state to anything but SD_EVENT_OFF currently does nothing. The condition logic is flawed. Move the state update *below* the test for the previous state. Fixes a crash if you call: sd_event_source_set_enabled(source, SD_EVENT_ON); sd_event_source_unref(source); on a child-source in its own callback.
2014-02-19build-sys: merge libsystemd-daemon into libsystemdKay Sievers
2014-02-18sd-rtnl-message: store reference to the bus in the messageTom Gundersen
This mimics the sd-bus api, as we may need it in the future.
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-16sd-rtnl: do not require ifindex to be set for SETLINK messagesTom Gundersen
The kernel will then look up the ifindex itself based on the name. This should be used very carefully as it is racey. [This was a left-over hunk from my previous nspawn patch.]
2014-02-16bus: fix match_parse for unquoted matchesSimon Peeters
2014-02-15sd-rtnl: always include linux/rtnetlink.hTom Gundersen
2014-02-15sd-rtnl: message_open_container - don't take a 'size' argumentTom Gundersen
We can always know the size based on the type, so let's do this inside the library.
2014-02-15sd-rtnl: link flags - don't allow change = 0Tom Gundersen
The kernel will happily treat 0x0 as 0xffffffff, but it is for backwards compatibility only, so let's not perpetuate this.
2014-02-13rtnl: support adding VETH_INFO_PEER containers into rtnl messagesLennart Poettering
2014-02-13rtnl: rename constructors from the form sd_rtnl_xxx_yyy_new() to ↵Lennart Poettering
sd_rtnl_xxx_new_yyy() So far we followed the rule to always indicate the "flavour" of constructors after the "_new_" or "_open_" in the function name, so let's keep things in sync here for rtnl and do the same.
2014-02-13rtnl: drop "sd_" prefix from cleanup macrosLennart Poettering
The "sd_" prefix is supposed to be used on exported symbols only, and not in the middle of names. Let's drop it from the cleanup macros hence, to make things simpler. The bus cleanup macros don't carry the "sd_" either, so this brings the APIs a bit nearer.
2014-02-10sd-bus: export sd_bus_call{,_async,_async_cancel}David Herrmann
The .sym file somehow lacks these declarations, so add these. You have to run "make clean" to make sure the sym-test runs fine afterwards.
2014-02-10sd-rtnl: added support for a few more attributesSusant Sahani
2014-02-10sd-rtnl: test - improve test of MTU a bitTom Gundersen
We are more likely to catch errors if we don't use '0' as test value.
2014-02-10sd-rtnl: add test cases for linkSusant Sahani
2014-02-05bus: properly unset default bus pointer when destroying last referenceLennart Poettering