summaryrefslogtreecommitdiff
path: root/src/core
AgeCommit message (Collapse)Author
2015-06-15everywhere: port everything to sigprocmask_many() and friendsLennart Poettering
This ports a lot of manual code over to sigprocmask_many() and friends. Also, we now consistly check for sigprocmask() failures with assert_se(), since the call cannot realistically fail unless there's a programming error. Also encloses a few sd_event_add_signal() calls with (void) when we ignore the return values for it knowingly.
2015-06-14Merge pull request #189 from teg/rtnl-renameDavid Herrmann
Rename sd_rtnl to sd_netlink to prepare for further netlink-protocol support. Anything rtnl specific still uses the sd_rtnl prefix, but the generic parts (including the bus and message objects) are now called sd_netlink.
2015-06-13sd-netlink: rename from sd-rtnlTom Gundersen
2015-06-12Merge pull request #167 from keszybz/line-oriented-ima-setupkeszybz
ima-setup: write policy one line at a time
2015-06-12selinux: whitespace fixesLennart Poettering
2015-06-12core: fix CID 996302Susant Sahani
CID 996302: Error handling issues (CHECKED_RETURN)
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-11kmod-setup: don't print warning on -ENOSYSDaniel Mack
-ENOSYS is returned from kmod_module_probe_insert_module() if a module isn't available, not -ENOENT. Don't spit out a warning in that case unless the warn_if_unavailable flag is set. Also factor out the condition into an own variable for better readability.
2015-06-11ima-setup: write policy one line at a timeZbigniew Jędrzejewski-Szmek
ima_write_policy() expects data to be written as one or more rules, no more than PAGE_SIZE at a time. Easiest way to ensure that we are not splitting rules is to read and write one line at a time. https://bugzilla.redhat.com/show_bug.cgi?id=1226948
2015-06-11kmod-setup: when we fail to load a kmod, log the error causeLennart Poettering
(Also, downgrade message from LOG_ERROR to LOG_WARNING, after all we don't care much and just proceed)
2015-06-11core: Let two more booleans survive a daemon-reloadWerner Fink
Without the boolean bus_name_good services as well as cgroup_realized for units a unit of Type=dbus and ExecReload sending SIGHUP to $MAINPID will be terminated if systemd will be daemon reloaded. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746151 https://bugs.freedesktop.org/show_bug.cgi?id=78311 https://bugzilla.opensuse.org/show_bug.cgi?id=934077
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 #85 from keszybz/selinux-contextZbigniew Jędrzejewski-Szmek
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-09core: log oom during killing spreeThomas Hindoe Paaboel Andersen
but don't do anything else. We still want to kill as much as possible. Coverity CID#996306
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-08tree-wide: remove spurious spaceThomas Hindoe Paaboel Andersen
2015-06-08kmod-setup: split warn flagsDaniel Mack
Traditionally, we used to warn about ipv6 being a module or being unavailable. This was changed in b4aa82f16 ("kmod-setup: don't warn when ipv6 can't be loaded") in a way that neither of the two conditions will cause a log message. Now, while running a setup without any IPv6 is completely fine and shouldn't cause any warning, we should still warn about ipv6 being a module instead of built-in. To achieve this, split the boolean warn flag into two: one for a feature not being built-in but shipped as a module, and one to print an error when a module is entirely unavailable. We will, however, still warn if kmod returns anything else than -ENOENT in the attempt of loading the module, and at the very least, turn the message into a debug log.
2015-06-05Merge pull request #79 from zonque/fdo-87475Kay Sievers
kmod-setup: don't warn when ipv6 can't be loaded (FDO bug #87475)
2015-06-05kmod-setup: don't warn when ipv6 can't be loadedDaniel Mack
Not having IPv6 is a valid setup. Let's not print a warning in that case. Addresses: https://bugs.freedesktop.org/show_bug.cgi?id=87475
2015-06-05core: Remove "old kernel" warning if PR_SET_CHILD_SUBREAPER failsCristian Rodríguez
This made sense when systemd ran on older kernels, nowdays not so much.
2015-06-04Merge pull request #73 from zonque/mountinfoDavid Herrmann
core/mount: skip incomplete mountinfo entries
2015-06-04core/mount: skip incomplete mountinfo entriesDaniel Mack
Skip /proc/mountinfo entries for which libmount returns a NULL pointer for 'source' or 'target'. This happened on Semaphore CI's build servers when the test suite is run.
2015-06-04Partially revert "ma-setup: simplify"Zbigniew Jędrzejewski-Szmek
copy_bytes() tries to do the write in chunks, but ima kernel code needs every rule to be written in one write. Writing the whole file at once avoids the issue. http://lists.freedesktop.org/archives/systemd-devel/2015-June/032623.html http://sourceforge.net/p/linux-ima/mailman/message/34145236/ https://bugzilla.redhat.com/show_bug.cgi?id=1226948
2015-06-03kdbus: remove attach_flags_mask module parameter settingKay Sievers
2015-06-01load-fragment: use UNESCAPE_RELAX flag to parse exec directivesDaniel Mack
The cunescape() helper function used to handle unknown escaping sequences gracefully by copying them over verbatim. Commit 527b7a42 ("util: rework cunescape(), improve error handling") added a flag to make that behavior optional, and changed to default to error out with -EINVAL otherwise. However, config_parse_exec(), which is used to parse the Exec{Start,Stop}{Post,Pre,} directives of unit files, was not changed along with that commit, which means that directives with improperly escaped command line strings are no longer parsed. Relevant bugreports include: https://bugs.freedesktop.org/show_bug.cgi?id=90794 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787256 Fix this by passing UNESCAPE_RELAX to config_parse_exec() in order to restore the original behavior.
2015-05-31core/namespace: Protect /usr instead of /home with ProtectSystem=yesJason Pleau
A small typo in ee818b8 caused /home to be put in read-only instead of /usr when ProtectSystem was enabled (ie: not set to "no").
2015-05-29util: split out signal-util.[ch] from util.[ch]Lennart Poettering
No functional changes.
2015-05-29path-util: Change path_is_mount_point() symlink arg from bool to flagsMartin Pitt
This makes path_is_mount_point() consistent with fd_is_mount_point() wrt. flags.
2015-05-27fix extraneous space in equality checkJonathan Boulle
2015-05-25swap: use swapon -oKarel Zak
This patch simplify swapon usage in systemd. The command swapon(8) since util-linux v2.26 supports "-o <list>". The idea is exactly the same like for mount(8). The -o specifies options in fstab-compatible way. For systemd it means that it does not have to care about things like "discard" or another swapon specific options. swapon -o <options-from-fstab> For backward compatibility the code cares about "Priority:" swap unit field (for a case when Priority: is set, but pri= in the Options: is missing). References: http://lists.freedesktop.org/archives/systemd-devel/2014-October/023576.html
2015-05-21manager: fix finish_timestamp calculationLennart Poettering
http://lists.freedesktop.org/archives/systemd-devel/2015-May/032100.html
2015-05-21device: never act on mount events for devices if device support is not availableLennart Poettering
2015-05-21core: properly handle jobs that are suppressed to JOB_NOPs when propagating ↵Lennart Poettering
restarts
2015-05-21util: introduce PERSONALITY_INVALID as macro for 0xffffffffLULennart Poettering
2015-05-21nspawn: finish user namespace supportLennart Poettering
2015-05-20core,nspawn: unify code that moves the root dirLennart Poettering
2015-05-19core: don't consider boot-up finished if we are still reloadingLennart Poettering
http://lists.freedesktop.org/archives/systemd-devel/2015-May/032025.html
2015-05-19core: when propagating restart requests due to deps, downgrade restart to ↵Lennart Poettering
try-restart Previously, if a service A depended on a service B via Requires=, and A was not running and B restarted this would trigger a start of A as well, since the restart was propagated as restart independently of the state of A. This patch ensures that a restart of B would be propagated as a try-restart to A, thus not changing its state if it isn't up. http://lists.freedesktop.org/archives/systemd-devel/2015-May/032061.html
2015-05-19core: sd_bus_error() already checks for NULL, no need to duplicate checkLennart Poettering
2015-05-19core: reinstate propagation of stop/restart jobs via RequsiteOf dependenciesLennart Poettering
This reverts the primary effect of be7d9ff730cb88d7c6a869dd5c47754c78ceaef2. After all Requisite= should be close to Requires=, without the one exception that it doesn't pull in dependencies on start. However, reverse deps on stop/restart should be treated the same way as for Restart=, and this is already documented in the man page, hence stick to it. http://lists.freedesktop.org/archives/systemd-devel/2015-May/032049.html
2015-05-19mount: properly check for mounts currently in /proc/self/mountinfoLennart Poettering
http://lists.freedesktop.org/archives/systemd-devel/2015-May/032059.html
2015-05-19unit: drop support for pre-v44 job serializationLennart Poettering
No distro ships that old systemd versions anyway, hence let's drop support for live-upgrades for them. Offline updates are still supported. And live-upgrades will only lose the job queue, hence basically still work...
2015-05-19core: also enforce ratelimiter if we stop a unit due to BindsTo=Lennart Poettering
This extends on bea355dac94e82697aa98e25d80ee4248263bf92, and extends the ratelimiter to not only be used for StopWhenUnneeded=1 units but also for units that have BindsTo= on a unit that is dead. http://lists.freedesktop.org/archives/systemd-devel/2015-April/030224.html
2015-05-19core: use bitfield where possibleLennart Poettering
2015-05-19core: enforce a ratelimiter when stopping units due to StopWhenUnneeded=1Lennart Poettering
Otherwise we might end up in an endless stop loop. http://lists.freedesktop.org/archives/systemd-devel/2015-April/030224.html
2015-05-19unit: fix unit_check_unneeded() dependency iterationLennart Poettering
Fixes a regression introduced in be7d9ff730cb88d7c6a869dd5c47754c78ceaef2.
2015-05-19mount: don't claim a device is gone from /proc/self/mountinfo before it is ↵Lennart Poettering
gone from *all* lines Devices might be referenced by multiple mount points in /proc/self/mountinfo, hence we should consider them unmounted only after they disappeared from all lines, not just from one. http://lists.freedesktop.org/archives/systemd-devel/2015-May/032026.html
2015-05-19device: create units with intended "found" valueMartin Pitt
Change device_found_node() to also create a .device unit if a device is not known by udev; this is the case for "tentative" devices picked up by mountinfo (DEVICE_FOUND_MOUNT). With that we can record the "found" attribute on the unit. Change device_setup_unit() to also accept a NULL udev_device, and don't add the extra udev information in that case. Previously device_found_node() would not create a .device unit, and unit_add_node_link() would then create a "dead" stub one via manager_load_unit(), so we lost the "found" attribute and unmounted everything from that device. https://launchpad.net/bugs/1444402 http://lists.freedesktop.org/archives/systemd-devel/2015-May/031658.html