Jérémy Rosen [Fri, 1 Nov 2019 23:03:54 +0000 (00:03 +0100)]
allow an empty DefaultInstance= in configuration files
It is currently possible to override the DefaultInstance via drop-ins but
not remove it completely. Allow to do that by specifying an empty
DefaultInstance=
(cherry picked from commit
b5395600a0b0a4e01f3f50a860547060290aca34)
Jan Synacek [Mon, 4 Nov 2019 09:43:05 +0000 (10:43 +0100)]
man/systemd.net-naming-scheme: fix typo
(cherry picked from commit
ce6304f78e57f2038f62cb923f48ad4f11e71720)
Justin Trudell [Fri, 1 Nov 2019 19:00:16 +0000 (12:00 -0700)]
nspawn: respect quiet on capabilities warning
(cherry picked from commit
0ccdaa79ca69a40e4ad8b3e63b1236734751452e)
Lennart Poettering [Fri, 1 Nov 2019 10:21:05 +0000 (11:21 +0100)]
nspawn: mangle slice name
It's user-facing, parsed from the command line and we typically mangle
in these cases, let's do so here too. (In particular as the identical
switch for systemd-run already does it.)
(cherry picked from commit
43c3fb4680c8a2f8f417a71d7fbedde2db30f0c8)
Kevin Kuehler [Thu, 31 Oct 2019 22:41:32 +0000 (15:41 -0700)]
mkosi: Find hostname command on Arch Linux
exec-specifier.service: Executing: /usr/bin/sh -c 'test mkosi-
7d5e81c7b81c42338d060a6b98edd44a = $(hostname)'
/usr/bin/sh: hostname: command not found
/usr/bin/sh: line 0: test: mkosi-
7d5e81c7b81c42338d060a6b98edd44a: unary operator expected
Received SIGCHLD from PID 7389 (sh).
Child 7389 (sh) died (code=exited, status=2/INVALIDARGUMENT)
gettext provides the hostname binary, but puts it in
/usr/lib/gettext/hostname, which is not part of the default $PATH. Using
inetutils instead puts the binary in /usr/bin/hostname.
(cherry picked from commit
b9dc511954b080d8b05a44f1758be6dbb4078852)
Kevin Kuehler [Thu, 31 Oct 2019 09:32:23 +0000 (02:32 -0700)]
Fix mkosi on Arch Linux
/* test compression */
XZ compression finished (38280 -> 11756 bytes, 30.7%)
sh: diff: command not found
Assertion 'system(cmd) == 0' failed at src/journal/test-compress.c:198,
function test_compress_stream(). Aborting.
The journal compression test shells out to diff, so include diffutils as
a BuildPackage on Arch.
Remaining fixes in https://github.com/systemd/mkosi/pull/377
(cherry picked from commit
9e05564006ada86f6e2777506a5e2b45308a4e5c)
Jóhann B. Guðmundsson [Thu, 31 Oct 2019 14:51:41 +0000 (14:51 +0000)]
Update to Fedora31
(cherry picked from commit
294eeed1443c88b2cf54a1e02c66697cb65d7aec)
Jan Janssen [Wed, 30 Oct 2019 16:44:59 +0000 (17:44 +0100)]
sd-boot: Silence compiler warning when building with -O2
(cherry picked from commit
d9690d8fe9016783ef164c9a006e30987c359c6f)
Jan Janssen [Sun, 15 Sep 2019 14:12:03 +0000 (16:12 +0200)]
sd-boot: Don't loudly complain if RNG protocol isn't available
Fixes #13503
(cherry picked from commit
391719682bf68134b01cf422eb92e3ec4686fa7b)
Jan Janssen [Sun, 15 Sep 2019 13:56:30 +0000 (15:56 +0200)]
sd-boot: Only disable optimization on debug builds
(cherry picked from commit
9ea4d81c12e8a3f7ee081f9eac7e77256f43b7b0)
Lennart Poettering [Wed, 30 Oct 2019 17:55:45 +0000 (18:55 +0100)]
meson: correct man page deps
(cherry picked from commit
20bae8b94d34d75fe2572738e466abc37563bf88)
Lennart Poettering [Wed, 30 Oct 2019 15:37:42 +0000 (16:37 +0100)]
sd-event: don't invalidate source type on disconnect
This fixes fd closing if fd ownership is requested.
(cherry picked from commit
f59825595182d70b9ead238d1e885d0db99cc201)
Lennart Poettering [Fri, 25 Oct 2019 14:05:11 +0000 (16:05 +0200)]
analyze: fix minor memleak
(cherry picked from commit
81610e9609c966a33dcff15a4f3b173aa8f07e4b)
Lennart Poettering [Fri, 25 Oct 2019 14:05:35 +0000 (16:05 +0200)]
analyze: sort list of unknown syscalls kernel implements
(cherry picked from commit
ea334dc328c9bbba68098d2f779293528a123c23)
Lennart Poettering [Wed, 30 Oct 2019 10:11:05 +0000 (11:11 +0100)]
seccomp: add new Linux 5.3 syscalls to syscall filter lists
Many syscalls added and all fit nicely into existing groups, hence lets
add them there.
(cherry picked from commit
9e486265716963439fb0fd7f2a97abf109f24f75)
Iwan Timmer [Tue, 29 Oct 2019 19:32:18 +0000 (20:32 +0100)]
resolved: check for IP in certificate when using DoT with GnuTLS
Validate the IP address in the certificate for DNS-over-TLS in strict mode when GnuTLS is used. As this is not yet the case in contrast to the documentation.
(cherry picked from commit
7f2f4faced3fda47e6b76ab73cde747cc20cf8b8)
Iwan Timmer [Tue, 29 Oct 2019 19:26:05 +0000 (20:26 +0100)]
resolved: require at least version 3.6.0 of GnuTLS for DNS-over-TLS
Increase the required version to ensure TLS 1.3 is always supported when using GnuTLS for DNS-over-TLS and allow further changes to use recent API additions.
(cherry picked from commit
38e053c58fa139e0f546f327b5d8ce3db7cf1647)
Evgeny Vereshchagin [Tue, 29 Oct 2019 19:07:15 +0000 (19:07 +0000)]
coverity: replace python with jq
Judging by https://travis-ci.org/systemd/systemd/jobs/
604425785
(where the script failed with "tools/coverity.sh: line 45: python: command not found")
python-unversioned-command is no longer installed by default with python2.
Given that it's not the first time python has vanished and it's not clear
what exactly should be installed to make sure it's there, let's just use jq instead.
(cherry picked from commit
738606e45251b73950a52e62e7186fe4516a018a)
David Pedersen [Mon, 28 Oct 2019 17:47:14 +0000 (18:47 +0100)]
network-generator: Add missing help for --root
(cherry picked from commit
e6d6645517759f5eb419f6754bd4c12dfa151b21)
Zbigniew Jędrzejewski-Szmek [Sun, 27 Oct 2019 09:00:31 +0000 (10:00 +0100)]
modules-load: do not fail service if modules are not present
It is pretty common for the service to fail in the initramfs (for example
because certain modules have not been copied over or haven't been built yet in
case of dkms modules). This seems to be more trouble than it is worth. Let's
change the service to simply log any missing modules at error level, but not
fail the whole service.
https://bugzilla.redhat.com/show_bug.cgi?id=
1254340
(cherry picked from commit
fec837e96e902c041adae552aa3101b8a8132869)
Zbigniew Jędrzejewski-Szmek [Fri, 25 Oct 2019 14:57:37 +0000 (16:57 +0200)]
pid1: order .automount units after local-fs-pre.target
From the bug:
> According to the documentation of systemd.automount if the automoint point is
> automagically created if it doesn't exist yet. This ofcourse means the
> filesystem underneath has to be writable, which for / means not only does
> -.mount need to be started but also systemd-remount-fs.service has to be run,
> which isn't guaranteed by the default automount dependencies.
>
> For .mount units there is an automatic default After= dependency on
> local-fs-pre.target, would probably make sense to do the same for automount
> units to avoid it failing on the corner-case where it has to create directory.
Fixes #13306.
(cherry picked from commit
9432f882a53e7152a75007fd7f001f9a74f2a0d7)
Franck Bui [Tue, 24 Sep 2019 16:54:15 +0000 (18:54 +0200)]
shared/install: failing with -ELOOP can be due to the use of an alias in install_error()
-ELOOP can happen also when enabling an alias name (which is admittedly useless
since the unit it belongs to was already enabled) so let's mention this
possibility when reporting the corresponding error.
(cherry picked from commit
22683674716fd0e5b016ce5a7d8fd90df5f9f9e7)
Franck Bui [Tue, 24 Sep 2019 16:33:54 +0000 (18:33 +0200)]
shared/install: fix error codes returned by install_context_apply()
(cherry picked from commit
56a4ce2417ff74f82a48e3a5c6e36edad8d4bc6c)
Franck Bui [Tue, 24 Sep 2019 07:16:49 +0000 (09:16 +0200)]
man: alias names can't be used with enable command
(cherry picked from commit
faf205de3ba9a11b0ba17682123d7f3fedc7da24)
Dan Streetman [Wed, 23 Oct 2019 18:47:59 +0000 (14:47 -0400)]
resolved: set stream type during DnsStream creation
The DnsStreamType was added to track different types of DNS TCP streams,
instead of refcounting all of them together. However, the stream type was
not actually set into the stream->type field, so while the reference count
was correctly incremented per-stream-type, the reference count was always
decremented in the cleanup function for stream type 0, leading to
underflow for the type 0 stream (unsigned) refcount, and preventing new
type 0 streams from being created.
Since type 0 is DNS_STREAM_LOOKUP, which is used to communicate with
upstream nameservers, once the refcount underflows the stub resolver
no longer is able to successfully fall back to TCP upstream lookups
for any truncated UDP packets.
This was found because lookups of A records with a large number of
addresses, too much to fit into a single 512 byte DNS UDP reply,
were causing getaddrinfo() to fall back to TCP and trigger this bug,
which then caused the TCP fallback for later large record lookups
to fail with 'connection timed out; no servers could be reached'.
The stream type was introduced in commit:
652ba568c6624bf40d735645f029d83d21bdeaa6
(cherry picked from commit
1c089741d3b56ab096c5c401089f68b293b5fa38)
Zbigniew Jędrzejewski-Szmek [Wed, 23 Oct 2019 15:49:03 +0000 (17:49 +0200)]
sd-device: allow sd_device_get_devtype to be called with NULL arg and do not assert
We shouldn't call assert() on user-specified arguments in public functions.
While at it, let's return 1 if the type exists, and 0 otherwise.
(cherry picked from commit
730b76bd2cd5f0866baa738ae283e3b62544a28f)
Zbigniew Jędrzejewski-Szmek [Wed, 23 Oct 2019 20:56:24 +0000 (22:56 +0200)]
Remove unused plymouth_running() function
(cherry picked from commit
8a2c82ac882f4adfb0f7bdc039c84e880ddd689a)
Chen Qi [Thu, 24 Oct 2019 09:40:05 +0000 (17:40 +0800)]
machine-id-setup: avoid unexpected aborting
Code should not be reached 'Unhandled option' at src/machine-id-setup/machine-id-setup-main.c:97, function parse_argv(). Aborting.
Aborted
This behaviour is not good and will confuse user.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
(cherry picked from commit
4a434023d2380ef04492ae3ca41781738ba4d133)
Zbigniew Jędrzejewski-Szmek [Thu, 24 Oct 2019 07:15:29 +0000 (09:15 +0200)]
test-socket-util: avoid writing past the defined buffer
.sun_path has 108 bytes, and we'd write a string of 108 bytes + NUL.
I added this test, but I don't know what it was supposed to test. Let's
just remove.
Fixes #13713. CID#
1405854.
(cherry picked from commit
58ce85f6a17b6db03265e6a974120b18d1c0855a)
Yu Watanabe [Thu, 24 Oct 2019 02:08:48 +0000 (11:08 +0900)]
test: drop duplicated 's'
This fixes the following log message
```
Container TEST-07-ISSUE-1981 terminated by signal KILL.
E: test timed out after 30s s
```
(cherry picked from commit
235ecb6d75f00384b3f42f449c769340e13fbd0b)
Zbigniew Jędrzejewski-Szmek [Wed, 23 Oct 2019 07:20:46 +0000 (09:20 +0200)]
nspawn: fix handling of --console=help
We shouldn't continue to run the container after printing help.
(cherry picked from commit
dce66ffedbd4e72c2a1a35a55dc26c0e1029e8e3)
Zbigniew Jędrzejewski-Szmek [Mon, 21 Oct 2019 14:26:42 +0000 (16:26 +0200)]
Revert "sysusers: properly mark generated accounts as locked"
This reverts the gist of commit
636e72bce63e7e99b76357f7d524d16f61558775.
The comment and the tiny cleanup are left alone.
We shouldn't lock the accounts because people actually need to use them, and
if they are locked, various tools will refuse.
See https://github.com/systemd/systemd/pull/13277#issuecomment-
529964578
and follow-up comments.
(cherry picked from commit
12c829376a95ee0a734b8dbd347042062516f0a9)
Marko Myllynen [Mon, 21 Oct 2019 18:58:51 +0000 (21:58 +0300)]
Remove unprintable non-ASCII char from special glyph ASCII fallback table
(cherry picked from commit
de52000695e7992222e182d1ada3444aed78e86b)
Zbigniew Jędrzejewski-Szmek [Mon, 21 Oct 2019 13:07:36 +0000 (15:07 +0200)]
logind: fix emission of PropertiesChanged for users
The same as parent commit, but users. This is the third and last
foo_object_find() function in logind, so I think that this particular
family of bugs is finally squashed.
(cherry picked from commit
8163b9f90079af298031dcbffee057fc344470a3)
Zbigniew Jędrzejewski-Szmek [Mon, 21 Oct 2019 13:05:58 +0000 (15:05 +0200)]
logind: fix emission of PropertiesChanged on seats
The story is the same as in
471cffcfb0e005b7c4044b3b52cc4f25d217efac:
device_attach() → seat_send_changed() → sd_bus_emit_properties_changed_strv()
→ emit_properties_changed_on_interface() → node_vtable_get_userdata()
→ seat_object_find(), which returns 0 because message == NULL.
But when we are emitting a signal, message is always NULL. Removing the
overeager check and assert in the called function allow the signal to be
emitted.
Fixes #13769.
(cherry picked from commit
8cc64c2a3640121745fdfaccc6eae896ac25a911)
Peter Wu [Sun, 20 Oct 2019 17:10:31 +0000 (18:10 +0100)]
resolved: fix connection failures with TLS 1.3 and GnuTLS
Prefer TLS 1.3 before TLS 1.2 for DNS-over-TLS support, otherwise
servers compliant with RFC 8446 might end up agreeing TLS 1.2 plus a
downgrade signal which is not expected by GnuTLS clients. This manifests
in the following error:
Failed to invoke gnutls_handshake: An illegal parameter has been received.
Fixes: #13528
Fixes:
v242-962-g9c0624dcdb ("resolved: support TLS 1.3 when using GnuTLS for DNS-over-TLS")
(cherry picked from commit
68805580209cfaa50b2400d1a2e6c66500001395)
Zbigniew Jędrzejewski-Szmek [Thu, 17 Oct 2019 10:37:12 +0000 (12:37 +0200)]
udev: tag any display devices as master-of-seat when nomodeset is used
Fixes #13773. See also https://bugzilla.redhat.com/show_bug.cgi?id=
1728240,
https://github.com/sddm/sddm/issues/1204.
When nomodeset is used on the kernel command line, there is no graphics
device that the kernel knows, so we don't tag anything as master-of-seat,
and seat0 has CanGraphical=no.
$ loginctl seat-status seat0 ; loginctl show-seat seat0
seat0
Devices:
├─/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
│ input:input0 "Power Button"
├─/sys/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb1
│ usb:usb1
│ └─/sys/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb1/1-1/1-1:1.0/0003:0627:0001.0001/input/input4
│ input:input4 "QEMU QEMU USB Tablet"
├─/sys/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb2
│ usb:usb2
├─/sys/devices/pci0000:00/0000:00:1b.0/sound/card0
│ sound:card0 "Intel"
├─/sys/devices/platform/i8042/serio0/input/input1
│ input:input1 "AT Translated Set 2 keyboard"
│ ├─/sys/devices/platform/i8042/serio0/input/input1/input1::capslock
│ │ leds:input1::capslock
│ ├─/sys/devices/platform/i8042/serio0/input/input1/input1::numlock
│ │ leds:input1::numlock
│ └─/sys/devices/platform/i8042/serio0/input/input1/input1::scrolllock
│ leds:input1::scrolllock
└─/sys/devices/platform/i8042/serio1/input/input3
input:input3 "ImExPS/2 Generic Explorer Mouse"
Id=seat0
CanMultiSession=yes
CanTTY=yes
CanGraphical=no
Sessions=
IdleHint=yes
IdleSinceHint=0
IdleSinceHintMonotonic=0
Let's tag the PCI device with "master-of-seat", so we get CanGraphical=yes, and "seat",
so it is show as part of the seat:
[fedora@f31-bios ~]$ loginctl seat-status seat0 ; loginctl show-seat seat0
seat0
Devices:
├─/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
│ input:input0 "Power Button"
├─/sys/devices/pci0000:00/0000:00:01.0
│ [MASTER] pci:0000:00:01.0
├─/sys/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb1
│ usb:usb1
│ └─/sys/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb1/1-1/1-1:1.0/0003:0627:0001.0001/input/input4
│ input:input4 "QEMU QEMU USB Tablet"
├─/sys/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb2
│ usb:usb2
├─/sys/devices/pci0000:00/0000:00:1b.0/sound/card0
│ sound:card0 "Intel"
├─/sys/devices/platform/i8042/serio0/input/input1
│ input:input1 "AT Translated Set 2 keyboard"
│ ├─/sys/devices/platform/i8042/serio0/input/input1/input1::capslock
│ │ leds:input1::capslock
│ ├─/sys/devices/platform/i8042/serio0/input/input1/input1::numlock
│ │ leds:input1::numlock
│ └─/sys/devices/platform/i8042/serio0/input/input1/input1::scrolllock
│ leds:input1::scrolllock
└─/sys/devices/platform/i8042/serio1/input/input3
input:input3 "ImExPS/2 Generic Explorer Mouse"
Id=seat0
CanMultiSession=yes
CanTTY=yes
CanGraphical=yes
Sessions=
IdleHint=yes
IdleSinceHint=0
IdleSinceHintMonotonic=0
(cherry picked from commit
0325f71926b0bfad24d998335ce533b0554db7f0)
Benjamin Bouvier [Tue, 1 Oct 2019 09:12:10 +0000 (12:12 +0300)]
systemd-fsck: fix systemd-fsck/fsck pipe bad closure
Currently, when console is disabled but progress is tracked, pipe opened
for communication between systemd-fsck and fsck may be closed
inadvertently (when opening of /dev/console return in error). That lead
to finish fsck prematurely (because it receives a SIGPIPE) and so fsck
may not check correctly filesystems and do not have time to fix memory
corruptions.
This commit changes the opening of /dev/console to be done previously to
pipe creation and so fix the bug described just above.
(cherry picked from commit
e4fc74554773969ab208427c8489bd21af4195db)
Jonas Jelten [Thu, 17 Oct 2019 10:10:13 +0000 (12:10 +0200)]
ceph is a network filesystem
(cherry picked from commit
c4742de6d801b125abf3c4d1c710280f51d7c701)
Luca Boccassi [Fri, 4 Oct 2019 13:45:41 +0000 (14:45 +0100)]
portabled: allow to detach an image with a unit in linked-runtime state
This is necessary when a directory was attached with
--copy=symlink, otherwise detach will always fail.
Fixed #13725
(cherry picked from commit
c3d809ef72db616391a1a2b738eae137f9024e3f)
Yu Watanabe [Sun, 13 Oct 2019 17:00:47 +0000 (02:00 +0900)]
network: ndisc: do not drop all prefixes when a prefix matches a blacklist
Fixes #13767.
(cherry picked from commit
55d3fdcf5e9f6ceb9fc1a5f93120305f20abf690)
Yu Watanabe [Sat, 12 Oct 2019 15:54:34 +0000 (00:54 +0900)]
systemctl: fix memleak caused by wrong cleanup func
(cherry picked from commit
13f697b7b1f3837d144ba6f60188bc7dc4d1fbaa)
Yu Watanabe [Sat, 12 Oct 2019 15:35:49 +0000 (00:35 +0900)]
udev: fix memleak caused by wrong cleanup function
Fixes #13764.
(cherry picked from commit
f4f6f2c7400b1a525d7c0c57b12f76f9dfdc4f0d)
Zbigniew Jędrzejewski-Szmek [Tue, 8 Oct 2019 12:44:35 +0000 (14:44 +0200)]
parse_hwdb: fix compatibility with pyparsing 2.4.*
pyparsing 2.3.1/2.4.0 had some changes to grouping of And matches, and as a
result we'd report 0 properties and 0 matches, and not really do any checks.
With this change we get identical behaviour for pyparsing 2.3.1, 2.4.0, 2.4.2:
$ hwdb/parse_hwdb.py
hwdb/60-evdev.hwdb: 72 match groups, 94 matches, 262 properties
hwdb/60-input-id.hwdb: 3 match groups, 3 matches, 4 properties
hwdb/60-keyboard.hwdb: 173 match groups, 256 matches, 872 properties
Keycode KBD_LCD_MENU1 unknown
Keycode KBD_LCD_MENU4 unknown
Keycode KBD_LCD_MENU2 unknown
Keycode KBD_LCD_MENU3 unknown
hwdb/60-sensor.hwdb: 101 match groups, 120 matches, 105 properties
hwdb/70-joystick.hwdb: 2 match groups, 3 matches, 2 properties
hwdb/70-mouse.hwdb: 104 match groups, 119 matches, 123 properties
hwdb/70-pointingstick.hwdb: 8 match groups, 30 matches, 11 properties
hwdb/70-touchpad.hwdb: 6 match groups, 9 matches, 6 properties
(cherry picked from commit
2382a2e32b6076fa4603c958f84b46d5a5b13dfa)
Zbigniew Jędrzejewski-Szmek [Tue, 8 Oct 2019 12:22:17 +0000 (14:22 +0200)]
parse_hwdb: process files in order
Also, make the pattern more general. There are some plans to add more files
there, let's make sure we don't miss them.
(cherry picked from commit
b32ae3aa7b63bad3cd9d412701d66c5cd8499160)
Balint Reczey [Tue, 8 Oct 2019 14:41:24 +0000 (16:41 +0200)]
test: Pass personality test even when i686 userland runs on x86_64 kernel
(cherry picked from commit
bd89d03544d2b8ea53af7af0a97d4d121ef048c4)
Zbigniew Jędrzejewski-Szmek [Sun, 6 Oct 2019 17:05:57 +0000 (19:05 +0200)]
docs: fix inadvertent change in uid range
https://github.com/systemd/systemd/commit/
a305eda35f18fbacc771cc1582b688d60890a9d2#r35378755
(cherry picked from commit
581004bd336567d936e94e616d35679da8ce32a0)
Mike Kazantsev [Thu, 3 Oct 2019 13:11:41 +0000 (18:11 +0500)]
cgroup: fix typo in BPF firewall support warning message
(cherry picked from commit
fc103b3e342429637527d3042bf7bdf15c12624d)
Norbert Lange [Thu, 19 Sep 2019 15:49:20 +0000 (17:49 +0200)]
fix build with compilers with default stack-protector enabled
building systemd fails with a compiler that supports
-fstack-protector but does not enable it by default.
(will miss several __stack_chk_* symbols).
fix this by also adding the switch during linking.
Signed-off-by: Norbert Lange <nolange79@gmail.com>
(cherry picked from commit
68e70ac2b27dcb5007fc4009553472f0b9700e66)
Nicolas Douma [Tue, 17 Sep 2019 03:07:00 +0000 (05:07 +0200)]
nspawn: surrender controlling terminal to PID2 when using the PID1 stub
(cherry picked from commit
de1b29f375b13b0566814517bf81e3cdbdd9a610)
Franck Bui [Wed, 2 Oct 2019 09:58:16 +0000 (11:58 +0200)]
pid1: fix DefaultTasksMax initialization
Otherwise DefaultTasksMax is always set to "inifinity".
This was broken by
fb39af4ce42.
(cherry picked from commit
c0000de87d2c7934cb1f4ba66a533a85277600ff)
Dan Streetman [Sun, 29 Sep 2019 21:16:55 +0000 (17:16 -0400)]
src/core/automount: use DirectoryMode when calling mkdir -p
mkdir -p is called both when setting up the autofs mount, as well
as after being notified that the real mount unit should be called.
However the first mkdir -p is hardcoded with 0555, while the second
uses the value specified to DirectoryMode in the automount unit; the
second mkdir -p is only needed when called from coldplug, so under
normal operation the dirs are incorrectly created with mode 0555.
This replaces the hardcoded 0555 mode with the value of DirectoryMode.
Closes #13683.
(cherry picked from commit
8084dcb9d759e93669127f200bf5ca755432b96e)
Yu Watanabe [Thu, 26 Sep 2019 12:33:59 +0000 (21:33 +0900)]
udevadm trigger: do not propagate EACCES and ENODEV
Inside container, writing file returns EACCESS. Moreover, some devices
return ENODEV rather than EACCES. So, let's also ignore these two
error causes.
Closes #13652.
(cherry picked from commit
67acde4869a9505f9721e31fa5167c82445e0e12)
Jonas Thelemann [Wed, 2 Oct 2019 00:42:58 +0000 (02:42 +0200)]
hwdb: Correct WWWW Pattern In Documentation Comment
(cherry picked from commit
56783ddf228c406522af5e53910d095fa2572540)
Zbigniew Jędrzejewski-Szmek [Fri, 27 Sep 2019 11:58:06 +0000 (13:58 +0200)]
nspawn: consistenly fail if parsing the environment fails
We would parse the environment twice (to re-apply settings after reading
config from disk), but we would not check the return code first time.
This means that for some settings we would ignore invalid values, while
for others, we'd fail at some point.
Let's just consistently fail. Those environment variables define important
aspects of behaviour, and it is better for the user if we ignore invalid
values. (Unknown settings are still ignored, so forward compatibility is
maintained.)
(cherry picked from commit
490486842b6521104b594c511ca912504f61a8f3)
Zbigniew Jędrzejewski-Szmek [Fri, 27 Sep 2019 12:51:53 +0000 (14:51 +0200)]
nspawn: default to unified hierarchy if --as-pid2 is used
See comment added in the patch.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=
1756143.
(cherry picked from commit
75b0d8b89d6e86319e75eaead3f4b0d187a66729)
Chris Down [Mon, 30 Sep 2019 17:36:13 +0000 (18:36 +0100)]
cgroup: Mark memory protections as explicitly set in transient units
A later version of the DefaultMemory{Low,Min} patch changed these to
require explicitly setting memory_foo_set, but we only set that in
load-fragment, not dbus-cgroup.
Without these, we may fall back to either DefaultMemoryFoo or
CGROUP_LIMIT_MIN when we really shouldn't.
(cherry picked from commit
184e989d7da4648bd36511ffa28a9f2b469589d1)
Chris Down [Mon, 30 Sep 2019 17:25:09 +0000 (18:25 +0100)]
cgroup: Respect DefaultMemoryMin when setting memory.min
This is an oversight from https://github.com/systemd/systemd/pull/12332.
Sadly the tests didn't catch it since it requires a real cgroup
hierarchy to see, and it wasn't seen in prod since we're only currently
using DefaultMemoryLow, not DefaultMemoryMin. :-(
(cherry picked from commit
64fe532e90b3e99bf7821ded8a1107c239099e40)
Chris Down [Mon, 30 Sep 2019 17:24:26 +0000 (18:24 +0100)]
cgroup: Check ancestor memory min for unified memory config
Otherwise we might not enable it when we should, ie. DefaultMemoryMin is
set in a parent, but not MemoryMin in the current unit.
(cherry picked from commit
7c9d2b79935d413389a603918a711df75acd3f48)
Chris Down [Mon, 30 Sep 2019 13:25:14 +0000 (14:25 +0100)]
cgroup: docs: memory.high doc fixups
The docs just tautologically call this the "high limit". Just call it
throttling as we do in cgroup-v2.rst.
(cherry picked from commit
ba79e19cb299623c9c0dd4c6a1ae80f795409b04)
Chris Down [Mon, 30 Sep 2019 13:23:32 +0000 (14:23 +0100)]
cgroup: docs: Mention unbounded protection for memory.{low,min}
I got asked why Memory{Low,Min} don't allow "infinity". They do, but the
docs don't say that like they already do for Memory{High,Max}.
(cherry picked from commit
b62087d4d06777ccde9eb9e7a97abc7b8945d5f5)
Kenneth D'souza [Mon, 30 Sep 2019 10:31:21 +0000 (16:01 +0530)]
Consider smb3 as remote filesystem
Currently systemd will treat smb3 as local filesystem and cause
can't boot failures. Add smb3 to the list of remote filesystems
to fix this issue.
Signed-off-by: Kenneth D'souza <kdsouza@redhat.com>
(cherry picked from commit
ff7d6a740b0c6fa3be63d3908a0858730a0837c5)
Michael Olbrich [Sun, 29 Sep 2019 11:43:00 +0000 (13:43 +0200)]
Handle d_type == DT_UNKNOWN correctly
As documented in the man-page, readdir() may return a directory entry with
d_type == DT_UNKNOWN. This must be handled for regular filesystems.
dirent_ensure_type() is available to set d_type if necessary. Use it in
some more places.
Without this systemd will fail to boot correctly with nfsroot and some
other filesystems.
Closes #13609
(cherry picked from commit
28e68bb23547cbc11cd3f62a1a38dbe2b387b370)
Chris Down [Wed, 25 Sep 2019 16:09:38 +0000 (17:09 +0100)]
util-lib: Don't propagate EACCES from find_binary PATH lookup to caller
On one of my test machines, test-path-util was failing because the
find_binary("xxxx-xxxx") was returning -EACCES instead of -ENOENT. This
happens because the PATH entry on that host contains a directory which
the user in question doesn't have access to. Typically applications
ignore permission errors when searching through PATH, for example in
bash:
$ whoami
cdown
$ PATH=/root:/bin type sh
sh is /bin/sh
This behaviour is present on zsh and other shells as well, though. This
patch brings our PATH search behaviour closer to other major Unix tools.
(cherry picked from commit
4e1ddb661272ddb2f03d6046369c973657dfdd62)
Yu Watanabe [Wed, 25 Sep 2019 15:21:00 +0000 (00:21 +0900)]
network: drop noisy log message
Closes #13595.
(cherry picked from commit
55a1729fd095f2e0733247e7b4911cf41bf6b2ed)
cbzxt [Wed, 25 Sep 2019 15:02:46 +0000 (20:32 +0530)]
Updated log message when the timesync happens for the first time (#13624)
(cherry picked from commit
37afb0ac787783a1635165b8a4e3ba5fbd007dfd)
Zbigniew Jędrzejewski-Szmek [Wed, 18 Sep 2019 10:01:41 +0000 (12:01 +0200)]
units: make systemd-binfmt.service easier to work with no autofs
See https://bugzilla.redhat.com/show_bug.cgi?id=
1731772:
when autofs4 is disabled in the kernel,
proc-sys-fs-binfmt_misc.automount is not started, so the binfmt_misc module is
never loaded. If we added a dependency on proc-sys-fs-binfmt_misc.mount
to systemd-binfmt.service, things would work even if autofs4 was disabled, but
we would unconditionally pull in the module and mount, which we don't want to do.
(Right now we ony load the module if some binfmt is configured.)
But let's make it easier to handle this case by doing two changes:
1. order systemd-binfmt.service after the .mount unit (so that the .service
can count on the mount if both units are pulled in, even if .automount
is skipped)
2. add [Install] section to the service unit. This way the user can do
'systemctl enable proc-sys-fs-binfmt_misc.mount' to get the appropriate behaviour.
(cherry picked from commit
508133917d9628f8c0adc5db34d595196b72b1c8)
Steve Traylen [Tue, 24 Sep 2019 07:48:03 +0000 (09:48 +0200)]
Corect man page reference in systemd-nologin.conf comments
The reference to the man page of `systemd-user-sessions.service`
in the comments of `tmpfiles.d/systemd-nologin.conf` is corrected.
(cherry picked from commit
7a72a95741970fa4919f137f6844fe11b951efd3)
Philip Withnall [Tue, 24 Sep 2019 15:07:23 +0000 (16:07 +0100)]
man: Add a missing space in machinectl(1)
Signed-off-by: Philip Withnall <withnall@endlessm.com>
(cherry picked from commit
abdc57dfe149bfba79af094fd623eb9929eff5e3)
Filipe Brandenburger [Tue, 24 Sep 2019 22:31:27 +0000 (15:31 -0700)]
log: Add missing "%" in "%m" log format strings
These were clearly intended to be "%m" to display the human readable version
of the error stored in errno.
(cherry picked from commit
28b77ab246b88d05076080bbd69ca3c353fa0f27)
Zbigniew Jędrzejewski-Szmek [Wed, 18 Sep 2019 15:52:30 +0000 (17:52 +0200)]
pid1: do not warn if /run/systemd/relabel-extra.d/ doesn't exist
After all, that is the expected state.
(cherry picked from commit
90b059b608d6c53c8efb23b8791190dffadd1a17)
Michael Biebl [Sat, 21 Sep 2019 15:06:25 +0000 (17:06 +0200)]
man: fix typo
(cherry picked from commit
decef551afaff9fb72f3cde499c9c1bcd23e5874)
Yu Watanabe [Wed, 18 Sep 2019 13:14:45 +0000 (22:14 +0900)]
dhcp6: use unaligned_read_be32()
Closes #13591.
(cherry picked from commit
0eb5e6d3f08c6b3a41cfa7ac02bcc6302259ed4a)
Yu Watanabe [Tue, 17 Sep 2019 13:18:49 +0000 (22:18 +0900)]
dhcp6: add missing option length check
Closes #13578.
(cherry picked from commit
6ffe71d0e22326f8ea5775c188ae0e13573cd123)
Yu Watanabe [Fri, 6 Sep 2019 18:36:19 +0000 (03:36 +0900)]
ndisc: make first solicit delayed randomly
Closes #13460.
(cherry picked from commit
9973e6c43abb9d3d73fcfee83c886dbd32e700ca)
Yu Watanabe [Fri, 6 Sep 2019 18:29:46 +0000 (03:29 +0900)]
dhcp6: read OPTION_INFORMATION_REFRESH_TIME option
Fixes #13460.
(cherry picked from commit
fcb51238e0523d64a698b8738a15bbc1aea9febe)
AsciiWolf [Thu, 19 Sep 2019 13:36:42 +0000 (15:36 +0200)]
l10n: update Czech Translation
(cherry picked from commit
1697a28567628ba0c2cb69ab36a7c80e66c01aa0)
Georg Müller [Fri, 20 Sep 2019 08:23:45 +0000 (10:23 +0200)]
sd-radv: if lifetime < SD_RADV_DEFAULT_MAX_TIMEOUT_USEC, adjust timeout (#13491)
The RFC states that lifetime (AdvDefaultLifetime) must be at least
MaxRtrAdvInterval (which more or less corresponds to SD_RADV_DEFAULT_MAX_TIMEOUT_USEC
in systemd).
To fulfill this limit, virtually lower MaxRtrAdvInterval and MinRtrAdvInterval
accordingly.
Also check that min is not lower than 3s and max is not lower than 4s.
(cherry picked from commit
ef90b6a4fb9509f61b9b917bbe4db7343afe1853)
AsciiWolf [Thu, 19 Sep 2019 12:34:31 +0000 (14:34 +0200)]
polkit: fix typo
(cherry picked from commit
984b96aa7a793f74747b0349f0ed68e992ae17b2)
Yu Watanabe [Sun, 15 Sep 2019 13:50:36 +0000 (22:50 +0900)]
sd-netlink: fix invalid assertion
It is natural that n_attiributes is less than type. But in that case,
the message does not contain any message about the type. So, we should
not abort execution with assertion, but just return -ENODATA.
(cherry picked from commit
48fb0d1301c78112360df943f2b6ebeb545b8510)
Yu Watanabe [Tue, 17 Sep 2019 12:34:06 +0000 (21:34 +0900)]
network: do not enter failed state if device's sysfs entry does not exist yet
(cherry picked from commit
4d59e14f321d50cbdec1a2ef702e2d258e377356)
Yu Watanabe [Tue, 17 Sep 2019 12:29:23 +0000 (21:29 +0900)]
network: add missing link->network checks
When the function is called, no network file may be assigned to the
link.
(cherry picked from commit
b1b0b42e48303134731e017a108c6c334ef5f4c8)
Michal Sekletar [Mon, 9 Sep 2019 12:38:35 +0000 (14:38 +0200)]
path: stop watching path specs once we triggered the target unit
We start watching them again once we get a notification that triggered
unit entered inactive or failed state.
Fixes: #10503
(cherry picked from commit
8fca6944c2ee20c63d62154c8badddc77170b176)
matthiasroos [Mon, 16 Sep 2019 19:10:15 +0000 (21:10 +0200)]
hwdb: add Medion Akoya E2292 (#13498)
Fixes #13480.
(cherry picked from commit
358e50fa7fab98509f2ef96cd8d6d7d1af6ed59a)
Rafael Fontenelle [Sun, 8 Sep 2019 22:08:14 +0000 (19:08 -0300)]
po: update Brazilian Portuguese translation
(cherry picked from commit
bf55a2df4da0234932c0949801579a9a9dca72bc)
Piotr Drąg [Sat, 14 Sep 2019 10:44:57 +0000 (12:44 +0200)]
po: update Polish translation
(cherry picked from commit
9870c55ef5df8f079cd972b409ec59414869a256)
Zbigniew Jędrzejewski-Szmek [Sun, 8 Sep 2019 14:13:15 +0000 (16:13 +0200)]
polkit: change "revert settings" to "reset settings"
"reset" is more understandable. The verb is "revert", but it might actually be
better to have a description which uses different words instead of duplicating
the name of the command.
https://github.com/systemd/systemd/commit/
379158684abd981cc760342aad61b1c813b71eb2#commitcomment-
34992552
(cherry picked from commit
ea2552639b22004c89df26f2374e3d3f1d2acace)
Zbigniew Jędrzejewski-Szmek [Thu, 12 Sep 2019 09:15:35 +0000 (11:15 +0200)]
man: fix description of ARPIntervalSec= units
https://bugzilla.redhat.com/show_bug.cgi?id=
1751363
(cherry picked from commit
06c52cc2b7c6cf2729e130f2a23c5a7ce62e27b9)
baybal [Wed, 11 Sep 2019 02:08:59 +0000 (08:08 +0600)]
hwdb: axis override for Dell 9360 touchpad
and possibly other XPS models sharing the touchpad (#13472)
(cherry picked from commit
26fe3af8ae7d52847eb3f2267eaa3df3af90d811)
Frantisek Sumsal [Sat, 10 Aug 2019 14:05:07 +0000 (16:05 +0200)]
test: drop the missed || exit 1 expression
...as we've already done in the rest of the testsuite, see
cc469c3dfc398210f38f819d367e68646c71d8da
(cherry picked from commit
67c434b03f8a24f5350f017dfb4b2464406046db)
Yu Watanabe [Tue, 17 Sep 2019 16:28:23 +0000 (01:28 +0900)]
udevadm: use usec_add()
Also fixes description of event source.
(cherry picked from commit
f6e8ba816577a1a26037a8aeae23fda36d74f0ac)
Yu Watanabe [Tue, 17 Sep 2019 15:52:07 +0000 (00:52 +0900)]
udevadm: missing initialization of descriptor
(cherry picked from commit
2f5b282aab78bd2378df428c57c5fd1cc09e9f4f)
Zbigniew Jędrzejewski-Szmek [Tue, 17 Sep 2019 17:27:58 +0000 (19:27 +0200)]
networkd: unbreak routing_policy_rule_compare_func()
!r is the same r == 0, so this was short-circuiting the comparison when
streq(a->iff, b->iff) or streq(a->off, b->off). Before the parent commit which
moved those comparisons to the end, this was short-circuiting quite a bit
of the comparison function.
(cherry picked from commit
314ed4f9948bb73300862935546a63294bba1d5c)
ypf791 [Fri, 19 Jul 2019 10:28:04 +0000 (18:28 +0800)]
core: coldplug possible nop_job
(cherry picked from commit
b49e14d5f3081dfcd363d8199a14c0924ae9152f)
Franck Bui [Mon, 16 Sep 2019 20:03:43 +0000 (22:03 +0200)]
tty-ask-pwd-agent: fix message forwarded to wall(1)
Commit
a1c111c2d12429d2 wrongly replaced '!' with ':' when the message is
forwarded to wall(1).
Indeed in this case we are not requesting the user for providing a password but
instead we are simply displaying a message to suggest starting
tty-ask-password-agent for providing the password.
(cherry picked from commit
65943cc3507bf54390d598e06df60771e913fb72)
Maciej Stanczew [Mon, 16 Sep 2019 00:09:35 +0000 (02:09 +0200)]
core: Fix setting StatusUnitFormat from config files
(cherry picked from commit
6327aa9f6c5701e44541e685c6bf44d3a8c40f50)
Susant Sahani [Mon, 16 Sep 2019 18:46:39 +0000 (20:46 +0200)]
network DHCP4: Dont mislead the logs.
The debug log making sense to the end user as an error.
(cherry picked from commit
61cda4d7964ff00dfa6260f84219720d9b97671a)
Donald A. Cupp Jr [Thu, 5 Sep 2019 22:03:54 +0000 (15:03 -0700)]
Update m4 for selective utmp support.
modified: tmpfiles.d/systemd.conf.m4
(cherry picked from commit
d34a58222de4c2ee93c68411b4f9042f08e5132f)
Franck Bui [Thu, 5 Sep 2019 14:53:50 +0000 (16:53 +0200)]
core: restore initialization of u->source_mtime
During the rework of unit file loading, commit
e8630e695232bdfc dropped the
initialization u->source_mtime. This had the bad side effect that generated
units always needed daemon reloading.
(cherry picked from commit
5a1c1b534fe13e60ef9bce0dc680ad6f2a0c577f)
Benjamin Gilbert [Wed, 11 Sep 2019 03:23:59 +0000 (23:23 -0400)]
mount-setup: relabel items mentioned directly in relabel-extra.d
relabel_extra() relabels the descendants of directories listed in
relabel-extra.d, but doesn't relabel the files or directories
explicitly named there. This makes it impossible to use
relabel-extra.d to relabel the root of a filesystem. Fix by
relabeling the named items too.
(cherry picked from commit
71de68476c1897b8624538ce32218891251fa5f6)