summaryrefslogtreecommitdiff
path: root/src/libsystemd
AgeCommit message (Collapse)Author
2015-03-02sd-bus: sync kdbus.h (ABI break)Daniel Mack
After some reconsideration, we decided to move the binary protocol back to 64-bit wide UIDs and GIDs. After all, it should be possible to redefine [gu]id_t to uint64_t and things should continue to work. As we want to avoid such data types in kdbus.h, let's move back to 64-bit values and be safe. In sd-bus, we have to do a translation between uint64_t and gid_t now for supplementary gids. Some inline comments have also been updated in kdbus upstream.
2015-02-27networkd: add support for Uplink Failure DetectionAlin Rauta
Introduce BindCarrier= to indicate the set of links that determine if the current link should be brought UP or DOWN. [tomegun: add a bit to commit message]
2015-02-26sd-rtnl: types - fix check for unsupported typeTom Gundersen
Spotted by Thomas H.P. Andersen <phomes@gmail.com>
2015-02-26sd-rtnl: types - don't assert_return in private APITom Gundersen
2015-02-24sd-bus: test-bus-kernel-benchmark: don't rely on fixed unique namesDaniel Mack
The kernel part of kdbus does not allow userspace to make any assumption on which unique address the first user on the bus will get. Instead, use sd_bus_get_unique_name() to get the server's address.
2015-02-24sd-bus: sync kdbus.hDaniel Mack
Follow two small changes in the kdbus API: * Flags are now returned in cmd->return_flags by KDBUS_CMD_NAME_ACQUIRE * struct kdbus_item_list has been dropped. The information stored in this struct was redundant since awhile already, as all commands report their returned slice size anyway.
2015-02-23libsystemd: revert one hunk of duplicate ifdef removalZbigniew Jędrzejewski-Szmek
This change exposed a bug in kernel headers: /usr/include/linux/if_bridge.h:184:20: error: field 'ip6' has incomplete type struct in6_addr ip6; ^ /usr/include/linux/if_tunnel.h:76:19: error: field 'prefix' has incomplete type struct in6_addr prefix; ^
2015-02-24sd-bus, shared: fix includesDaniel Mack
Include <sys/socket.h> from util.h and bus-message.h in order to build errors like the ones below on kdbus enabled systems. ./src/shared/util.h:976:32: warning: its scope is only this definition or declaration, which is probably not what you want In file included from src/libsystemd/sd-bus/bus-kernel.c:37:0: ./src/shared/util.h:1081:28: warning: 'struct msghdr' declared inside parameter list void cmsg_close_all(struct msghdr *mh); ^ CC src/libsystemd/sd-bus/libsystemd_la-bus-creds.lo In file included from src/libsystemd/sd-bus/bus-creds.c:25:0: ./src/shared/util.h:976:32: warning: 'struct ucred' declared inside parameter list int getpeercred(int fd, struct ucred *ucred); ^
2015-02-23remove unused includesThomas Hindoe Paaboel Andersen
This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
2015-02-19bus: sync with kdbus.git (ABI break)David Herrmann
This syncs up the new KDBUS_CMD_CONN_INFO behavior: - attach-flags are passed in .attach_flags, instead of directly merged with the command flags.
2015-02-18logind: open up most bus calls for unpriviliged processes, using PolicyKitLennart Poettering
Also, allow clients to alter their own objects without any further priviliges. i.e. this allows clients to kill and lock their own sessions without involving PK.
2015-02-18sd-bus: allow setting a per-connection default value for the ↵Lennart Poettering
"allow-interactive-authentication" message flag Most of our client tools want to set this bit for all their method calls, even though it defaults to off in sd-bus, and rightfully so. Hence, to simplify thing, introduce a per sd_bus-object flag that sets the default value for all messages created on the connection.
2015-02-17bus: sync with kdbusDavid Herrmann
Pull in new kdbus changes, namely: - EOVERFLOW is replaces by KDBUS_RECV_RETURN_DROPPED_MSGS - ENOMSG is merged with EAGAIN for consistency
2015-02-17bus: don't rely on static IDs in testsDavid Herrmann
We should never put any constraints on the IDs returned by the kernel. Use sd_bus_get_unique_name() to retrieve the ID of a peer.
2015-02-16sd-bus: make sure we always serialize the reply cookie as 64bit on dbus2, ↵Lennart Poettering
and 32bit on dbus1
2015-02-16Revert "Revert "sd-bus: change serialization of kdbus messages to qualify in ↵Lennart Poettering
their entirety as gvariant objects"" This reverts commit 954871d8ba15911d014f76ed2c7a9492953cf39d.
2015-02-13sd-bus: initialize a few structs at time or declarationLennart Poettering
2015-02-13exit-on-idle: only exit if actually idleTom Gundersen
sd_event_wait() returning 0 usually means that it timed out, which means it must have been idle. However, sd_event_wait() may return 0 in case an event was triggered but it turned out there was nothing to do. Make the check for idle explicit to avoid this edge-case.
2015-02-13sd-bus: export sd_bus_error_set_errnofv()Lennart Poettering
2015-02-13sd-bus: sync kdbus.h (ABI break)Daniel Mack
Another slice logic rework in kdbus made KDBUS_ITEM_PAYLOAD_OFF items relative to the message header again. Catch up with that in sd-bus.
2015-02-12include <poll.h> instead of <sys/poll.h>Thomas Hindoe Paaboel Andersen
include-what-you-use automatically does this and it makes finding unnecessary harder to spot. The only content of poll.h is a include of sys/poll.h so should be harmless.
2015-02-12Add missing includes in header filesThomas Hindoe Paaboel Andersen
This fixes various issues found by globally reordering the include sections of all .c files.
2015-02-12Revert "tree-wide: Always use recvmsg with MSG_CMSG_CLOEXEC"Lennart Poettering
This reverts commit d6d810fbf8071f8510450dbacd1d083f37603656. It's apparently not OK to pass MSG_CMSG_CLOEXEC to recvmsg() of raw sockets.
2015-02-11tree-wide: whenever we include libgen.h, immediately undefine basename()Lennart Poettering
Also, document in adjacent comments and in CODING_STYLE why we do that.
2015-02-10tree-wide: Always use recvmsg with MSG_CMSG_CLOEXECCristian Rodríguez
2015-02-09sd-rtnl: fix typesystem for IFLA_AF_SPECTom Gundersen
Got this one wrong, it is not a union, just a nested container.
2015-02-08sd-rtnl: add support for IFLA_INET6_*Tom Gundersen
2015-02-08sd-rtnl: extend type system to allow address-family to decide the union membersTom Gundersen
So far we only supported selecting them by sibling attributes. (This stuff is all a bit crazy, but there seems to be no other way...)
2015-02-08sd-rtnl: don't treat 0-length messages speciallyTom Gundersen
Still parse the CMSG data, and most importantly make sure we drop the message when peeking.
2015-02-06sd-rtnl: don't fall over when receiving 0 bytes from the socketTom Gundersen
causes EOF. Seems like a kernel bug. Ignoring it seems to work be the best we can do for now... See https://bugs.freedesktop.org/show_bug.cgi?id=88397
2015-02-06sd-rtnl: fix creation of synthetic error repliesTom Gundersen
2015-02-05bus: sync with kdbus (ABI break)David Herrmann
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