summaryrefslogtreecommitdiff
path: root/src/libsystemd
AgeCommit message (Collapse)Author
2015-06-13sd-netlink: rename from sd-rtnlTom Gundersen
2015-06-11Merge pull request #171 from teg/rtnl-broadcast-2David Herrmann
sd-rtnl: make joining broadcast groups implicit
2015-06-11sd-rtnl: make joining broadcast groups implicitTom Gundersen
2015-06-11sd-rtnl: use netlink header rather than ucred in socket_recv_message()Tom Gundersen
Lets us simplify the function and drop SO_PASSCRED. Thanks to Alexander Larsson and David Herrmann.
2015-06-11Merge pull request #158 from ssahani/netLennart Poettering
Net
2015-06-11build-sys: split internal basic/ library from shared/Kay Sievers
basic/ can be used by everything cannot use anything outside of basic/ libsystemd/ can use basic/ cannot use shared/ shared/ can use libsystemd/
2015-06-11sd-network: fix CID 1306198Susant Sahani
2015-06-10Merge pull request #148 from teg/sd-network-raceLennart Poettering
sd-network: allow the state dir to be created after the monitor
2015-06-10bus: we now support path_namespace=/David Herrmann
Our bloom-filters support root-path matching. Make sure we properly add the path_namespace= tag.
2015-06-10bus: fix pattern matchingDavid Herrmann
DBus-spec defines two different pattern matchings: 1) Path and namespace prefix matching. In this case, A matches B either if both are equal, or if B is fully included in the namespace of A. In other words, A has to be a prefix of B, but end with a separator character (or the following character in B must be one). This is used for path_namespace= and arg0namespace= 2) The other pattern matching is used for arg0path= which does a two-way matching. That is, A must be a prefix of B, or B a prefix of A. Furthermore, the prefix must end with a separator. Fix the sd-bus helpers to reflect that. The 'simple_' and 'complex_' prefixes don't make any sense now, but.. eh..
2015-06-10bus: fix test-bus-kerne-bloom.c to match properlyDavid Herrmann
Make sure we actually verify our match-rules are executed properly. Right now all we test is the bloom-matches, which are non-reliable as they leave through false-positives.
2015-06-10bus: fix arg0path= two-way matchingDavid Herrmann
DBus spec clearly defines arg0path= to be a two-way matching. That is, either the matcher or the matchee can be a prefix of the other to match. This is not possible to implement with bloom-filters. Instead, we'd have to add a separate filter for each prefix. This is non-trivial, though. Hence, just skip the match for now and match locally.
2015-06-10bus: fix bloom_add_prefixes() to add all required dataDavid Herrmann
Lets look at an example where we add arg0="/foo/bar/waldo" to a bloom-filter. The following strings are added: "arg0:/foo/bar/waldo" "arg0-slash-prefix:/foo/bar" "arg0-slash-prefix:/foo" Two problems arise: 1) If we match on "arg0path=/foo/bar/waldo", the dbus-spec explicitly states that equal strings are also considered prefixes. However, in the bloom-match, we can only provide a single match-filter. Therefore, we have to add "arg0-slash-prefix:/foo/bar/waldo" there, but this never occured in the bloom-mask of the message. Hence, this patch makes sure bloom_add_prefixes() adds the full path as prefix, too. 2) If we match on "arg0path=/foo/", the dbus-spec states that arg0path does prefix-matching with the trailing slash _included_, unlike path_namespace= matches, which does *not* include them. This is inconsistent, but we have to support the specs. Therefore, we must add prefixes with _and_ without trailing separators. Hence, this patch makes sure bloom_add_prefixes() adds all prefixes with the trailing slash included. The final set of strings added therefore is: "arg0:/foo/bar/waldo" "arg0-slash-prefix:/foo/bar/waldo" "arg0-slash-prefix:/foo/bar/" "arg0-slash-prefix:/foo/bar" "arg0-slash-prefix:/foo/" "arg0-slash-prefix:/foo" "arg0-slash-prefix:/"
2015-06-10sd-network: allow the state dir to be created after the monitorTom Gundersen
We now listen for new subdirs of /run/systemd, and /run/systemd/netif in case /run/systemd/netif/links does not exist.
2015-06-10util: introduce CMSG_FOREACH() macro and make use of it everywhereLennart Poettering
It's only marginally shorter then the usual for() loop, but certainly more readable.
2015-06-10Merge pull request #142 from teg/sd-network-unref-NULLLennart Poettering
sd-network: allow NULL in sd_network_monitor_unref
2015-06-10sd-network: allow NULL in sd_network_monitor_unrefTom Gundersen
Match rest of codebase, we always allow unref'ing NULL.
2015-06-10Merge pull request #85 from keszybz/selinux-contextZbigniew Jędrzejewski-Szmek
2015-06-10sd-bus: remove ucred parameter from bus_message_from_header() since we don't ↵Lennart Poettering
use it anymore
2015-06-10sd-bus: fix early exit when we lack all data in bus_get_owner_creds_dbus1()Lennart Poettering
2015-06-10bus-message: remove shadow warning with log_debug_bus_message()Lennart Poettering
2015-06-10sd-bus: store selinux context at connection timeZbigniew Jędrzejewski-Szmek
This appears to be the right time to do it for SOCK_STREAM unix sockets. Also: condition bus_get_owner_creds_dbus1 was reversed. Split it out to a separate variable for clarity and fix. https://bugzilla.redhat.com/show_bug.cgi?id=1224211
2015-06-10sd-bus: do not use per-datagram auxiliary informationZbigniew Jędrzejewski-Szmek
SELinux information cannot be retrieved this way, since we are using stream unix sockets and SCM_SECURITY does not work for them. SCM_CREDENTIALS use dropped to be consistent. We also should get this information at connection time. https://bugzilla.redhat.com/show_bug.cgi?id=1224211 "SCM_SECURITY was only added for datagram sockets."
2015-06-10sd-bus: Correct typoTorstein Husebø
2015-06-10Merge pull request #117 from ↵Lennart Poettering
utezduyar/feat/dump-sync-dbus-message-with-logging-on sd-bus: dump sync messages in debug mode
2015-06-10sd-bus: dump sync messages in debug modeUmut Tezduyar Lindskog
2015-06-10logind,sd-event: drop spurious new-linesLennart Poettering
2015-06-10tree-wide: whenever we fork off a foreign child process reset signal ↵Lennart Poettering
mask/handlers Also, when the child is potentially long-running make sure to set a death signal. Also, ignore the result of the reset operations explicitly by casting them to (void).
2015-06-09bus-creds: always set SD_BUS_CREDS_PID when we set pid in the maskZbigniew Jędrzejewski-Szmek
Also reorder the code a bit to be easier to parse.
2015-06-09sd-bus: add async convenience method call APIUmut Tezduyar Lindskog
2015-06-05bus: don't force send-masks on kdbus busesDavid Herrmann
Right now we always pass KDBUS_ITEM_ATTACH_FLAGS_RECV to KDBUS_CMD_BUS_MAKE, effectively forcing every bus connection to do the same during KDBUS_CMD_HELLO. This used to be a workaround to make sure all metadata is always present. However, we refrained from that approach and intend to make all metadata collection solely rely on /proc access restrictions. Therefore, there is no need to force the send-flags mask on newly created buses.
2015-06-04bus: update kdbus.hDavid Herrmann
Sync with upstream.
2015-06-04sd-event: don't touch fd's accross forksTom Gundersen
We protect most of the API from use accross forks, but we still allow both sd_event and sd_event_source objects to be unref'ed. This would cause problems as it would unregister sources from the underlying eventfd, hence also affecting the original instance in the parent process. This fixes the issue by not touching the fds on unref when done accross a fork, but still free the memory. This fixes a regression introduced by "udevd: move main-loop to sd-event": 693d371d30fee where the worker processes were disabling the inotify event source in the main daemon.
2015-06-03Merge pull request #65 from teg/enumerate-accept-nullKay Sievers
libudev: enumerate - accept NULL parameters in add_match()
2015-06-03kdbus: remove attach_flags_mask module parameter settingKay Sievers
2015-06-03libudev: enumerate - accept NULL parameters in add_match()Tom Gundersen
This was a regression introduced when moving to sd-device.
2015-06-02fix double semicolon typoThomas Hindoe Paaboel Andersen
2015-06-02sd-device: get_driver - remember if a device does not have a driverTom Gundersen
Don't try to read it again.
2015-06-02sd-device: get_subsystem - don't complain if a device does not have a subsystemTom Gundersen
2015-06-01sd-device: ensure update_properties_buf() is a noop on failureTom Gundersen
Don't clobber the sd_device struct, and don't leak memory when memory allocation fails.
2015-06-01sd-device: fix invalid property strv pointersMartin Pitt
In device_update_properties_bufs(), the strv is built from pointers into the single nul-terminated buf_nulstr string, to avoid allocating the key=value strings twice. However, we must not do that while building and GREEDY_REALLOC0()'ing buf_nulstr, as each time when this actually reallocates memory the pointers we wrote into buf_strv so far become invalid. So change the logic to first completely build the new buf_nulstr, and then iterate over it to pick out the pointers to the individual key=value strings for properties_strv. This fixes invalid environment for udev callouts.
2015-05-29util: split out signal-util.[ch] from util.[ch]Lennart Poettering
No functional changes.
2015-05-28sd-device: enumerator - fix matching on properties and sysattrsTom Gundersen
This was a regression that broke $ udevadm trigger -nv --property-match=DEVNAME=/dev/sda1 --attr-match=size=409600 Reported by David Reisner.
2015-05-27sd-device: fix device_get_properties_strv()Tom Gundersen
A NULL pointer was inserted as the first element of the strv. This had the effect of always passing the empty environment to processes spawned by udev. Reported by Michał Bartoszkiewicz.
2015-05-26treewide: fix typosTorstein Husebø
2015-05-22sd-bus,sd-event: make public APIsLennart Poettering
With the v221 release these APIs should be public, stable APIs, hence let's install their headers by default now, and add their symbols to the .sym file.
2015-05-20sd-device: fix return codes on errorZbigniew Jędrzejewski-Szmek
asprintf() does not set errno.
2015-05-19bus-socket: simplify initalization of struct msghdrZbigniew Jędrzejewski-Szmek
2015-05-15systemctl: introduce --now for enable, disable and maskJan Synacek
https://bugs.freedesktop.org/show_bug.cgi?id=42940
2015-05-14test-bus-chat: various modernizationsLennart Poettering