Michał Bartoszkiewicz [Tue, 5 Jul 2016 17:23:23 +0000 (19:23 +0200)]
systemd-run: really make -E an alias for --setenv (#3654)
systemd-run --help says:
-E --setenv=NAME=VALUE Set environment
Martin Pitt [Mon, 4 Jul 2016 15:24:38 +0000 (17:24 +0200)]
Merge pull request #3652 from torstehu/fix-typo
treewide: fix typos and add manpage interlinking.
Torstein Husebø [Fri, 24 Jun 2016 13:32:57 +0000 (15:32 +0200)]
man: add link to sd_bus_add_match to busctl.xml
Torstein Husebø [Thu, 12 May 2016 09:23:35 +0000 (11:23 +0200)]
treewide: fix typos
Evgeny Vereshchagin [Mon, 4 Jul 2016 08:11:07 +0000 (11:11 +0300)]
tests: fix memory leak in test_strv_fnmatch (#3653)
==1447== 4 bytes in 1 blocks are definitely lost in loss record 1 of 1
==1447== at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==1447== by 0x5350F19: strdup (in /usr/lib64/libc-2.23.so)
==1447== by 0x4E9D435: strv_new_ap (strv.c:166)
==1447== by 0x4E9D5FA: strv_new (strv.c:199)
==1447== by 0x10E665: test_strv_fnmatch (test-strv.c:693)
==1447== by 0x10EAD5: main (test-strv.c:763)
==1447==
Evgeny Vereshchagin [Mon, 4 Jul 2016 00:45:58 +0000 (03:45 +0300)]
Merge pull request #3650 from fsateler/shared-basic-fallout
fix fallout from libsystemd-shared
Felipe Sateler [Sun, 3 Jul 2016 22:56:54 +0000 (18:56 -0400)]
tests: Install missing libraries for things installed in /usr too
Felipe Sateler [Sun, 3 Jul 2016 22:32:48 +0000 (18:32 -0400)]
build-sys: link test-keymap-util against libsystemd-shared
Felipe Sateler [Sun, 3 Jul 2016 15:19:38 +0000 (11:19 -0400)]
tests: run file via libtool to determine shell scripts
The actual output file might be a wrapper script, so lets follow the indirection
Fixes: #3644
Felipe Sateler [Sun, 3 Jul 2016 15:17:13 +0000 (11:17 -0400)]
tests: follow RUNPATH when installing missing libraries
Fixes #3630
Lennart Poettering [Sat, 2 Jul 2016 22:22:14 +0000 (15:22 -0700)]
Merge pull request #3641 from 0xAX/unset-cloexec-for-stdfs
basic/fd-util: introduce stdio_unset_cloexec() function
Alexander Kuleshov [Sat, 2 Jul 2016 17:42:01 +0000 (23:42 +0600)]
treewide: use stdio_unset_cloexec() function
Alexander Kuleshov [Sat, 2 Jul 2016 17:38:47 +0000 (23:38 +0600)]
basic/fd-util: introduce stdio_unset_cloexec() function
There are some places in the systemd which are use the same pattern:
fd_cloexec(STDIN_FILENO, false);
fd_cloexec(STDOUT_FILENO, false);
fd_cloexec(STDERR_FILENO, false);
to unset CLOEXEC for standard file descriptors. This patch introduces
the stdio_unset_cloexec() function to hide this and make code cleaner.
Lennart Poettering [Sat, 2 Jul 2016 16:03:20 +0000 (09:03 -0700)]
Merge pull request #3637 from dobyrch/calendar-ranges
Allow date and time ranges in OnCalendar
0xAX [Sat, 2 Jul 2016 15:17:26 +0000 (18:17 +0300)]
sd-resolve: use close_many() (#3643)
Douglas Christman [Fri, 1 Jul 2016 02:26:07 +0000 (22:26 -0400)]
calendarspec: use ".." notation for ranges of weekdays
For backwards compatibility, both the new format (Mon..Wed) and
the old format (Mon-Wed) are supported.
Douglas Christman [Fri, 1 Jul 2016 00:16:05 +0000 (20:16 -0400)]
calendarspec: allow ranges in date and time specifications
Resolves #3042
Lennart Poettering [Sat, 2 Jul 2016 01:39:26 +0000 (18:39 -0700)]
update TODO
Kyle Walker [Fri, 1 Jul 2016 17:03:35 +0000 (13:03 -0400)]
manager: Fixing a debug printf formatting mistake (#3640)
A 'llu' formatting statement was used in a debugging printf statement
instead of a 'PRIu64'. Correcting that mistake here.
Lennart Poettering [Thu, 30 Jun 2016 22:57:39 +0000 (15:57 -0700)]
Merge pull request #3634 from disneyworldguy/v2sigchld
manager: Only invoke a single sigchld per unit within a cleanup cycle
Lennart Poettering [Thu, 30 Jun 2016 22:56:23 +0000 (15:56 -0700)]
Fix #3236 (#3633)
* networkd: condition_test() can return a negative error, handle that
If a condition check fails with an error we should not consider the check
successful. Fix that.
We should probably also improve logging in this case, but for now, let's just
unbreak this breakage.
Fixes: #3236
* condition: handle unrecognized architectures nicer
When we encounter a check for an architecture we don't know we should not
let the condition check fail with an error code, but instead simply return
false. After all the architecture might just be newer than the ones we know, in
which case it's certainly not our local one.
Fixes: #3236
Martin Pitt [Thu, 30 Jun 2016 19:30:35 +0000 (21:30 +0200)]
Merge pull request #3596 from poettering/machine-clean
make "machinectl clean" asynchronous, and open it up via PolicyKit
Lukas Lösche [Thu, 30 Jun 2016 19:25:51 +0000 (21:25 +0200)]
man: minor typo "has already has happened" (#3635)
Lennart Poettering [Thu, 30 Jun 2016 19:25:07 +0000 (12:25 -0700)]
sd-event: expose the event loop iteration counter via sd_event_get_iteration() (#3631)
This extends the existing event loop iteration counter to 64bit, and exposes it
via a new function sd_event_get_iteration(). This is helpful for cases like
issue #3612. After all, since we maintain the counter anyway, we might as well
expose it.
(This also fixes an unrelated issue in the man page for sd_event_wait() where
micro and milliseconds got mixed up)
Kyle Walker [Thu, 30 Jun 2016 19:12:18 +0000 (15:12 -0400)]
manager: Only invoke a single sigchld per unit within a cleanup cycle
By default, each iteration of manager_dispatch_sigchld() results in a unit level
sigchld event being invoked. For scope units, this results in a scope_sigchld_event()
which can seemingly stall for workloads that have a large number of PIDs within the
scope. The stall exhibits itself as a SIG_0 being initiated for each u->pids entry
as a result of pid_is_unwaited().
v2:
This patch resolves this condition by only paying to cost of a sigchld in the underlying
scope unit once per sigchld iteration. A new "sigchldgen" member resides within the
Unit struct. The Manager is incremented via the sd event loop, accessed via
sd_event_get_iteration, and the Unit member is set to the same value as the manager each
time that a sigchld event is invoked. If the Manager iteration value and Unit member
match, the sigchld event is not invoked for that iteration.
Lennart Poettering [Thu, 30 Jun 2016 16:47:52 +0000 (09:47 -0700)]
Merge pull request #3608 from teg/sd-device-driver-id
sd-device: handle the 'drivers' pseudo-subsystem correctly
ottopotto [Thu, 30 Jun 2016 14:59:06 +0000 (17:59 +0300)]
journalctl: Make temporary files directory configurable (#3574)
journalctl: Use env variable TMPDIR to save temporary files
Lennart Poettering [Thu, 30 Jun 2016 02:03:26 +0000 (19:03 -0700)]
sd-event: expose the event loop iteration counter via sd_event_get_iteration()
This extends the existing event loop iteration counter to 64bit, and exposes it
via a new function sd_event_get_iteration(). This is helpful for cases like
issue #3612. After all, since we maintain the counter anyway, we might as well
expose it.
(This also fixes an unrelated issue in the man page for sd_event_wait() where
micro and milliseconds got mixed up)
Martin Pitt [Thu, 30 Jun 2016 13:44:22 +0000 (15:44 +0200)]
test: check resolved generated resolv.conf in networkd-test (#3628)
* test: check resolved generated resolv.conf in networkd-test
Directly verify the contents of /run/systemd/resolve/resolv.conf instead of
/etc/resolv.conf. The latter might be a plain file or a symlink to something
else (like Debian's resolvconf output), and in these cases we cannot make
strong assumptions about the contents.
Drop the "/etc/resolv.conf is a symlink" conditions and the "resolv.conf can
have at most three nameservers" alternatives, as we know that resolved always
adds all nameservers.
Explicitly start resolved at the start of a test to ensure that it is running.
* test: get along with existing system search domains in resolv.conf
The previous change has uncovered a bug in the tests: Existing search domains
can exist in resolv.conf which test_search_domains{,_too_long} didn't take into account.
As existing domains take some of the "max 6 domains" and "max 255 chars" limit,
don't expect that the last items from our test data actually appears in the
output, just the first few.
Lennart Poettering [Wed, 29 Jun 2016 20:38:50 +0000 (22:38 +0200)]
Merge pull request #3516 from fsateler/shared-basic
build-sys: Convert libshared into a private shared library
Lennart Poettering [Wed, 29 Jun 2016 20:25:08 +0000 (22:25 +0200)]
Merge pull request #3622 from keszybz/journalctl-this-boot
Make `journalctl --directory=... --boot 0` work
Weng Xuetian [Wed, 29 Jun 2016 20:22:12 +0000 (13:22 -0700)]
sd-bus: Fix a read after free error in bus-match. (#3624) (#3625)
The loop on bus_match_run should break and return immediately if
bus->match_callbacks_modified is true. Otherwise the loop may access
free'd data.
Susant Sahani [Tue, 28 Jun 2016 20:27:07 +0000 (01:57 +0530)]
systemctl mask of an non-existent unit should print a warning (#3521)
fixes https://bugzilla.redhat.com/show_bug.cgi?id=842060
Zbigniew Jędrzejewski-Szmek [Tue, 28 Jun 2016 20:12:47 +0000 (16:12 -0400)]
journalct: allow --boot=0 to DTRT with --file/--directory
--boot=0 magically meant "this boot", but when used with --file/--directory it
should simply refer to the last boot found in the specified journal. This way,
--boot and --list-boots are consistent.
Fixes #3603.
Zbigniew Jędrzejewski-Szmek [Tue, 28 Jun 2016 19:49:03 +0000 (15:49 -0400)]
journalctl: use simpler variable names in get_boots()
Those are just local variables and ref_boot_offset is especially
obnoxious.
Zbigniew Jędrzejewski-Szmek [Tue, 28 Jun 2016 19:39:56 +0000 (15:39 -0400)]
journalct: do no allow --this-boot to take arguments
Before --this-boot was deprecated in
a331b5e6d47243, it did not take
any arguments.
Zbigniew Jędrzejewski-Szmek [Tue, 28 Jun 2016 19:27:07 +0000 (15:27 -0400)]
journalctl: allow --file/--directory with --boot or --list-boots
It works mostly fine, and can be quite useful to examine data from another
system.
OTOH, a single boot id doesn't make sense with --merge, so mixing with --merge
is still not allowed.
Lénaïc Huard [Tue, 28 Jun 2016 18:15:33 +0000 (20:15 +0200)]
Remove blank line in the output of “systemctl show” (#3614)
“systemctl show” added an extra blank line after the dump of the
EnvironmentFile property of the unit.
Luca Bruno [Tue, 28 Jun 2016 18:14:08 +0000 (20:14 +0200)]
man: clarify NotifyAccess overriding (#3620)
Type=notify has a magic overriding case where a NotifyAccess=none
is turned into a NotifyAccess=main for sanity purposes.
This makes docs more clear about such behavior:
https://github.com/systemd/systemd/blob/
2787d83c28b7565ea6f80737170514e5e6186917/src/core/service.c#L650:L651
Martin Pitt [Tue, 28 Jun 2016 16:18:27 +0000 (18:18 +0200)]
resolved: add test for route-only domain filtering (#3609)
With commit
6f7da49d00 route-only domains do not get put into resolv.conf's
"search" list any more. Add a comment about the tri-state, to clarify its
semantics and why we are passing a bool parameter into an int type. Also add a
test case for it.
Andika Triwidada [Tue, 28 Jun 2016 08:14:27 +0000 (15:14 +0700)]
Added Indonesian translation (#3615)
0xAX [Mon, 27 Jun 2016 21:26:07 +0000 (00:26 +0300)]
basic/strv: introduce STRV_IGNORE macro (#3601)
to hide casting of '-1' strings and make code cleaner.
Evgeny Vereshchagin [Mon, 27 Jun 2016 12:47:37 +0000 (15:47 +0300)]
basic: pass flags to the fnmatch (#3606)
Fixes:
```
$ systemctl list-unit-files 'hey\*'
0 unit files listed.
$ systemctl list-unit-files | grep hey
hey\x7eho.service static
```
Tom Gundersen [Mon, 27 Jun 2016 07:58:59 +0000 (09:58 +0200)]
sd-device: new_from_subsystem_sysnam - support a real subsystem called 'drivers'
We support writing out tags and db files in case a real subsystem called
'drivers' exists, so there is no reason to refuse parsing it.
Tom Gundersen [Sun, 26 Jun 2016 21:05:27 +0000 (23:05 +0200)]
sd-device: device_id - set correctly for 'drivers'
The 'drivers' pseudo-subsystem needs special treatment. These pseudo-devices are
found under /sys/bus/drivers/, so needs the real subsystem encoded
in the device_id in order to be resolved.
The reader side already assumed this to be the case.
Tom Gundersen [Sun, 26 Jun 2016 20:36:46 +0000 (22:36 +0200)]
sd-device: enumerator - do not abort enumeration if a device fails
Collect the errors and return to the caller, but continue enumerating all devices.
Martin Pitt [Sun, 26 Jun 2016 15:46:23 +0000 (17:46 +0200)]
Merge pull request #3572 from poettering/machinectl-shell-fix
machinectl: interpret options placed between "shell" verb and machine name
Lennart Poettering [Sun, 26 Jun 2016 15:43:37 +0000 (17:43 +0200)]
catalog: make support URL to show in shipped catalog entries configurable (#3597)
Let's allow distros to change the support URL to expose in catalog entries by
default. It doesn't make sense to direct end-users to the upstream project for
common errors.
This adds a --with-support-url= switch to configure, which allows overriding
the default at build-time.
Fixes: #2516
Lennart Poettering [Sun, 26 Jun 2016 15:41:33 +0000 (17:41 +0200)]
machinectl: verify image existance on "start" and "enable" (#3579)
Let's make sure we catch early when a machine doesn't exist that is attempted
to be started or enabled as system service.
0xAX [Sun, 26 Jun 2016 15:37:24 +0000 (18:37 +0300)]
networkd: use strv_fnmatch() (#3605)
Lennart Poettering [Sun, 26 Jun 2016 15:35:22 +0000 (17:35 +0200)]
man: document what Authenticated: in the systemd-resolve output actually means (#3571)
My educated guess is that #3561 was filed due to confusion around the
systemd-resolve "Data Authenticated:" output. Let's try to clean up the
confusion a bit, and document what it means in the man page.
Martin Pitt [Sun, 26 Jun 2016 10:46:17 +0000 (12:46 +0200)]
Merge pull request #3600 from poettering/fstab-generator-fixes
Fstab generator fixes
0xAX [Sun, 26 Jun 2016 10:37:00 +0000 (13:37 +0300)]
basic/strv: use SWAP_TWO() macro (#3602)
Lennart Poettering [Sat, 25 Jun 2016 04:04:43 +0000 (06:04 +0200)]
nspawn: fix uid patching logic (#3599)
An incorrectly set if/else chain caused aus to apply the access mode of a
symlink to the directory it is located in. Yuck.
Fixes: #3547
Felipe Sateler [Sat, 25 Jun 2016 02:14:25 +0000 (22:14 -0400)]
build-sys: Add new libsystemd-shared private library
Link as many binaries as possible with it, to save storage space.
Preserve the static libshared and libbasic for use in libraries, nss
modules and udev.
Libraries need to be static in order to avoid polluting the symbol
namespace.
Udev needs to be static so downstream can avoid strict version dependencies
with the systemd package, and this can complicate upgrade scenarios.
Felipe Sateler [Sat, 25 Jun 2016 02:10:37 +0000 (22:10 -0400)]
build-sys: do not recompile everything for libsystemd
Lennart Poettering [Fri, 24 Jun 2016 19:22:05 +0000 (21:22 +0200)]
fstab-generator: minor simplification
Lennart Poettering [Fri, 24 Jun 2016 19:07:18 +0000 (21:07 +0200)]
fstab-generator: skip fsck for /usr on non-device file systems
We do the same already for the root device, hence follow the scheme for /usr
too.
(Also add some explanatory comments.)
Lennart Poettering [Fri, 24 Jun 2016 19:04:48 +0000 (21:04 +0200)]
fstab-generator: don't skip /usr handling if root handling didn't work correctly
Let's follow the same logic for all mounts here: log errors, and exit the
process uncleanly ultimately, but do not skip further mounts if we encounter a
problem with an earlier one.
Fixes: #2344
Lennart Poettering [Fri, 24 Jun 2016 19:03:47 +0000 (21:03 +0200)]
systemctl: fix an error condition from "-1" to something meaningful
We really shouldn't make up errors like "-1", but use proper errno definitions.
Lennart Poettering [Fri, 24 Jun 2016 19:01:22 +0000 (21:01 +0200)]
fstab-generator: fix checking of fstab_node_to_udev_node() result
We have to check for OOM here, let's add that. There's really no point in
checking for path_is_absolute() on the result however, as there's no particular
reason why that should be refused. Also, we don't have similar checks for the
other mount devices the generator deals with, hence don't bother with it here
either. Let's remove that check.
(And it shouldn't return made-up errors like "-1" in this case anyway.)
Lennart Poettering [Fri, 24 Jun 2016 19:00:11 +0000 (21:00 +0200)]
fstab-generator: document why we copy the root device into the usr device if unset
Let's a comment about this, to avoid questions popping up like in #2344.
Lennart Poettering [Fri, 24 Jun 2016 18:59:51 +0000 (20:59 +0200)]
fstab-generator: let's use path_equal() for comparing paths
Evgeny Vereshchagin [Fri, 24 Jun 2016 16:44:18 +0000 (19:44 +0300)]
Merge pull request #3587 from martinpitt/master
Fix some test issues
Martin Pitt [Fri, 24 Jun 2016 14:23:39 +0000 (16:23 +0200)]
test: merge check_nspawn() into run_nspawn()
This makes nspawn tests symmetric with run_qemu() which also exits with 1 if
QEMU is not available.
Franck Bui [Fri, 24 Jun 2016 14:08:43 +0000 (16:08 +0200)]
pid1: restore console color support for containers (#3595)
Commit
3a18b60489504056f9b0b1a139439cbfa60a87e1 introduced a regression that
disabled the color mode for container.
This patch fixes this.
Martin Pitt [Fri, 24 Jun 2016 10:11:19 +0000 (12:11 +0200)]
tests: track and check for timeouts
If run_qemu() exits with non-zero, this either meant that QEMU was not
available (which should be a SKIP) or that QEMU timed out if $QEMU_TIMEOUT was
set (which then should be a FAIL).
Limit the exit code of run_qemu() to QEMU availability only, and track timeouts
separately through the new $TIMED_OUT variable, which is then checked in
check_result_qemu().
Do the same for $NSPAWN_TIMEOUT and run_nspawn() so that nspawn and QEMU work
similarly.
Lennart Poettering [Fri, 24 Jun 2016 14:03:49 +0000 (16:03 +0200)]
machined: make sure CleanPool() method is opened up in the dbus policy
The method is already hooked up to PolicyKit, hence let's open this up via the
bus policy language too.
Fixes: #3585
Lennart Poettering [Fri, 24 Jun 2016 14:01:14 +0000 (16:01 +0200)]
machined: "machinectl clean" can take a while, do it asynchronously from a background process
This is a follow-up to
5d2036b5f3506bd0ff07042aee8d69c26db32298, and also makes
the "machinectl clean" verb asynchronous, after all it's little more than a
series of image removals.
The changes required to make this happen are a bit more comprehensive as we
need to pass information about deleted images back to the client, as well as
information about the image we failed on if we failed on one. Hence, create a
temporary file in /tmp, serialize that data into, and read it from the parent
after the operation is complete.
Lennart Poettering [Fri, 24 Jun 2016 13:59:42 +0000 (15:59 +0200)]
machined: don't bother explicitly closing the errno pipe
There's no point in explicitly closing the errno pipe, if we exit right after
anyway. It doesn't hurt doing this either, but let's do this the same way for
all cases where we use the "Operation" object right now, and in all other cases
we do not close the pipe explicitly, hence don't do so here either.
Lennart Poettering [Fri, 24 Jun 2016 13:59:24 +0000 (15:59 +0200)]
cgroup: minor coding style fix
Martin Pitt [Fri, 24 Jun 2016 10:07:18 +0000 (12:07 +0200)]
tests: make TEST-12-ISSUE-3171 nspawn invocation consistent with other tests
The result of check_nspawn does not mean much, and this forgot to ask
check_nspawn() whether nspawn can be used at all. This brings
TEST-12-ISSUE-3171 in line with other nspawn tests.
Lennart Poettering [Fri, 24 Jun 2016 09:45:06 +0000 (11:45 +0200)]
update
Martin Pitt [Thu, 23 Jun 2016 08:23:29 +0000 (10:23 +0200)]
tests: don't fail if QEMU is not available
Fix TEST-{08,09,10,11} to properly skip the test if QEMU is not available
instead of failing, like in the other tests.
Martin Pitt [Thu, 23 Jun 2016 08:25:44 +0000 (10:25 +0200)]
tests: force booting the kernel with SELinux
selinux=1 is not sufficient when running on a kernel which also has another LSM
(such as AppArmor) enabled and defaults to that.
Martin Pitt [Fri, 24 Jun 2016 06:01:49 +0000 (08:01 +0200)]
Merge pull request #3594 from poettering/resolved-servfail
resolved fixes for handling SERVFAIL errors from servers
Doug Christman [Fri, 24 Jun 2016 06:00:35 +0000 (02:00 -0400)]
systemctl: Create new unit files with "edit --force" (#3584)
Martin Pitt [Fri, 24 Jun 2016 05:54:28 +0000 (07:54 +0200)]
resolved: add option to disable caching (#3592)
In some cases, caching DNS results locally is not desirable, a it makes DNS
cache poisoning attacks a tad easier and also allows users on the system to
determine whether or not a particular domain got visited by another user. Thus
provide a new "Cache" resolved.conf option to disable it.
Tom Gundersen [Thu, 23 Jun 2016 23:26:25 +0000 (01:26 +0200)]
Merge pull request #3549 from poettering/resolved-more
resolved: more fixes, among them "systemctl-resolve --status" to see DNS configuration in effect, and a local DNS stub listener on 127.0.0.53
Lennart Poettering [Thu, 23 Jun 2016 21:46:56 +0000 (23:46 +0200)]
resolved: when processing auxiliary DNSSEC transactions, accept those with SERVFAIL
Some upstream DNS servers return SERVFAIL if we ask them for DNSSEC RRs, which
some forwarding DNS servers pass on to us as SERVFAIL (other though as
NOERROR...). This is should not be considered a problem, as long as the domain
in question didn't have DNSSEC enabled. Hence: when making use of auxiliary
transactions accept those that return SERVFAIL.
Lennart Poettering [Thu, 23 Jun 2016 21:36:10 +0000 (23:36 +0200)]
resolved: when caching replies, check rcode earlier
This way we don't log complaints about packets without SOA in case we are not
caching it anyway because the rcode is not SUCCESS or NXDOMAIN...
Lennart Poettering [Thu, 23 Jun 2016 21:24:38 +0000 (23:24 +0200)]
resolved: rework SERVFAIL handling
There might be two reasons why we get a SERVFAIL response from our selected DNS
server: because this DNS server itself is bad, or because the DNS server
actually serving the zone upstream is bad. So far we immediately downgraded our
server feature level when getting SERVFAIL, under the assumption that the first
case is the only possible case. However, this meant we'd downgrade immediately
even if we encountered the second case described above.
With this commit handling of SERVFAIL is reworked. As soon as we get a SERVFAIL
on a transaction we retry the transaction with a lower feature level, without
changing the feature level tracked for the DNS server itself. If that fails
too, we downgrade further, and so on. If during this downgrading the SERVFAIL
goes away we assume that the DNS server we are talking to is bad, but the zone
is fine and propagate the detected feature level to the information we track
about the DNS server. Should the SERVFAIL not go away this way we let the
transaction fail and accept the SERVFAIL.
Franck Bui [Thu, 23 Jun 2016 20:31:01 +0000 (22:31 +0200)]
udev: bump TasksMax to inifinity (#3593)
udevd already limits its number of workers/children: the max number is actually
twice the number of CPUs the system is using.
(The limit can also be raised with udev.children-max= kernel command line
option BTW).
On some servers, this limit can easily exceed the maximum number of tasks that
systemd put on all services, which is 512 by default.
Since udevd has already its limitation logic, simply disable the static
limitation done by TasksMax.
Harald Hoyer [Thu, 23 Jun 2016 16:47:03 +0000 (17:47 +0100)]
fstab-generator: ignore root=/dev/nfs (#3591)
root=/dev/nfs is a legacy option for the kernel to handle root on NFS.
Documentation for this kernel command line option
can be found in the kernel source tree:
Documentation/filesystems/nfs/nfsroot.txt
Ronny Chevalier [Thu, 23 Jun 2016 12:11:58 +0000 (13:11 +0100)]
Merge pull request #3583 from poettering/restrict-realtime
add new RestrictRealtime= option to services (and other fixes)
Ronny Chevalier [Thu, 23 Jun 2016 09:15:40 +0000 (10:15 +0100)]
Merge pull request #3581 from dobyrch/master
systemctl: Add missing "/" to files created by 'edit --runtime'
Lennart Poettering [Thu, 23 Jun 2016 02:10:53 +0000 (04:10 +0200)]
build-sys: move fdset.[ch] src/basic → src/shared (#3580)
It makes use of the sd_listen_fds() call, and as such should live in
src/shared, as the distinction between src/basic and src/shared is that the
latter may use libsystemd APIs, the former does not.
Note that btrfs-util.[ch] and log.[ch] also include header files from
libsystemd, but they only need definitions, they do not invoke any function
from it. Hence they may stay in src/basic.
Lennart Poettering [Wed, 22 Jun 2016 23:45:45 +0000 (01:45 +0200)]
execute: add a new easy-to-use RestrictRealtime= option to units
It takes a boolean value. If true, access to SCHED_RR, SCHED_FIFO and
SCHED_DEADLINE is blocked, which my be used to lock up the system.
Lennart Poettering [Wed, 22 Jun 2016 23:35:04 +0000 (01:35 +0200)]
execute: be a little less drastic when MemoryDenyWriteExecute= hits
Let's politely refuse with EPERM rather than kill the whole thing right-away.
Lennart Poettering [Wed, 22 Jun 2016 23:33:07 +0000 (01:33 +0200)]
execute: set PR_SET_NO_NEW_PRIVS also in case the exec memory protection is used
This was forgotten when MemoryDenyWriteExecute= was added: we should set NNP in
all cases when we set seccomp filters.
Lennart Poettering [Wed, 22 Jun 2016 23:31:24 +0000 (01:31 +0200)]
execute: use the return value of setrlimit_closest() properly
It's a function defined by us, hence we should look for the error in its return
value, not in "errno".
Lennart Poettering [Wed, 22 Jun 2016 23:29:33 +0000 (01:29 +0200)]
core: when writing transient unit files, make sure all lines end with a newline
This is a fix-up for
2a9a6f8ac04a69ca36d645f9305a33645f22a22b which covered
non-transient units, but missed the case for transient units.
Lennart Poettering [Wed, 22 Jun 2016 21:30:36 +0000 (23:30 +0200)]
nspawn: improve man page (#3577)
This change documents the existance of the systemd-nspawn@.service template
unit file, which was previously not mentioned at all. Since the unit file uses
slightly different default than nspawn invoked from the command line, these
defaults are now explicitly documented too.
A couple of further additions and changes are made, too.
Replaces: #3497
Lennart Poettering [Wed, 22 Jun 2016 21:28:12 +0000 (23:28 +0200)]
man: document that %f in units always unescapes (#3578)
Douglas Christman [Wed, 22 Jun 2016 19:09:33 +0000 (15:09 -0400)]
systemctl: Add missing "/" to files created by 'edit --runtime'
Elias Probst [Wed, 22 Jun 2016 15:10:52 +0000 (17:10 +0200)]
machinectl: do not escape the unit name (#3554)
Otherwise starting a machine named `foo-bar-baz` will end up in
machinectl attempting to start the service unit
`systemd-nspawn@foo\x2dbar\x2dbaz` instead of
`systemd-nspawn@foo-bar-baz`.
Minkyung [Wed, 22 Jun 2016 11:26:05 +0000 (20:26 +0900)]
watchdog: Support changing watchdog_usec during runtime (#3492)
Add sd_notify() parameter to change watchdog_usec during runtime.
Application can change watchdog_usec value by
sd_notify like this. Example. sd_notify(0, "WATCHDOG_USEC=
20000000").
To reset watchdog_usec as configured value in service file,
restart service.
Notice.
sd_event is not currently supported. If application uses
sd_event_set_watchdog, or sd_watchdog_enabled, do not use
"WATCHDOG_USEC" option through sd_notify.
Martin Pitt [Wed, 22 Jun 2016 11:22:47 +0000 (13:22 +0200)]
NEWS: start section for 231, with tmpfs.mount option changes (#3576)
This documents the "add nosuid and nodev options to tmp.mount" change from
commit
2f9df7c96a2.
Lennart Poettering [Wed, 22 Jun 2016 10:34:25 +0000 (12:34 +0200)]
Merge pull request #3526 from fbuihuu/fix-console-log-color
Fix console log color
Martin Pitt [Wed, 22 Jun 2016 10:32:59 +0000 (12:32 +0200)]
units: add nosuid and nodev options to tmp.mount (#3575)
This makes privilege escalation attacks harder by putting traps and exploits
into /tmp.
https://bugs.debian.org/826377