summaryrefslogtreecommitdiff
path: root/src/libsystemd
AgeCommit message (Collapse)Author
2015-02-03sd-rtnl: allow sd_rtnl_open_fd() to be used on bound socketsTom Gundersen
2015-02-03core: open up DefaultDependencies= property for transient unitsLennart Poettering
2015-02-03util: rework strappenda(), and rename it strjoina()Lennart Poettering
After all it is now much more like strjoin() than strappend(). At the same time, add support for NULL sentinels, even if they are normally not necessary.
2015-02-02networkd: support socket activationTom Gundersen
Still keep the non-socket activation code around for starting from the commandline, but will likely drop that too in the future.
2015-02-02sd-rtnl: introduce sd_rtnl_new_from_netlinkTom Gundersen
2015-02-02sd-event: treat NULL callback for timer events like sig eventsTom Gundersen
In both cases exit the event loop.
2015-02-01Add a snprinf wrapper which checks that the buffer was big enoughZbigniew Jędrzejewski-Szmek
If we scale our buffer to be wide enough for the format string, we should expect that the calculation was correct. char_array_0() invocations are removed, since snprintf nul-terminates the output in any case. A similar wrapper is used for strftime calls, but only in timedatectl.c.
2015-01-31sd-rtnl: don't fail event handler when callback failsTom Gundersen
As in sd-bus, simply log at debug level when a callback fails, but don't fail the event handler. Otherwise any error returned by any callback will disable the rtnl event handler. We should only do that on serious internal errors in sd-rtnl that we know cannot be recovered from.
2015-01-30Revert "sd-bus: change serialization of kdbus messages to qualify in their ↵Kay Sievers
entirety as gvariant objects" This breaks booting with kdbus. This reverts commit b381de4197157748ed96e469fcc372c23f842ae1.
2015-01-26sd-bus: change serialization of kdbus messages to qualify in their entirety ↵Lennart Poettering
as gvariant objects Previously, we only minimally altered the dbus1 framing for kdbus, and while the header and its fields where compliant Gvariant objects, and so was the body, the entire message together was not. As result of discussions with Ryan Lortie this is now changed, so that the messages in there entirely are fully compliant GVariants. This follows the framing description described here: https://wiki.gnome.org/Projects/GLib/GDBus/Version2 Note that this change changes the framing of *all* messages sent via kdbus, this means you have to reboot your kdbus system, after compiling and installing this new version.
2015-01-26bus-dump: fix two minor memory leaksLennart Poettering
2015-01-26sd-bus: reuse the KDBUS_CMD_FREE wrapper wherever appropriateLennart Poettering
2015-01-23sd-bus: fix typoLennart Poettering
2015-01-23sd-bus: fix handling of double parameters in sd_bus_message_append()Lennart Poettering
We really need to use va_arg() with the right type here as uint64_t and double might have the same size, but are passed differently as arguments.
2015-01-22tests: use assert_se instead of assertRonny Chevalier
Otherwise they can be optimized away with -DNDEBUG
2015-01-22networkd: Introduce ip6gre and ip6gretapSusant Sahani
This patch introduces ipv6 gre and gretap. test: ip6gre.netdev: [NetDev] Name=ip6gretap Kind=ip6gretap [Tunnel] Local=2a00:ffde:4567:edde::4987 Remote=2001:473:fece:cafe::5179 ip6gre.network: [Match] Name=eno16777736 [Network] Tunnel=ip6gretap ip link 6: ip6gre@eno16777736: <POINTOPOINT,NOARP> mtu 1448 qdisc noop state DOWN mode DEFAULT group default link/gre6 2a:00:ff:de:45:67:ed:de:00:00:00:00:00:00:49:87 peer 20:01:04:73:fe:ce:ca:fe:00:00:00:00:00:00:51:79
2015-01-22networkd: Introduce IP6 tunnelSusant Sahani
This patch enables networkd to create IP6 tunnels example conf: ipip6.netdev: [NetDev] Name=ipip6-tunnel Kind=ip6tnl [Tunnel] Mode=ip4ipv6 Local=2a00:ffde:4567:edde::4987 Remote=2001:473:fece:cafe::5179 ipip6.network [Match] Name=wlan0 [Network] Tunnel=ipip6-tunnel 23: ipip6-tunnel@wlan0: <POINTOPOINT,NOARP> mtu 1452 qdisc noop state DOWN mode DEFAULT group default link/tunnel6 2a00:ffde:4567:edde::4987 peer 2001:473:fece:cafe::5179
2015-01-22networkd: introduce gretapSusant Sahani
This patch introdeces gretap to networkd
2015-01-22build: export symbols to integrate mainloopsLucas De Marchi
2015-01-22Assorted format fixesZbigniew Jędrzejewski-Szmek
Types used for pids and uids in various interfaces are unpredictable. Too bad.
2015-01-22Fix some format strings for enums, they are signedZbigniew Jędrzejewski-Szmek
2015-01-22import: introduce new mini-daemon systemd-importd, and make machinectl a ↵Lennart Poettering
client to it The old "systemd-import" binary is now an internal tool. We still use it as asynchronous backend for systemd-importd. Since the import tool might require some IO and CPU resources (due to qcow2 explosion, and decompression), and because we might want to run it with more minimal priviliges we still keep it around as the worker binary to execute as child process of importd. machinectl now has verbs for pulling down images, cancelling them and listing them.
2015-01-19networkd: netdev - add ipvlan supportTom Gundersen
2015-01-18bus: drop systemd.kdbus_attach_flags_mask= cmdlineDavid Herrmann
There is no reason to provide our own attach_flags_mask. We can simply rely on kdbus.attach_flags_mask= which is read by the kernel *and* kmod. If it's set, we assume the user wants to override our setting, so we simply skip setting it.
2015-01-18bus: fix SD_BUS_CREDS_AUGMENT on kdbus queriesDavid Herrmann
If we set SD_BUS_CREDS_AUGMENT, we *need* the PID from the kernel so we can lookup further information from /proc. However, we *must* set SD_BUS_CREDS_PIDS in "mask", otherwise, our creds-collector will never actually copy the pid into "sd_bus_creds". Fix this, so SD_BUS_CREDS_AUGMENT works even if SD_BUS_CREDS_PID is not specified by the caller.
2015-01-18bus: fix typoDavid Herrmann
Fix comment typo and clarify that this is not about privileges but can have rather arbitrary reasons.
2015-01-18bus: use EUID over UID and fix unix-credsDavid Herrmann
Whenever a process performs an action on an object, the kernel uses the EUID of the process to do permission checks and to apply on any newly created objects. The UID of a process is only used if someone *ELSE* acts on the process. That is, the UID of a process defines who owns the process, the EUID defines what privileges are used by this process when performing an action. Process limits, on the other hand, are always applied to the real UID, not the effective UID. This is, because a process has a user object linked, which always corresponds to its UID. A process never has a user object linked for its EUID. Thus, accounting (and limits) is always done on the real UID. This commit fixes all sd-bus users to use the EUID when performing privilege checks and alike. Furthermore, it fixes unix-creds to be parsed as EUID, not UID (as the kernel always takes the EUID on UDS). Anyone using UID (eg., to do user-accounting) has to fall back to the EUID as UDS does not transmit the UID.
2015-01-14sd-bus: tell Coverity that it's OK not to care for return values in some casesLennart Poettering
2015-01-13refcnt: refcnt is unsigned, fix comparisonsTom Gundersen
This does not make a difference, but the code was confusing.
2015-01-13nspawn: add new option "--port=" for exposing container ports on the local hostLennart Poettering
This exposes an IP port on the container as local port using DNAT.
2015-01-12sd-bus: sync kdbus.h (API break)Daniel Mack
Just a simple variable rename, and a dropped flag that sd-bus didn't make use of.
2015-01-10kdbus.h: updateKay Sievers
2015-01-09sd-bus: even if we need a cookie when sending a message there's no need to ↵Lennart Poettering
needlessly send it if we don't actually need it
2015-01-09bus: append bloom-filter to all signalsDavid Herrmann
Make sure to append bloom-filters to all signal-messages, not only broadcasts.
2015-01-08sd-bus: fix copy-paste errorLukasz Skalski
2015-01-07bus-util: fix error number output when waiting for jobLennart Poettering
2015-01-07busctl: exit cleanly when the bus connection is severedLennart Poettering
2015-01-07sd-bus: when we synthesize messages, initialize timestamps ourselvesLennart Poettering
2015-01-07sd-bus: unify how we set the sender of synthetic messagesLennart Poettering
2015-01-07sd-bus: make use of the newly added timestamps on kdbus kernel messagesLennart Poettering
2015-01-07sd-bus: always catch name requests for the special names ↵Lennart Poettering
"org.freedesktop.DBus" and "org.freedesktop.DBus.Local" and refuse them
2015-01-06core: add new logic for services to store file descriptors in PID 1Lennart Poettering
With this change it is possible to send file descriptors to PID 1, via sd_pid_notify_with_fds() which PID 1 will store individually for each service, and pass via the usual fd passing logic on next invocation. This is useful for enable daemon reload schemes where daemons serialize their state to /run, push their fds into PID 1 and terminate, restoring their state on next start from the data in /run and passed in from PID 1. The fds are kept by PID 1 as long as no POLLHUP or POLLERR is seen on them, and the service they belong to are either not dead or failed, or have a job queued.
2015-01-05sd-bus: sync kdbus.hDaniel Mack
Catch up with latest changes in kdbus.ko: * Signals can be sent as unicast now, hence they need to be marked as such with the KDBUS_MSG_SIGNAL in the message flags. * Follow ioctl number change for KDBUS_CMD_FREE
2015-01-05systemctl: fix waiting for jobs when using direct connections to PID 1 for dbusLennart Poettering
2015-01-05machined,bus-proxy: fix connecting to containersLennart Poettering
2014-12-30tree-wide: spelling fixesVeres Lajos
https://github.com/vlajos/misspell_fixer https://github.com/torstehu/systemd/commit/b6fdeb618cf2f3ce1645b3315f15f482710c7ffa Thanks to Torstein Husebo <torstein@huseboe.net>.
2014-12-30bus: replace ENOSYS return codes with EBADR/ENOTSUPZbigniew Jędrzejewski-Szmek
ENOSYS is used to signify compiled-out functionality. Using it for different kinds of error is misleading. For BUS_ERROR_SLEEP_VERB_NOT_SUPPORTED, logind-action.c uses ENOTSUP already, so changing it to ENOTSUP makes the dbus and action paths behave the same.
2014-12-30bus: add sd_bus_emit_object_{added/removed}()David Herrmann
This implements two new helpers, discussed on systemd-devel about 1 year ago: sd_bus_emit_object_added() sd_bus_emit_object_removed() Both calls are equivalent to their respective counterpart sd_bus_emit_interfaces_{added/removed}(), but can figure out the list of interfaces themselves, instead of requiring the caller to provide them. Furthermore, both calls properly deal with builtin interfaces provided via org.freedesktop.DBus.* and alike. Both calls simply traverse a node and all its parent nodes to figure out a list of all interfaces registered as vtable or fallback. It then appends each of them, similar to the interfaces_{added/removed}() helpers. Note that interfaces_{added/removed}() runs a parent traversal for *each* passed interface. Therefore, it can simply bail out, once it found a parent node that implements a given interface. With object_{added/removed}() we cannot know the registered interfaces in advance, thus, we cannot run one traversal per node. Instead, we run a single traversal and remember all interfaces that we added. Therefore, a child-interface overrides all conflicting parent-interfaces. We keep a "Set *s" context to track those while climbing up the tree.
2014-12-30bus: fix capabilities on big-endianDavid Herrmann
The kernel provides capabilities as a u32 array, sd-bus uses an u8 array. This works fine on little-endian as both are encoded the same way. However, this fails on big-endian if we do not perform sufficient byte-swapping on each u32 entry. This patch makes sd-bus use u32, too. We avoid changing any kernel provided data so we can keep pointing into kdbus pool buffers which contain u32 arrays.
2014-12-30bus: drop creds->capability_sizeDavid Herrmann
The number of available caps can be read from /proc/sys/kernel/cap_last_cap during runtime. Our helper cap_last_cap() does that, so there's no reason to remember the size of any capability cache. We can just pre-allocate arrays with a suitable size for all available caps and reject any higher caps. The kernel capability API uses u32 as base so make sure we do the same. Note that this is specified by POSIX, so it's unlikely to change.