Susant Sahani [Sat, 30 May 2020 04:35:28 +0000 (06:35 +0200)]
network: L2TP fix crash
```
=220358== Invalid read of size 8
==220358== at 0x452F05: l2tp_session_free (l2tp-tunnel.c:46)
==220358== by 0x456926: l2tp_tunnel_done (l2tp-tunnel.c:725)
==220358== by 0x43CF4D: netdev_free (netdev.c:205)
==220358== by 0x43D045: netdev_unref (netdev.c:210)
==220358== by 0x4198B7: manager_free (networkd-manager.c:1877)
==220358== by 0x40D0B3: manager_freep (networkd-manager.h:105)
==220358== by 0x40DE1C: run (networkd.c:21)
==220358== by 0x40DE75: main (networkd.c:130)
==220358== Address 0x5c035d0 is 0 bytes inside a block of size 40 free'd
==220358== at 0x483A9F5: free (vg_replace_malloc.c:538)
==220358== by 0x452F87: l2tp_session_free (l2tp-tunnel.c:57)
==220358== by 0x456857: netdev_l2tp_tunnel_verify (l2tp-tunnel.c:710)
==220358== by 0x440947: netdev_load_one (netdev.c:738)
==220358== by 0x441222: netdev_load (netdev.c:851)
==220358== by 0x419C50: manager_load_config (networkd-manager.c:1934)
==220358== by 0x40D7BE: run (networkd.c:87)
==220358== by 0x40DE75: main (networkd.c:130)
==220358== Block was alloc'd at
==220358== at 0x4839809: malloc (vg_replace_malloc.c:307)
==220358== by 0x452A76: malloc_multiply (alloc-util.h:96)
==220358== by 0x4531E6: l2tp_session_new_static (l2tp-tunnel.c:82)
==220358== by 0x455C01: config_parse_l2tp_session_id (l2tp-tunnel.c:535)
==220358== by 0x48E6D72: next_assignment (conf-parser.c:133)
==220358== by 0x48E77A3: parse_line (conf-parser.c:271)
==220358== by 0x48E7E4F: config_parse (conf-parser.c:396)
==220358== by 0x48E80E5: config_parse_many_files (conf-parser.c:453)
==220358== by 0x48E8490: config_parse_many (conf-parser.c:512)
==220358== by 0x44089C: netdev_load_one (netdev.c:729)
==220358== by 0x441222: netdev_load (netdev.c:851)
==220358== by 0x419C50: manager_load_config (networkd-manager.c:1934)
```
(cherry picked from commit
a1422af564e3b1128fc7754596b4c2f8b36a4620)
Michael Gubbels [Fri, 29 May 2020 23:40:39 +0000 (16:40 -0700)]
Lennart Poettering [Fri, 29 May 2020 15:46:40 +0000 (17:46 +0200)]
stat-util: trivial empty_or_null() tweaks
To small tweaks: /dev/null is definitely a char device. And if we have
the path, to a string base comparison first.
(cherry picked from commit
29da419305e6cc3c660172e7edcd2f423dc1108b)
sterlinghughes [Thu, 28 May 2020 20:54:27 +0000 (13:54 -0700)]
Check ambient set against bounding set prior to applying ambient set
Fixes #15020
(cherry picked from commit
8acb11a6a337601a6f307fb50d77b13ffa0b3c5e)
Lennart Poettering [Tue, 26 May 2020 16:58:15 +0000 (18:58 +0200)]
udev: when the BSD lock on a block device is taken, don't complain
if someone implements https://systemd.io/BLOCK_DEVICE_LOCKING/ then we
shouldn't loudly complain about that.
This reverts back to the original behaviour from
3ebdb81ef088afd3b4c72b516beb5610f8c93a0d: when the lock is taken we
silently skip processing the device and sending out the messages for it.
(cherry picked from commit
5abee64ed40039404d68414f0189245988635e6c)
Zbigniew Jędrzejewski-Szmek [Tue, 26 May 2020 14:07:30 +0000 (16:07 +0200)]
core: add forgotten return in error path
If we get an error here, this is most likely oom, and we should not continue.
(cherry picked from commit
1414090854829003c0d234042b218a3bd6f1cb0f)
Zbigniew Jędrzejewski-Szmek [Tue, 26 May 2020 19:08:10 +0000 (21:08 +0200)]
shared/efi-loader: remove check that uses absolute tick value
sd-boot uses rdtsc to set those timestamps. There is no guarantee that the tsc
has any particular absolute value.
On my VM:
$ head /sys/firmware/efi/efivars/LoaderTime*
==> /sys/firmware/efi/efivars/LoaderTimeExecUSec-
4a67b082-0a4c-41cf-b6c7-
440b29bb8c4f <==
4397904074
==> /sys/firmware/efi/efivars/LoaderTimeInitUSec-
4a67b082-0a4c-41cf-b6c7-
440b29bb8c4f <==
4396386839
==> /sys/firmware/efi/efivars/LoaderTimeMenuUSec-
4a67b082-0a4c-41cf-b6c7-
440b29bb8c4f <==
4396392521
$ build/test-boot-timestamps
...
LoaderTimeExecUSec=
4396386839 too large, refusing.
Failed to read EFI loader data: Input/output error
Assertion 'q >= 0' failed at src/test/test-boot-timestamps.c:84, function main(). Aborting.
(with patch)
$ build/test-boot-timestamps
...
EFI Loader: start=1h 13min 16.386s exit=1h 13min 17.904s duration=1.517s
Firmware began 1h 13min 17.904074s before kernel.
Loader began 1.517235s before kernel.
Firmware began Tue 2020-05-26 11:04:13 CEST.
Loader began Tue 2020-05-26 12:17:30 CEST.
Kernel began Tue 2020-05-26 12:17:31 CEST.
(cherry picked from commit
dde5c821bf33c085fcefb791bcb541510bb0e992)
Lennart Poettering [Tue, 26 May 2020 16:52:15 +0000 (18:52 +0200)]
gpt: include homed GPT partition type in well-known partition table
(cherry picked from commit
7b11770bae0653eb7c9c81f90ebc7324c25bf697)
Lennart Poettering [Tue, 26 May 2020 17:20:33 +0000 (19:20 +0200)]
units: don't set PrivateNetwork= in systemd-homed.service
We want to watch USB sticks being plugged in, and that requires
AF_NETLINK to work correctly and get the host's events. But if we live
in a network namespace AF_NETLINK is disconnected too and we'll not get
the host udev events.
Fixes: #15287
(cherry picked from commit
48432791accdcf775995781ddefd6027283f8a97)
Florian Klink [Sat, 23 Nov 2019 10:45:34 +0000 (11:45 +0100)]
resolved-dns-query: remove dns_query_candidate_is_routable
Resolved can't reliably determine on whether "it makes sense" to query
AAAA records when not explicitly specifying it in the request, so we
shouldn't remove them.
After having done the resolving, applications can use RFC6724 to
determine whether that address is reachable.
We can't know whether an address is reachable before having resolved it
and inspecting the routing table, and not resolving AAAA just because
there's no IPv6 default route on the main interface link them breaks
various setups, including IPv6-providing wireguard tunnels on a
non-dualstacked environment.
Fixes #5782
Fixes #5915
Fixes #8017
(cherry picked from commit
90bdc8be66765df09bbc355783cee7204a5ebb31)
Zbigniew Jędrzejewski-Szmek [Sun, 24 May 2020 17:06:12 +0000 (19:06 +0200)]
sd-network: fix inverted error message
We get -ENOMSG when there is no lease.
(cherry picked from commit
2206aa5c35a20f923b6b80294725085833b86ce3)
Zbigniew Jędrzejewski-Szmek [Thu, 21 May 2020 06:36:01 +0000 (08:36 +0200)]
network: allow empty assignment to PreferredLifetime=
Users might want to use that to unset a previous setting. The docs seem OK as
they are: we don't need to explictly mention the empty value, since it is
almost always allowed.
(cherry picked from commit
10b20e5a936e28de47b8c42fab8d73bce528fa8e)
codicodi [Thu, 21 May 2020 10:37:43 +0000 (12:37 +0200)]
Update resolvectl zsh completion
(cherry picked from commit
d0192e93f8fa80df7e7a09a7466066db6fce851b)
Jeremy Cline [Fri, 15 May 2020 20:28:35 +0000 (16:28 -0400)]
shared: treat generator units as vendor units
Units created with "systemctl edit --full" from generator units aren't
removed with "systemctl revert" because units in the generator,
generator_early, and generator_late paths aren't considered vendor
units.
Alter path_is_vendor() to return true if the given path is a
generator unit, which in turn causes "systemctl revert" to remove units
created with "systemctl edit --full" as they now have vendor versions.
Fixes #10053
(cherry picked from commit
efdbf5fe9c4222725899d0e1093a09c5d649ab68)
Zbigniew Jędrzejewski-Szmek [Wed, 20 May 2020 16:10:58 +0000 (18:10 +0200)]
tree-wide: fix bad errno checks
(cherry picked from commit
6b8664cb5b2577521e2d364153eb66649e558efb)
Zbigniew Jędrzejewski-Szmek [Wed, 20 May 2020 07:25:11 +0000 (09:25 +0200)]
bus-message: immediately reject messages with invalid type
For whatever reason, we were very permissive with accepting messages
of unknown type. Let's just reject any unknown types as early as
possible.
(cherry picked from commit
a2dd991d0fde59dc0574bd4d0c1438f01dc0b8ff)
Zbigniew Jędrzejewski-Szmek [Wed, 20 May 2020 07:05:17 +0000 (09:05 +0200)]
bus-message: fix negative offset with ~empty message
In the linked reproducer, m->fields_size == 0, and we calculate ri == -1, which
of course doesn't end well. Skip the whole calculation if m->fields_size == 0,
and also check that we don't go negative even if it is non-zero.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19446 and #15583.
(cherry picked from commit
e0c17a7d1bdd197dfb5e24ba527bd281f404f1a9)
ExtinctFire [Wed, 20 May 2020 08:39:09 +0000 (16:39 +0800)]
load-fragment: fix a typo
Correct the typo of “priority” in log message
(cherry picked from commit
929fed02df3f6eda17c5e7d1f21c5490520d9b6a)
Zbigniew Jędrzejewski-Szmek [Tue, 19 May 2020 14:21:52 +0000 (16:21 +0200)]
NEWS: retroactively document Family=
Requested in https://github.com/systemd/systemd/issues/13233#issuecomment-
630800112.
(cherry picked from commit
70fcda8562b6a890e511fd39fa120a27471811bc)
Zbigniew Jędrzejewski-Szmek [Mon, 18 May 2020 19:14:42 +0000 (21:14 +0200)]
man: fix dir name in sysctl.d(5)
Pointed out by Коренберг Марк in
https://github.com/systemd/systemd/commit/
e0f424790d3dbde136a29a7fa4c2777c2e3fd695#commitcomment-
39259499.
(cherry picked from commit
7b9289b1a0f0fe0a836fddc18b96d963673fad85)
Lennart Poettering [Tue, 12 May 2020 21:36:27 +0000 (23:36 +0200)]
journalctl,elsewhere: make sure --file=foo fails with sane error msg if foo is not readable
It annoyed me for quite a while that running "journalctl --file=…" on a
file that is not readable failed with a "File not found" error instead
of a permission error. Let's fix that.
We make this work by using the GLOB_NOCHECK flag for glob() which means
that files are not accessible will be returned in the array as they are
instead of being filtered away. This then means that our later attemps
to open the files will fail cleanly with a good error message.
(cherry picked from commit
544e146b0e2f6227e28476e36becd1019b14ef70)
Lennart Poettering [Mon, 18 May 2020 16:30:18 +0000 (18:30 +0200)]
makefs: log about OOM condition
(cherry picked from commit
700e0d3d87705a6ba01793d7130bbb8e6edbee16)
Lennart Poettering [Mon, 18 May 2020 16:29:57 +0000 (18:29 +0200)]
blockdev: propagate one more unexpected error
(cherry picked from commit
6cba41ab0dbe5eb817f37bd43caff4754d801d3b)
Lennart Poettering [Tue, 19 May 2020 07:23:00 +0000 (09:23 +0200)]
repart: don't insist on coming up on partition label ourselves
If the user specified a label, use that.
Fixes: #15841
(cherry picked from commit
feb13fca97532b0a411a633fd601b93aa6f9275f)
Vladyslav Tronko [Thu, 14 May 2020 02:26:23 +0000 (05:26 +0300)]
journal: fix dropping first record during upload to remote journal
(cherry picked from commit
bc48b25afd2800b643424125b05b822293840c2e)
Dimitri John Ledkov [Fri, 15 May 2020 18:16:05 +0000 (19:16 +0100)]
meson: initialize time-epoch to reproducible builds compatible value
Debian Policy encourages to preserve timestamps whenever possible in the
tarballs, thus stable release updates of systemd usually do not bump NEWS file
timestamp. And thus time-epoch remains the same for the lifetime of a release.
It would be better, if each new stable release rebuild of systemd would bump
the time epoch a bit. But at the same time remain
reproducible. SOURCE_DATE_EPOCH is an environmnet variable defined for this
purpose. Thus if available, prefer that, instead of the NEWS file modification
time.
For example, on Debian/Ubuntu under the reproducible builds the
SOURCE_DATE_EPOCH is set to the timestamp from the packaging metadata, thus it
is incremented on every new stable release update, whilst preserving
reproducible builds capability.
Reference: https://reproducible-builds.org/docs/timestamps/
(cherry picked from commit
6dbf352cfbbaf9c9b277af54da50da38296ae5c6)
Lennart Poettering [Thu, 14 May 2020 17:11:18 +0000 (19:11 +0200)]
limit-util: quieten a very common debug message that is misleading
(cherry picked from commit
7cd9e4f8a087caa38acb5c7b0c41d38e82cf4d80)
Frantisek Sumsal [Fri, 15 May 2020 10:02:43 +0000 (12:02 +0200)]
shared: fix integer overflow in calendarspec
Fixes: oss-fuzz#22208
```
test/fuzz/fuzz-calendarspec/oss-fuzz-22208... ../src/shared/calendarspec.c:666:48: runtime error: signed integer overflow:
2147000000 +
1000000 cannot be represented in type 'int'
#0 0x7f0b9f6cc56a in prepend_component ../src/shared/calendarspec.c:666
#1 0x7f0b9f6cd03a in parse_chain ../src/shared/calendarspec.c:718
#2 0x7f0b9f6cea1c in parse_calendar_time ../src/shared/calendarspec.c:845
#3 0x7f0b9f6d1397 in calendar_spec_from_string ../src/shared/calendarspec.c:1084
#4 0x401570 in LLVMFuzzerTestOneInput ../src/fuzz/fuzz-calendarspec.c:17
#5 0x401ae0 in main ../src/fuzz/fuzz-main.c:39
#6 0x7f0b9e31b1a2 in __libc_start_main (/lib64/libc.so.6+0x271a2)
#7 0x40122d in _start (/home/fsumsal/repos/systemd/build/fuzz-calendarspec+0x40122d)
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../src/shared/calendarspec.c:666:48 in
```
(cherry picked from commit
c07f18ffd458a224e1784f128df26b340c1c39c8)
Lennart Poettering [Tue, 12 May 2020 15:08:39 +0000 (17:08 +0200)]
repart: suppress complaints about lack of BLKRRPART when operating on regular file
(cherry picked from commit
9a1deb8578268911f752129838e0f3c9a5cb89ea)
Lennart Poettering [Tue, 12 May 2020 09:20:39 +0000 (11:20 +0200)]
repart: explain when we exit early and don't do a thing
(cherry picked from commit
e2d65cd299355aba9afbaec24f04ed75ee3f0f1d)
Franck Bui [Thu, 2 Apr 2020 06:58:31 +0000 (08:58 +0200)]
mount: introduce mount_is_nofail() helper
(cherry picked from commit
5a7c4f4f3b3bc8f01fc2fa6ab55ed0b6665508e5)
Franck Bui [Thu, 2 Apr 2020 06:51:00 +0000 (08:51 +0200)]
mount: default startup dependencies and default network ones are orthogonal
Regardless of whether a mount is setup in initrd or int the main system,
the network default dependencies _netdev should still be honored.
IOW if a mount unit use the following options "x-initrd.mount,_netdev", it
should be ordered against initrd-fs.target, network.target,
network-online.target.
/dev/vdb1 /mnt ext4 x-initrd.mount,_netdev defaults 0 0
Before this patch:
Before=umount.target initrd-fs.target
After=system.slice sysroot.mount dev-vdb1.device -.mount systemd-journald.socket blockdev@dev-vdb1.target
After this patch:
Before=initrd-fs.target umount.target
After=network-online.target -.mount blockdev@dev-vdb1.target dev-vdb1.device sysroot.mount system.slice network.target systemd-journald.socket
(cherry picked from commit
2ec15c4f8a288d4f2e92ba2b8586736b2a07b9ea)
Franck Bui [Thu, 9 Apr 2020 13:01:53 +0000 (15:01 +0200)]
mount: introduce mount_add_default_ordering_dependencies()
Move the handling of the usual startup/shutdown dependencies in a dedicated
funtion.
No functional change.
(cherry picked from commit
61154cf9533f0bbce674b2de22956f7086604c91)
Franck Bui [Thu, 2 Apr 2020 08:52:24 +0000 (10:52 +0200)]
automount: fix handling of default dependencies for automount units
First After=local-fs-pre.target wasn't described in the man page although it's
part of the default dependencies automatically set by pid1.
Secondly, Before=local-fs.target was only set if the automount unit was
generated from the fstab-generator because the dep was explicitly
generated. It was also not documented as a default dependency.
Fix it by managing the dep from pid1 instead.
(cherry picked from commit
b3d7aef525dc1620a7948ffdbf3f36bfa3d5b5e8)
Franck Bui [Thu, 2 Apr 2020 06:29:36 +0000 (08:29 +0200)]
mount: let pid1 alone handle the default dependencies for mount units
fstab-generator was also handling the default ordering dependencies for mount
units setup in initrd. To do that it was turning the defaults dependencies off
completely and ordered the mount unit against either local-fs.target or
initrd-fs.target or initrd-root-fs.target itself.
But it had the bad side effect to also remove all other default dependencies as
well. Thus if an initrd mount was using _netdev, the network dependencies were
missing.
In general fstab-generator shouldn't use DefaultDependecies=no because it can
handle only a small set of the default dependencies the rest are dealt by pid1.
So this patch makes pid1 handle all default dependencies.
(cherry picked from commit
83cdc870949823b5b9fa04dd76e952d42faab0b1)
Franck Bui [Wed, 1 Apr 2020 15:46:42 +0000 (17:46 +0200)]
mount: mount unit activated by automount unit should be only ordered against the automount unit
Both fstab-generator and pid1 are duplicating the handling of
"Before=local-fs.target" dependency for mount units.
fstab-generator is correctly skipping this dep if the mount unit is activated
by an automount unit.
However the condition used by pid1 was incorrect and missed the case when a mount
unit uses "x-systemd.automount" since in this case the mount unit should be
(only) ordered against its automount unit counterpart instead.
(cherry picked from commit
457d65932b3832cc8fd103d09ffb3e7ea924d07c)
Franck Bui [Mon, 30 Mar 2020 08:47:31 +0000 (10:47 +0200)]
generator: don't generate device dependencies for extrinsic mounts
Stop generating device dependencies for extrinsic mounts: we already exclude
extrinsic mounts from the usual start-up and shutdown dependencies but some
extra deps added by generator_write_device_deps() were remaining.
(cherry picked from commit
ad8f1b0f3601b423b3bad5fe8de667de531ce7c4)
Franck Bui [Mon, 30 Mar 2020 08:39:21 +0000 (10:39 +0200)]
fstab-util: introduce fstab_is_extrinsic()
(cherry picked from commit
bc9e5a4c67f5fff536d122118e16a53dfb592acd)
Franck Bui [Mon, 30 Mar 2020 08:49:29 +0000 (10:49 +0200)]
device: drop refuse_after
Scheduling devices after a given unit can be useful to start device *jobs* at a
specific time in the transaction, see commit
4195077ab4c823c.
This (hidden) change was introduced by commit
eef85c4a3f8054d2.
(cherry picked from commit
b862c25716520d9381d5a841dba0f0c14e9c970a)
Lennart Poettering [Thu, 14 May 2020 10:19:46 +0000 (12:19 +0200)]
man: drop some left-over mentions of StandardOutput=syslog
We dropped them from the StandardOuput= documentation long ago, but
elswhere some references where lurking.
(cherry picked from commit
d2b843554add03b938416f33705e4896aee6995c)
Andreas Rammhold [Thu, 14 May 2020 17:23:33 +0000 (19:23 +0200)]
sd-netlink: remove unused RTNL_WQUEUE_MAX define
While investigating why some of my netlink calls would timeout I
stumbled upon the definition of the max write queue length. Finding this
constant made me believe we still had a write queue in the code - which
isn't true. The netlink write queue code was removed in #189.
(cherry picked from commit
32fcf399bfe7ff6e08ace48106567f8848a1b6e0)
Benjamin Robin [Sun, 10 May 2020 14:49:30 +0000 (16:49 +0200)]
test: Add return 0 to main() function (even it is not strictly necessary)
(cherry picked from commit
243945e95e8cfdef85b44e98a127496fcec8675d)
Benjamin Robin [Sat, 9 May 2020 19:19:12 +0000 (21:19 +0200)]
network: 'cur' variable cannot be null, so simplify code
(cherry picked from commit
81c5a5961fe655b0a735775e74be701f1a473ceb)
Benjamin Robin [Sat, 9 May 2020 17:51:23 +0000 (19:51 +0200)]
tree-wide: Initialize _cleanup_ variables if needed
(cherry picked from commit
b9c54c46652d74c4bd3a55a87abcb82d317cbb16)
Benjamin Robin [Sat, 9 May 2020 16:12:21 +0000 (18:12 +0200)]
netlink: Fix assert condition on n_containers
(cherry picked from commit
179b4db439ce4c41d44a6b5de22244c9ab54b252)
Benjamin Robin [Sun, 3 May 2020 16:37:21 +0000 (18:37 +0200)]
journald: Increase stdout buffer size sooner, when almost full
If the previous received buffer length is almost equal to the allocated
buffer size, before this change the next read can only receive a couple
of bytes (in the worst case only 1 byte), which is not efficient.
(cherry picked from commit
034e9719ac1ba88a36b05da38c7aa98761d42c77)
Lennart Poettering [Tue, 12 May 2020 15:28:27 +0000 (17:28 +0200)]
core: don't bind varlink socket if running in test mode
Fixes: #15748
(cherry picked from commit
08d50deaf813b44ebb8d64d2a2bd70344e9caedd)
Lennart Poettering [Thu, 7 May 2020 08:35:48 +0000 (10:35 +0200)]
pam_systemd: also print debug lines when ending a session
(cherry picked from commit
45c5fa253a7241bfa7791fd39113aa0374b07b2e)
Lennart Poettering [Thu, 7 May 2020 08:49:52 +0000 (10:49 +0200)]
pam_systemd_home: use correct macro for converting ptr to fd
(cherry picked from commit
da4340fd43abb9aed3a0fb29f632e9ac5f162f8a)
Joel Shapiro [Sat, 9 May 2020 05:38:41 +0000 (00:38 -0500)]
Fix misuse of PAM_PROMPT_ECHO_OFF in systemd-homed
Previously pam_systemd_home.so was relying on `PAM_PROMPT_ECHO_OFF` to
display error messages to the user and also display the next prompt.
`PAM_PROMPT_ECHO_OFF` was never meant as a way to convey information to
the user, and following the example set in pam_unix.so you can see that
it's meant to _only_ display the prompt. Details about why the
authentication failed should be done in a `PAM_ERROR_MSG` before
displaying a short prompt as per usual using `PAM_PROMPT_ECHO_OFF`.
(cherry picked from commit
d423294394a411a3fe98884993f9c1686edffb1b)
Zbigniew Jędrzejewski-Szmek [Sat, 9 May 2020 07:09:11 +0000 (09:09 +0200)]
shared/ethtool-util: hush gcc warnings about array bounds
[127/1355] Compiling C object 'src/shared/
5afaae1@@systemd-shared-245@sta/ethtool-util.c.o'
../src/shared/ethtool-util.c: In function ‘ethtool_get_permanent_macaddr’:
../src/shared/ethtool-util.c:260:60: warning: array subscript 5 is outside the bounds of an interior zero-length array ‘__u8[0]’ {aka ‘unsigned char[]’} [-Wzero-length-bounds]
260 | ret->ether_addr_octet[i] = epaddr.addr.data[i];
| ~~~~~~~~~~~~~~~~^~~
In file included from ../src/shared/ethtool-util.c:5:
../src/shared/linux/ethtool.h:704:7: note: while referencing ‘data’
704 | __u8 data[0];
| ^~~~
../src/shared/ethtool-util.c: In function ‘ethtool_set_features’:
../src/shared/ethtool-util.c:488:31: warning: array subscript 0 is outside the bounds of an interior zero-length array ‘__u32[0]’ {aka ‘unsigned int[]’} [-Wzero-length-bounds]
488 | len = buffer.info.data[0];
| ~~~~~~~~~~~~~~~~^~~
In file included from ../src/shared/ethtool-util.c:5:
../src/shared/linux/ethtool.h:631:8: note: while referencing ‘data’
631 | __u32 data[0];
| ^~~~
The kernel should not define the length of the array, but it does. We can't fix
that, so let's use a cast to avoid the warning.
For https://github.com/systemd/systemd/issues/6119#issuecomment-
626073743.
v2:
- use #pragma instead of a cast. It seems the cast only works in some cases, and
gcc is "smart" enough to see beyond the cast. Unfortunately clang does not support
this warning, so we need to do a config check whether to try to suppress.
(cherry picked from commit
94c0c5b7eaa1529ff694318d3755181ba96ecefb)
Zbigniew Jędrzejewski-Szmek [Sat, 9 May 2020 06:53:27 +0000 (08:53 +0200)]
core: fix compilation with gcc -O3
../src/core/path.c: In function ‘path_serialize’:
../src/core/path.c:616:24: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
616 | (void) serialize_item_format(f, "path-spec", "%s %%i %%s",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
617 | path_type_to_string(s->type) //,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
618 | // s->previous_exists,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
619 | // s->path
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
620 | );
| ~
In function ‘path_spec_dump’,
inlined from ‘path_dump’ at ../src/core/path.c:392:17:
../src/core/path.c:226:9: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
226 | fprintf(f,
| ^~~~~~~~~~
227 | "%s%s: %s\n",
| ~~~~~~~~~~~~~
228 | prefix,
| ~~~~~~~
229 | path_type_to_string(s->type),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
230 | s->path);
| ~~~~~~~~
s->type should be valid here, so let's just add an assert.
For https://github.com/systemd/systemd/issues/6119#issuecomment-
626073743.
(cherry picked from commit
23450c897d11ccd8dfbe28cf3acca17f016e65be)
Lennart Poettering [Sun, 10 May 2020 09:14:10 +0000 (11:14 +0200)]
random-util: use ERRNO_IS_NOT_SUPPORTED() macro
Some container mgr or sandbox solution might block it with an unexpected
error code, hence let's be tolerant here.
(cherry picked from commit
e2b55464523adbb3732eb632ac2a21b685935642)
Lennart Poettering [Sun, 10 May 2020 09:45:52 +0000 (11:45 +0200)]
tmpfiles: clarify that "!" lines are filtered before collisions are checked
Fixes: #15675
(cherry picked from commit
ead2a4a2310789a18615987ed293d8bb8a246a88)
Lennart Poettering [Sun, 10 May 2020 09:44:53 +0000 (11:44 +0200)]
man: mention the exclamation mark and minus sign literally, to make things searchable
I was looking for the explanation for the exclamation mark in the text,
and couldn't find it, searching for "!". Let's make this easier, and
indicate the character meant.
(cherry picked from commit
f742f9d317698c81ec58828814081d8d8a013762)
Lennart Poettering [Mon, 11 May 2020 08:36:28 +0000 (10:36 +0200)]
man: clarify that exit status name mappings are unaffected by SuccessExitStatus=
Fixes: #15757
(Note there's quite some confusion regarding "exit status" vs. "exit
code" in the docs here. We should clean this up fully one day. This
change tries to fix some occasions of the wrong use, but not all.)
(cherry picked from commit
1e0d5eebf1da932a47c8e4c2728c2f008d09abca)
Lennart Poettering [Sun, 10 May 2020 07:19:29 +0000 (09:19 +0200)]
seccomp-util: add new syscalls from kernel 5.6 to syscall filter table
(cherry picked from commit
8270e3d8ed320b41e14ec8578456228f578f0561)
Benjamin Robin [Fri, 8 May 2020 11:32:11 +0000 (13:32 +0200)]
tree-wide: Replace assert() by assert_se() when there is side effect
(cherry picked from commit
20c3acfaad0b93990eafb6b994811db8c0617498)
наб [Thu, 7 May 2020 19:34:39 +0000 (21:34 +0200)]
networkctl: use uint64_t for link speed throughout
format-table used size_t/uint64_t interchangeably for TABLE_BPS,
and ethtool-util used SIZE_MAX to indicate SPEED_UNKNOWN,
which worked only on ABIs with 64-bit pointers.
For example, the tg3 driver returns SPEED_UNKNOWN with no link (cf.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/broadcom/tg3.c?id=
3eb2efbea193789397c36f52b17d8692ac79bf68#n12190)
which on x32 (and other 32-bit ABIs, presumably) caused
"networkctl status" to mark it with "Speed: 4Gbps":
nabijaczleweli@szarotka:~$ networkctl --version
systemd 245 (245.5-2)
nabijaczleweli@szarotka:~$ file $(which networkctl)
/bin/networkctl: ELF 32-bit LSB shared object, x86-64, version 1 (SYSV),
dynamically linked, interpreter /libx32/ld-linux-x32.so.2,
BuildID[sha1]=
36d684cb1fc8fb5060050d32b969e5aa172fa607, for GNU/Linux
3.4.0, stripped
nabijaczleweli@szarotka:~$ networkctl status onboard1
● 4: onboard1
Driver: tg3
Model: NetXtreme BCM5755 Gigabit Ethernet PCI Express
Speed: 4Gbps
Whereas on 64-bit-pointer ABIs (here: amd64):
nabijaczleweli@szarotka:~$ networkctl --version
systemd 245 (245.5-2)
nabijaczleweli@szarotka:~$ file $(which networkctl)
/bin/networkctl: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV),
dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,
BuildID[sha1]=
7a3e406e54968d7774ad467fc3f6a9d35ff7aea2, for GNU/Linux
3.2.0, stripped
nabijaczleweli@szarotka:~$ networkctl status onboard1
● 4: onboard1
Driver: tg3
Model: NetXtreme BCM5755 Gigabit Ethernet PCI Express
Speed: n/a
With this patch, networkctl returns, for x32:
nabijaczleweli@szarotka:~$ networkctl --version
systemd 245 (245.5-2.1~networkctl-4g-v2)
nabijaczleweli@szarotka:~$ file $(which networkctl)
/bin/networkctl: ELF 32-bit LSB shared object, x86-64, version 1 (SYSV),
dynamically linked, interpreter /libx32/ld-linux-x32.so.2,
BuildID[sha1]=
36d684cb1fc8fb5060050d32b969e5aa172fa607, for GNU/Linux
3.4.0, stripped
nabijaczleweli@szarotka:~$ networkctl status onboard1
● 4: onboard1
Driver: tg3
Model: NetXtreme BCM5755 Gigabit Ethernet PCI Express
Speed: n/a
And for amd64:
nabijaczleweli@szarotka:~$ file $(which networkctl)
/bin/networkctl: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV),
dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,
BuildID[sha1]=
7a3e406e54968d7774ad467fc3f6a9d35ff7aea2, for GNU/Linux
3.2.0, stripped
nabijaczleweli@szarotka:~$ networkctl status onboard1
● 4: onboard1
Driver: tg3
Model: NetXtreme BCM5755 Gigabit Ethernet PCI Express
Speed: n/a
(cherry picked from commit
2f665f24376c6fb0cceef69e50610e45132808bd)
Lennart Poettering [Fri, 24 Apr 2020 21:36:03 +0000 (23:36 +0200)]
tree-wide: use CMSG_SPACE() (and not CMSG_LEN()) to allocate control buffers
We need to use the CMSG_SPACE() macro to size the control buffers, not
CMSG_LEN(). The former is rounded up to next alignment boundary, the
latter is not. The former should be used for allocations, the latter for
encoding how much of it is actually initialized. See cmsg(3) man page
for details about this.
Given how confusing this is, I guess we don't have to be too ashamed
here, in most cases we actually did get this right.
(cherry picked from commit
a258f4915a2674d77e656755e5a4fa23059f778a)
Zbigniew Jędrzejewski-Szmek [Thu, 7 May 2020 11:28:39 +0000 (13:28 +0200)]
man: suffix pam options with "=" where arg is required too
(cherry picked from commit
1f63c72d2e6a527c1207ea01dc223fc711247ba0)
Benjamin Robin [Wed, 6 May 2020 18:32:27 +0000 (20:32 +0200)]
test: Use assert_se() where variables are only checked by assert
Allow to build without any warning with NDEBUG defined
(cherry picked from commit
060d9c61b6ee80585082cf5a1e499195c4df8d42)
Benjamin Robin [Wed, 6 May 2020 18:30:43 +0000 (20:30 +0200)]
tree-wide: Fix, replace assert() by assert_se() when there is side effect
(cherry picked from commit
f391597c6712ad90db37fe4a79047a45f4aca86a)
Benjamin Robin [Wed, 6 May 2020 18:29:31 +0000 (20:29 +0200)]
tree-wide: Mark as _unused_ variables that are only used in assert()
Allow to build without any warning with NDEBUG defined
(cherry picked from commit
0a0e594a26efe69afc3b05529dc0145a8d674e12)
Benjamin Robin [Wed, 6 May 2020 19:24:05 +0000 (21:24 +0200)]
tree-wide: Workaround -Wnonnull GCC bug
See issue #6119
(cherry picked from commit
08f468567d9ebb56e04eb5585eda42add6cb4cb5)
Lennart Poettering [Wed, 6 May 2020 20:28:37 +0000 (22:28 +0200)]
man: bring example PAM snippet of pam_systemd and pam_systemd_home back in sync
Let's make it the same snippet, just highlight different lines.
(cherry picked from commit
4ad5bf78655415b17550050bb7011420da7ff95b)
Lennart Poettering [Wed, 6 May 2020 20:26:54 +0000 (22:26 +0200)]
man: highlight relevant lines in pam_systemd_home.so example PAM snippet
let's do this like we do in the NSS module man pages.
(cherry picked from commit
c6472bb019d57af5b9c4a95456885f097d7e87a5)
Lennart Poettering [Wed, 6 May 2020 20:25:34 +0000 (22:25 +0200)]
login: include pam_systemd_home.so in the default PAM snippet we ship for user@.service
Let's make sure systemd-homed works out-of-the box as well as possible.
(cherry picked from commit
bd685faa1a3d08598322dc6e256ac585cffcdbac)
Balint Reczey [Tue, 5 May 2020 19:24:53 +0000 (21:24 +0200)]
test: Skip test-boot-timestamps on permission denied
In containers even root can be denied to access the needed files.
(cherry picked from commit
e48471b94885b7e9861d468974cfc00e1455a7fd)
Lennart Poettering [Tue, 5 May 2020 19:46:56 +0000 (21:46 +0200)]
sysusers: be extra careful when locking accounts
Let's use "!*" instead of "!!" as invalid password string.
Generally, any invalid password string can be used to for locking an
account, according to shadow(5). To temporarily lock a password of an
account it is commonly implemented to prefix the original password with
a single "!", so that it can later on be unlocked again by removing the
"!", restoring the original password. Thus, the "!" marker is an
indicator for a locked password; the act of prefixing "!" to a
password string is the locking operation; and the removal of a "!"
prefix is the unlock operation. (This is also suggested in shadow(5)).
If we want to entirely lock an account we previously used "!!" as
password string. This is nice since it indicates the password is locked.
However, it is less than ideal, since applying the password unlock
operation once will change the string to "!", which is still a locked
password. Unlocking the password a second time will result in "", i.e.
the empty password, which will in many cases allow logging in without
password. And that's a problem. Hopefully, tools do not allow such
duplicate unlocking, but it's still not a nice property.
By changing our password string to "!*" we get different behaviour: the
password will appear locked. When it is unlocked the password is "*"
which is an invalid password. In that case the password is hence
unlocked but invalid, which is a much better state to be in than the
above.
This is paranoia hardening. Not more. There's no report that anyone
every unlocked an account twice and people could log in.
(cherry picked from commit
fc58c0c7bf7e4f525b916e3e5be0de2307fef04e)
Zbigniew Jędrzejewski-Szmek [Mon, 4 May 2020 17:45:19 +0000 (19:45 +0200)]
shared/install: print name of offending file in error
"Unit type slice cannot be templated."
↓
"/etc/systemd/system.control/user@.slice: unit type slice cannot be templated."
(cherry picked from commit
bce84e10f8e38982306b07596584287c1d27d79d)
Zbigniew Jędrzejewski-Szmek [Thu, 30 Apr 2020 16:45:08 +0000 (18:45 +0200)]
systemctl: fix --root support in querying presets
We would always look on the host, ignoring --root.
(cherry picked from commit
c39b7821f6d24d0b096ee347c6e1e2708391438f)
Zbigniew Jędrzejewski-Szmek [Thu, 30 Apr 2020 10:38:36 +0000 (12:38 +0200)]
systemctl: fix hint when 'systemctl help' is given
Not all verbs require unit names, but that is beside the point. We need a verb
here, and help is not a valid verb.
(cherry picked from commit
77102db288e533050397128da182b081a98211f7)
Zbigniew Jędrzejewski-Szmek [Thu, 30 Apr 2020 10:02:44 +0000 (12:02 +0200)]
shared/unit-file: fix resolution of absoulute symlinks with --root
$ systemctl --no-pager --root /tmp/root2/ cat ctrl-alt-del.target
Failed to resolve symlink /tmp/root2/etc/systemd/system/ctrl-alt-del.target pointing to /usr/lib/systemd/system/reboot.target, ignoring: Channel number out of range
...
(cherry picked from commit
b8239b9c501f6d08e918e74f0af301b2cc472b89)
Zbigniew Jędrzejewski-Szmek [Wed, 29 Apr 2020 16:22:46 +0000 (18:22 +0200)]
man: mention that ProtectSystem= also takes care of /efi
(cherry picked from commit
26b8190841fa6e00a66a4a46b343bde117b855fc)
Chris Down [Tue, 5 May 2020 19:16:10 +0000 (20:16 +0100)]
man: systemd.service: systemd-analyze exit-codes -> exit-status
5238d9a83a52 renames this to exit-status, but systemd.service was not
updated.
The rest of the doc seems a bit inconsistent in its use of the terms
"exit code" and "exit status", but it's not that confusing, so leave
those alone for now.
(cherry picked from commit
87afd40b5a926e303c188855a167ee21c3124528)
Lennart Poettering [Thu, 30 Apr 2020 11:42:59 +0000 (13:42 +0200)]
man: expand on the star…end/repetition time expressions
And attempt to explain what is requested in #15030, but still be
concise.
Fixes: #15030
(cherry picked from commit
2edc7aea7a95dc0dc0fb3e9ef5ffbe413a477593)
Lennart Poettering [Thu, 30 Apr 2020 11:24:31 +0000 (13:24 +0200)]
calendarspec: be more graceful with two kinds of calendar expressions
This changes the calendarspec parser to allow expressions such as
"00:05..05", i.e. a range where start and end is the same. It also
allows expressions such as "00:1-2/3", i.e. where the repetition value
does not fit even once in the specified range. With this patch both
cases will now be optimized away, i.e. the range is removed and a fixed
value is used, which is functionally equivalent.
See #15030 for an issue where the inability to parse such expressions
caused confusion.
I think it's probably better to accept these gracefully and optimizing
them away instead of refusing them with a plain EINVAL. With a tool such
as "systemd-analyze" calendar it should be easy to figure out the
normalized form with the redundant bits optimized away.
(cherry picked from commit
c9c9f6f450f678a0d5e5b929ba238d4a5254bded)
Lennart Poettering [Thu, 30 Apr 2020 11:20:23 +0000 (13:20 +0200)]
calendarspec: minor simplification
(cherry picked from commit
05851cb9df1305d53b99f1a0ee9d2acb7e1ffb52)
Lennart Poettering [Tue, 5 May 2020 06:19:30 +0000 (08:19 +0200)]
shutdown: fix spacing in shutdown error message
(cherry picked from commit
5fe4d1b51416c2fde35fc5ca0d3edf08844173a5)
Motiejus Jakštys [Mon, 4 May 2020 16:57:40 +0000 (19:57 +0300)]
nspawn: mount custom paths before writing to /etc
Consider such configuration:
$ systemd-nspawn --read-only --timezone=copy --resolv-conf=copy-host \
--overlay="+/etc::/etc" <...>
Assuming one wants `/` to be read-only, DNS and `/etc/localtime` to
work. One way to do it is to create an overlay filesystem in `/etc/`.
However, systemd-nspawn tries to create `/etc/resolv.conf` and
`/etc/localtime` before mounting the custom paths, while `/` (and, by
extension, `/etc`) is read-only. Thus it fails to create those files.
Mounting custom paths before modifying anything in `/etc/` makes this
possible.
Full example:
```
$ debootstrap buster /var/lib/machines/t1 http://deb.debian.org/debian
$ systemd-nspawn --private-users=false --timezone=copy --resolv-conf=copy-host --read-only --tmpfs=/var --tmpfs=/run --overlay="+/etc::/etc" -D /var/lib/machines/t1 ping -c 1 example.com
Spawning container t1 on /var/lib/machines/t1.
Press ^] three times within 1s to kill container.
ping: example.com: Temporary failure in name resolution
Container t1 failed with error code 130.
```
With the patch:
```
$ sudo ./build/systemd-nspawn --private-users=false --timezone=copy --resolv-conf=copy-host --read-only --tmpfs=/var --tmpfs=/run --overlay="+/etc::/etc" -D /var/lib/machines/t1 ping -qc 1 example.com
Spawning container t1 on /var/lib/machines/t1.
Press ^] three times within 1s to kill container.
PING example.com (93.184.216.34) 56(84) bytes of data.
--- example.org ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 110.912/110.912/110.912/0.000 ms
Container t1 exited successfully.
```
(cherry picked from commit
5c4deb9a5c29cf7b4f53009a1fb439b816cb3a34)
Emmanuel Garette [Thu, 30 Apr 2020 07:51:29 +0000 (09:51 +0200)]
repart: fix partition maximum size segfault
Discovered, tracked down and fix proposed by Emmanuel Garette.
See: https://lists.freedesktop.org/archives/systemd-devel/2020-April/044435.html
(Lennart turned this into a PR)
Fixes: #15608
(cherry picked from commit
db1442260a56963a8aa507787e71b97e5f08f17c)
nabijaczleweli [Wed, 29 Apr 2020 16:38:56 +0000 (18:38 +0200)]
link: Add units and fix typo in (Rx|Tx)BufferSize= manpage. Clean up the implementation slightly
(cherry picked from commit
80af9bdabe2aa6421568d5d20f4c513cf49a3e43)
Lennart Poettering [Wed, 22 Apr 2020 20:49:02 +0000 (22:49 +0200)]
main: bump RLIMIT_MEMLOCK by physical RAM size
Let's allow more memory to be locked on beefy machines than on small
ones. The previous limit of 64M is the lower bound still. This
effectively means on a 4GB machine we can lock 512M, which should be
more than enough, but still not lock up the machine entirely under
pressure.
Fixes: #15053
(cherry picked from commit
04d1ee0f7ec7a280136ddf5f3f34d6282a50846d)
Lennart Poettering [Wed, 22 Apr 2020 14:35:32 +0000 (16:35 +0200)]
nspawn: be more careful with creating/chowning directories to overmount
We should never re-chown selinuxfs.
Fixes: #15475
(cherry picked from commit
dcff2fa5d16f01edd774cd9dbc21fa4385af65bb)
Zbigniew Jędrzejewski-Szmek [Tue, 28 Apr 2020 07:09:26 +0000 (09:09 +0200)]
homectl: say "home area" in more places
Follow-up for
b5947b5b100f694c93857a82018fb0656d08be34.
(cherry picked from commit
c11428adf9a789ff2b13a4095450f47af2b49c30)
Zbigniew Jędrzejewski-Szmek [Tue, 28 Apr 2020 07:13:47 +0000 (09:13 +0200)]
userdbctl: make --help fit in 80 columns
(cherry picked from commit
7009610ff580f1238c71e50c71029bef0b2d00a7)
Ronan Pigott [Mon, 27 Apr 2020 06:16:55 +0000 (23:16 -0700)]
shell-completion/zsh: update systemd-analyze completions
(cherry picked from commit
4b6d94a1e59b75c8623a0eaea49cc7ff26c8b820)
Haochen Tong [Sun, 26 Apr 2020 22:30:49 +0000 (00:30 +0200)]
zsh: fix disable/enable completion
The "preset" column introduced in
b01c1f305c044a381ad110709a62507d74bf6d86 breaks zsh completion for
systemctl disable/enable. Fix by ignoring everything after the last
space in a line.
(cherry picked from commit
f5b3be308d1c72c34b1204702a21233b6585b533)
Dan Streetman [Sat, 21 Mar 2020 15:19:44 +0000 (11:19 -0400)]
cgroup-util: check for SYSFS_MAGIC when detecting cgroup format
When nothing at all is mounted at /sys/fs/cgroup, the fs.f_type is
SYSFS_MAGIC (0x62656572) which results in the confusing debug log:
"Unknown filesystem type
62656572 mounted on /sys/fs/cgroup."
Instead, if the f_type is SYSFS_MAGIC, a more accurate message is:
"No filesystem is currently mounted on /sys/fs/cgroup."
(cherry picked from commit
0bc5f001dbf25ea264a9b61aafd3d7362f53b7be)
Lennart Poettering [Thu, 23 Apr 2020 12:50:53 +0000 (14:50 +0200)]
stat-util: no need to open a file to check fs type
(cherry picked from commit
6d965610bde404f60c43accb12f570ab75d4195e)
Lennart Poettering [Thu, 23 Apr 2020 12:50:07 +0000 (14:50 +0200)]
sysusers,tmpfiles: always mention error when failing to replace specifiers
(cherry picked from commit
0f7e4b2888840e7e6a702aa8ce5d3e3b2bc077ef)
Lennart Poettering [Thu, 23 Apr 2020 12:49:14 +0000 (14:49 +0200)]
sysusers: add accidentally forgotten 'return'
(cherry picked from commit
2230e8f29ddb018697b9c3d13c1f522c62976e70)
Lennart Poettering [Thu, 23 Apr 2020 14:51:37 +0000 (16:51 +0200)]
man: document binfmt's new --unregister switch
(cherry picked from commit
cd9aa8f0f91b113acb079e79750c146c0529c2d7)
Lennart Poettering [Thu, 23 Apr 2020 14:36:45 +0000 (16:36 +0200)]
binfmt: also unregister binfmt entries from unit
We unregister binfmt_misc twice during shutdown with this change:
1. A previous commit added support for doing that in the final shutdown
phase, i.e. when we do the aggressive umount loop. This is the robust
thing to do, in case the earlier ("clean") shutdown phase didn't work
for some reason.
2. This commit adds support for doing that when systemd-binfmt.service
is stopped. This is a good idea so that people can order mounts
before the service if they want to register binaries from such
mounts, as in that case we'll undo the registration on shutdown
again, before unmounting those mounts.
And all that, just because of that weird "F" flag the kernel introduced
that can pin files...
Fixes: #14981
(cherry picked from commit
846acb6798a63f35162f58e1146d1a1f40849e86)
Lennart Poettering [Thu, 23 Apr 2020 14:27:46 +0000 (16:27 +0200)]
binfmt: modernize code a bit
Let's just copy out the bit of the string we need, and let's make sure
we refuse rules called "status" and "register", since those are special
files in binfmt_misc's file system.
(cherry picked from commit
f3670df13e144c2f81bf6f9a0bea581e6d555bdd)
Lennart Poettering [Thu, 23 Apr 2020 14:25:53 +0000 (16:25 +0200)]
shutdown: unregister all binfmt_misc entries before entering shutdown loop
Apparently if the new "F" flag is used they might pin files, which
blocks us from unmounting things. Let's hence clear this up explicitly.
Before entering our umount loop.
Fixes: #14981
(cherry picked from commit
0282c0285a3e3c2e409305ce28555a6ad0489539)
Lennart Poettering [Thu, 23 Apr 2020 14:36:06 +0000 (16:36 +0200)]
shared: add common helper for unregistering all binfmt entries
(cherry picked from commit
965cc99416a3b5a2a71127e9e6d2e4a95ab3c432)
Lennart Poettering [Thu, 23 Apr 2020 11:46:10 +0000 (13:46 +0200)]
home: fix strv NUL termination
Fixes: #15559
(cherry picked from commit
113a51d22139ecb8d60163ec1a5bf05016cfeb77)
Lennart Poettering [Thu, 23 Apr 2020 13:18:18 +0000 (15:18 +0200)]
networkd: don't do lldp rx nor tx on bond devices
Fixes: #15146
(cherry picked from commit
b2cdefad3a437a756f99f93344422f665f59ef45)