1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-02 09:47:03 +03:00

48233 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
6db2ae6618 shell-completion: fix systemctl set/unset/import-environment
unset-environment is completed with variable names in the environment block.
set-environment the same, but suffixed with "=".
import-environment is completed with variable names in the client environment.

(cherry picked from commit 341992081b6ece1adba270e239f96c9840884885)
2021-02-02 14:52:53 +01:00
Zbigniew Jędrzejewski-Szmek
d0a124c0af man: improve description of environment block creation
This adds a general description of "philosphy" of keeping the environemnt
block small and hints about systemd-run -P env.

The list of generated variables is split out to a subsection. Viewing
the patch with ignoring whitespace changes is recommended.

We don't ignore invalid assignments (except in import-environment to some
extent), previous description was wrong.

For https://bugzilla.redhat.com/show_bug.cgi?id=1912046#c17.

(cherry picked from commit 82651d5b6b20ef959252e0a6845b906788235c70)
2021-02-02 14:52:53 +01:00
Lennart Poettering
a2f0da2de0 stat-util: don't try to open path on path_is_temporary_fs()
I mean, the old code at least used O_PATH, but still, we shouldn't
allocate/close an fd if we don't have to.

(cherry picked from commit 15308e5083391f6a1b9ce25c5b7323f37544eab8)
2021-02-02 14:52:53 +01:00
Luca Boccassi
7c63e5ed58 systemctl: have is-enabled return success for aliases when calling into pid1 too
commit 15d7ab87c4e5917f5788f1f8dce327a1e272bea3 introduced the
change to add an 'alias' state, but it was wired to systemctl
only when running in 'client-side' mode. Return success as
expected and documented also when running in 'server-mode'.

Fixes https://github.com/systemd/systemd/issues/18134

(cherry picked from commit bf3b428f73eb51f4abb64a80ea5be346b9eeb2fe)
2021-02-02 14:52:53 +01:00
Gaël PORTAY
d0b76f0738 man: fix path reference to unit file
The unit files are located at path /usr/lib/systemd/system.

This fixes the path reference to the unit file by adding the missing
path component system.

(cherry picked from commit 0215f04a7ebd1ab1da4b4279d5057953ae1ebcaa)
2021-02-02 14:52:53 +01:00
Gaël PORTAY
1f39070e40 docs: fix the link to boot loader specification
The boot loader specification link points to the boot loader interface
documentation.

This fixes the link to point to BOOT_LOADER_SPECIFICATION instead of
BOOTLOADER_INTERFACE which is itself.

(cherry picked from commit 7745379ea8c1d08ecde9ccd15af1a76cdac91cc5)
2021-02-02 14:52:53 +01:00
Yu Watanabe
b7db0461a6 network: fix possible memory leak
When set_put() returns 0, then already stored rule will be unref()ed
from Manager.

(cherry picked from commit fdce9324c7132a9a6d3b2fe9f8449dcfc8309114)
2021-02-02 14:52:53 +01:00
Yu Watanabe
310fd03e07 resolve: field size in dns resource record may be zero
(cherry picked from commit b652cccab9ed4091ec347f6e924be131105279e9)
2021-02-02 14:52:53 +01:00
Yu Watanabe
9401ed294d siphash: introduce siphash24_compress_safe()
(cherry picked from commit 0b71a7e01d8d04a3668c349e2320c42c786f2382)
2021-02-02 14:52:53 +01:00
Yu Watanabe
5cb414f8c5 fuzzers: set maximum length for several fuzzers
Hopefully fixes oss-fuzz#19081, oss-fuzz#21731, oss-fuzz#21755.
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19081
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=21731
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=21755

(cherry picked from commit 57dda0de3896e57f6d3f0625b2d5e13bbdb48d79)
2021-02-02 14:52:53 +01:00
Luca Boccassi
efa8f49344 shared/dns: fix dlopen_idn return code check
Fixes https://github.com/systemd/systemd/issues/18078

(cherry picked from commit 5def1f11f84fd4000a0f7c9ed1294b04f0cea703)
2021-02-02 14:52:53 +01:00
Dmitry Borodaenko
4032a13588 man/systemd-nspawn: document hashing machine name for uid base
Explicitly document the behavior introduced in #7437: when picking a new
UID shift base with "-U", a hash of the machine name will be tried
before falling back to fully random UID base candidates.

(cherry picked from commit 68709a636c838e0754b49caa6ff2d4168e3c99c8)
2021-02-02 14:52:53 +01:00
Yu Watanabe
5dd2b56443 udev: fix memleak
Fixes #18039.

(cherry picked from commit 9df1e11e31588c5df39aa7efed05414273f93f69)
2021-02-02 14:52:53 +01:00
Yu Watanabe
cefb123e8a journal-importer: ignore invalid field at one more place
Fixes oss-fuzz#28817.
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28817

(cherry picked from commit 8786d4bbe43b5f6493982bcb5211e010f99deb57)
2021-02-02 14:52:53 +01:00
Luca BRUNO
a580023f1d man/localtime: document default timezone
This explicitly documents the default `UTC` timezone which is used
by systemd and (other softwares) when `/etc/localtime` is not present.

Ref: https://github.com/systemd/systemd/blob/v247/src/basic/time-util.c#L1460-L1469
(cherry picked from commit 3d909037e3bb86bb14ceef98325b2759b938a4b3)
2021-02-02 14:52:53 +01:00
Florian Klink
14475e0e79 man/systemd.netdev: clarify the wireguard AllowedIPs= setting
`AllowedIPs=` only affects "routing inside the network interface
itself", as in, which wireguard peer packets with a specific destination
address are sent to, and what source addresses are accepted from which
peer.

To cause packets to be sent via wireguard in first place, a route via
that interface needs to be added - either in the `[Routes]` section on
the `.network` matching the wireguard interface, or outside of networkd.

This is a common cause of misunderstanding, because tools like wg-quick
also add routes to the interface. However, those tools are meant as a
"extremely simple script for easily bringing up a WireGuard interface,
suitable for a few common use cases (from their manpage).

Networkd also should support other usecases - like setting AllowedIPs to
0.0.0.0/0 and ::/0 and having a dynamic routing protocol setting more
specific routes (or the user manually setting them).

Reported-In: https://github.com/systemd/systemd/issues/14176
(cherry picked from commit c6b90e5c5e54e98b6aed38677f77d8491f2e49c8)
2021-02-02 14:52:53 +01:00
Yu Watanabe
2a76d510d9 logs-show: refuse data which contain invalid fields
(cherry picked from commit 805d67c565d57e0915162164f7e5e3026a29a2c5)
2021-02-02 14:52:52 +01:00
Yu Watanabe
2c53886b4f journal: refuse data which contain invalid fields
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=25353.

(cherry picked from commit f2bd032044ca3cd4b454dd0ba86719effcf34dc0)
2021-02-02 14:52:52 +01:00
Yu Watanabe
b7f69284f1 journal: move journal_field_valid() to journal_file.c
(cherry picked from commit adce225a104d0b7503aa7322db15d1c6dd8b8093)
2021-02-02 14:52:52 +01:00
Christian Ehrhardt
b7171ae4bd test: use modern qemu numa arguments
Upgrading to qemu 5.2 breaks TEST-36-NUMAPOLICY like:
  qemu-system-x86_64: total memory for NUMA nodes (0x0) should
  equal RAM size (0x20000000)

Use the new (as in >=2014) form of memdev in test 36:
 -object memory-backend-ram,id=mem0,size=512M -numa node,memdev=mem0,nodeid=0

Since some target systems are as old as qemu 1.5.3 (CentOS7) but the new
kind to specify was added in qemu 2.1 this needs to add version parsing and
add the argument only when qemu is >=5.2.

Fixes #17986.

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
(cherry picked from commit 43b49470d1f2808555c07f64cd0a1529b7ddd559)
2021-02-02 14:52:52 +01:00
Lennart Poettering
36bc4a18fd bus-util: improve logging when we can't connect to the bus
Previously, we'd already have explicit logging for the case where
$XDG_RUNTIME_DIR is not set. Let's also add some explicit logging for
the EPERM/ACCESS case. Let's also in both cases suggest the
--machine=<user>@.host syntax.

And while we are at it, let's remove side-effects from the macro.

By checking for both the EPERM/EACCES case and the $XDG_RUNTIME_DIR case
we will now catch both the cases where people use "su" to issue a
"systemctl --user" operation, and those where they (more correctly, but
still not good enough) call "su -".

Fixes: #17901
(cherry picked from commit 1ecb46724cae151606bc825f0e39f14d4dfe1a0e)
2021-02-02 14:52:52 +01:00
Lennart Poettering
a1b1ef65a4 sd-bus: make credential acquisition more graceful
So far when asked for augmented bus credentials and the process was
already gone we'd fail fatally. Let's make this graceful instead, and
never allow augmenting fail due to PID having vanished — unless the
augmenting is the explicit and only purpose of the requested operation.

This should be safe as clients have to explicitly query the acquired
creds anyway and handle if they couldn't be acquired. Moreover we
already handle permission problems gracefully, thus clients must be
ready to deal with missing creds.

This is useful to make selinux authorization work for short-lived client
proceses. PReviously we'd augment creds to have more info to log about
(the selinux decision would not be based on augmented data however,
because that'd be unsafe), and would fail if we couldn't get it. Now,
we'll try to acquire the data, but if we cannot acquire it, we'll still
do the selinux check, except that logging will be more limited.

(cherry picked from commit f8ecc2c00df7bd810557f3056ec12f6a0730812d)
2021-02-02 14:52:52 +01:00
Lennart Poettering
a62421591e sd-bus: 'ret' parameter to sd_bus_query_sender_creds() is not optional, check for it
(cherry picked from commit 1ca37419b13b836d7fb2b9815d5efb6dccc62134)
2021-02-02 14:52:52 +01:00
Florian Klink
242fc1d261 network: fix IPv6PrivacyExtensions=kernel handling
When set to "kernel", systemd is not supposed to touch that sysctl.

5e0534f1c13cd50ec2b143a8b18156cd37e502f7, part of
https://github.com/systemd/systemd/pull/17240 forgot to handle that
case.

Fixes https://github.com/systemd/systemd/issues/18003

(cherry picked from commit d3ccb1b4ba71b7bdf263aab8b1b17d1274d27a47)
2021-02-02 14:52:17 +01:00
Florian Klink
2ba904a2e5 network: fix typo
IPv6 privacy extensions are plural, not singular.

(cherry picked from commit 7eeaf72b88e43cb100763cec1db1b750928f2a1b)
2021-02-02 14:52:17 +01:00
Luca Boccassi
a22eef68c0 dissect: fix root hash signature autodiscovery
The root hash signature is auto discovered only if the root hash was specified
manually. Ensure that an auto discovered root hash is also enough.

(cherry picked from commit 90f989861e1f7fd4465a8dddd1721b54ecb3f273)
2021-02-02 14:51:36 +01:00
Jonathan G. Underwood
6fa5ec5a41 cryptsetup: add support for workqueue options
This commit adds support for disabling the read and write
workqueues with the new crypttab options no-read-workqueue
and no-write-workqueue. These correspond to the cryptsetup
options --perf-no_read_workqueue and --perf-no_write_workqueue
respectively.

(cherry picked from commit 227acf0009bde2cd7f8bc371615b05e84137847d)
2020-12-30 15:23:33 +01:00
Zbigniew Jędrzejewski-Szmek
4275f1c95e test-login: skip consistency checks when logind is not active
There are two ways in swich sd_login_* functions acquire data:
some are derived from the cgroup path, but others use the data serialized
by logind.

When the tests are executed under Fedora's mock, without systemd-spawn
but instead in a traditional chroot, test-login gets confused:
the "outside" cgroup path is visible, so sd_pid_get_unit() and
sd_pid_get_session() work, but sd_session_is_active() and other functions
that need logind data fail.

Such a buildroot setup is fairly bad, but it can be encountered in the wild, so
let's just skip the tests in that case.

/* Information printed is from the live system */
sd_pid_get_unit(0, …) → "session-237.scope"
sd_pid_get_user_unit(0, …) → "n/a"
sd_pid_get_slice(0, …) → "user-1000.slice"
sd_pid_get_session(0, …) → "237"
sd_pid_get_owner_uid(0, …) → 1000
sd_pid_get_cgroup(0, …) → "/user.slice/user-1000.slice/session-237.scope"
sd_uid_get_display(1000, …) → "(null)"
sd_uid_get_sessions(1000, …) → [0] ""
sd_uid_get_seats(1000, …) → [0] ""
Assertion 'r >= 0' failed at src/libsystemd/sd-login/test-login.c:104, function test_login(). Aborting.

(cherry picked from commit ac5644635dba54ce5eb0ff394fc0bc772a984849)
2020-12-16 18:23:40 +01:00
shenyangyang4
937118a5b2 journalctl: don't skip the entries that have the same seqnum
These two judgement can't judge that two entries are repeating fully.
So i think seqnum is needed to make full judgement.

(cherry picked from commit b17f651a17cd6ec0ceac7835f2f8607fbd9ddb95)
v247.2
2020-12-16 14:31:40 +01:00
Lennart Poettering
e017ac6a26 sd-bus: use SOCK_CLOEXEC on one more socket
(cherry picked from commit 68a3d9153883b90c99ea2aec20075146ce58beaa)
2020-12-16 14:31:40 +01:00
Ondrej Mosnacek
db31432861 resolved: create stub-resolv.conf symlink with correct security label
Use symlink_atomic_label() instead of symlink_atomic() as the symlink
may need a different label than the parent directory.

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
(cherry picked from commit 7b87bece5ded3e8f068df8402901198c069ab5cf)
2020-12-16 14:31:40 +01:00
Andrew Balmos
f2ec15e2e5 efi: Only use arm flags if supported
Support gcc 8 on arm

(cherry picked from commit 361f41645cdf920d431e2d68dcfa3f98088c2e03)
2020-12-16 14:31:40 +01:00
Yu Watanabe
cd43eee770 core: detect_container() may return negative errno
(cherry picked from commit bcdb3b7d5076cf6ad17cb70df8db22d876880ada)
2020-12-16 14:31:40 +01:00
Khem Raj
04be042a1f meson: Fix reallocarray check
reallocarray() is defined in stdlib.h, so that would be right header to
check for its presense.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 5bb20fd3d33f7e866a0845f15c1ab5b595147f1e)
2020-12-16 14:31:40 +01:00
Yu Watanabe
5e906f483b network: do not assume address ready callback is always set to static addresses
(cherry picked from commit b788a429d19acda8acb1c4b543da1adc2e49f4a9)
2020-12-16 14:31:40 +01:00
Yu Watanabe
2ad7a2a96a network: drop assertions to check link state in netlink callback handlers
As, the link may be dropped while configuring addresses or routes.

Fixes #17920.

(cherry picked from commit b2219cc4b6a2832c29eb82e90625d9c6ac61e73c)
2020-12-16 14:31:40 +01:00
Yu Watanabe
f375c8cbb5 network: do not reconfigure interface when the link gains carrier but udev not initialized it yet
When an interface gains carrier but udev have not initialized the
interface or link_initialized_handler() has not been called yet,
then link_configure will be called twice. Thus LLDP client will be
configured twice, and triggers assertion.

Fixes #17929.

(cherry picked from commit 8bceafa7771800c8bdfc1b74ef39824103f5c129)
2020-12-16 14:31:40 +01:00
Lennart Poettering
5d4909decf veritysetup: also place udev socket dep
In light of #17848, also place udev socket dep in veritysetup, it's the
same issue after all.

(cherry picked from commit 8374bf4fa2663b19f329801abfd8b29e66897380)
2020-12-16 14:31:40 +01:00
Jinyuan Si
57ddb74245 cryptsetup: Fix crypto device missing issue after bootup
Normally, the udev rules operate on "change" events. But when
coldplugging, there's an "add" event present. The udev rules have to
recognize this and do some actions in this particular situation, too.
Also, we don't want the nodes to be created prematurely on "add"
events while not coldplugging. The udev rules will check
DM_UDEV_PRIMARY_SOURCE_FLAG to see if the device was activated
correctly before and if not, it ignore the "add" event totally.
This way the udev rules can support udev triggers generating "add"
events (e.g. "udevadm trigger --action=add" or
"echo add > /sys/block/<dm_device>/uevent").

In this case, the udevd service is started after
systemd-cryptsetup@config.service, is started, which will cause udevd
service to miss the "change" uevent with DM_UDEV_PRIMARY_SOURCE_FLAG
flag generated by systemd-cryptsetup@config.service. To solve this
issue, we let the cryptsetup service be started after the udevd
service.

(cherry picked from commit 239952e890fd4b53859f84bbc43d910e68a8f6bc)
2020-12-16 14:31:40 +01:00
Yu Watanabe
d3c224d441 network: fix SIGABRT related to unreachable route with DHCP6
After #17834, unreachable routes generated through DHCP6 are managed by
Manager. But they are referrenced by the DHCP6 uplink. So, the routes
managed by Manager must be freed after all Link objects are freed.

Follow-up for 575f14eef010101c60e9d4d970e542c815be1994.

Fixes SIGABRT reproted in #17831.

(cherry picked from commit 450fa34bd0315f2ca4728050b37c3a3d9e0f1b78)
2020-12-16 14:31:40 +01:00
Yu Watanabe
c91648cc83 network: revert previous changes to address_compare_func()
This partially reverts fe841414ef157f7f01d339c5d5730126e7b5fe0a and
2a236f9fc0ff8fb2152032551436fde74da7217a.

For IPv4, kernel compares the local address, prefix, and prefixlen.
For IPv6, kernel compares only the local address.
Let's follow the kernel's comparison way.

Fixes #17831.

(cherry picked from commit 1d30fc5cb64ecba2f03fe42aa0d8c65c3decad82)
2020-12-16 14:31:40 +01:00
Takashi Iwai
d8b5d8c8c3 udev: Fix sound.target dependency
The recent bug report indicated a race at device creation and the
sound.target dependencies, and the cause turned out to be the condition
of the sound.target trigger.  Currently it's set for "card*", but this
is actually the parent object; i.e. the sound.target is triggered before
the sound devices are created.

For assuring the whole sound device creations beforehand, we need to use
"controlC*" instead of "card*"; as already described in
78-sound-card.rules, this is guaranteed to be the last device, and can
be used as a synchronization point.

BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1179363
Signed-off-by: Takashi Iwai <tiwai@suse.de>
(cherry picked from commit 5926e592fa5e6290b9f4588939945869adb5c55f)
2020-12-16 14:31:40 +01:00
Luca Boccassi
669107ae68 meson: specify correct libqrencode version in meson dep
(cherry picked from commit a6c7811f0d3888e2fa545cd80d7815049b5cb084)
2020-12-16 14:31:40 +01:00
Franck Bui
c07dc6cedc udev: link_update() should fail if the entry in symlink dir couldn't have been created
Follow-up for 30f6dce62cb3a738b20253f2192270607c31b55b

(cherry picked from commit 4e1db59274c4b31ba5369270a489420245616eb4)
2020-12-16 14:31:40 +01:00
Lennart Poettering
367006c806 man: document that automount units are privileged
Fixes: #17886
(cherry picked from commit eef34a1d8fe5ca44bdab189b682642096c53e661)
2020-12-16 14:31:40 +01:00
Lennart Poettering
5129808141 logind: fix closing of button input devices
This is a fix of #17751. Specifically:

1. Sort #include headers again

2. Remove tabs, as per coding style

3. Don't install fds in half-initialized objects

4. Use asynchronous_close() everywhere

That all said:

Quit frankly, I am not convinced we should do all this at all. If
close()ing of these input devices is really that slow, then this should
probably be fixed in the kernel, not worked around in userspace like
this.

(cherry picked from commit c74d5fe25d53263c143f0a9c2698d8bb483e398c)
2020-12-16 14:31:40 +01:00
nihilix-melix
37f06c91ef Update logind-button.c
(cherry picked from commit eee582e7951fa8e328d1fcdfcff940254070ccba)
2020-12-16 14:31:40 +01:00
Lennart Poettering
9e9fda0a2d async: add trivial cleanup wrapper for asynchronous_close()
(cherry picked from commit 1d9aa4d572b661fd6500c55ab524141332f76230)
2020-12-16 14:31:40 +01:00
Daan De Meyer
4a2ca1ca4a Silence cgroups v1 read-only filesystem warning
Avoid warning messages when booting systemd-nspawn containers and using
hybrid or legacy cgroups. systemd-nspawn mounts the cgroups v1 controller
tree as read-only so these errors are expected and not problematic.
Partially fixes #17862.

Test plan:

- Before: `mkosi --default .mkosi/mkosi.fedora boot`

```
‣ Processing default...
Spawning container image on /home/daan/projects/systemd/image.raw.
Press ^] three times within 1s to kill container.
systemd 247 running in system mode. (+PAM +AUDIT +SELINUX -APPARMOR +IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
Detected virtualization systemd-nspawn.
Detected architecture x86-64.

Welcome to Fedora 33 (Thirty Three)!

Queued start job for default target Graphical Interface.
-.slice: Failed to migrate controller cgroups from , ignoring: Read-only file system
system.slice: Failed to delete controller cgroups /system.slice, ignoring: Read-only file system
[  OK  ] Created slice system-getty.slice.
[  OK  ] Created slice system-modprobe.slice.
user.slice: Failed to delete controller cgroups /user.slice, ignoring: Read-only file system
[  OK  ] Created slice User and Session Slice.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Reached target Local Encrypted Volumes.
[  OK  ] Reached target Paths.
[  OK  ] Reached target Remote File Systems.
[  OK  ] Reached target Slices.
[  OK  ] Reached target Swap.
[  OK  ] Listening on Process Core Dump Socket.
[  OK  ] Listening on initctl Compatibility Named Pipe.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket.
[  OK  ] Listening on User Database Manager Socket.
dev-hugepages.mount: Failed to delete controller cgroups /dev-hugepages.mount, ignoring: Read-only file system
         Mounting Huge Pages File System...
sys-fs-fuse-connections.mount: Failed to delete controller cgroups /sys-fs-fuse-connections.mount, ignoring: Read-only file system
         Mounting FUSE Control File System...
         Starting Journal Service...
         Starting Remount Root and Kernel File Systems...
system.slice: Failed to delete controller cgroups /system.slice, ignoring: Read-only file system
```

After: `mkosi --default .mkosi/mkosi.fedora boot`

```
‣ Processing default...
Spawning container image on /home/daan/projects/systemd/mkosi.output/image.raw.
Press ^] three times within 1s to kill container.
systemd 247 running in system mode. (+PAM +AUDIT +SELINUX -APPARMOR +IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
Detected virtualization systemd-nspawn.
Detected architecture x86-64.

Welcome to Fedora 33 (Thirty Three)!

Queued start job for default target Graphical Interface.
[  OK  ] Created slice system-getty.slice.
[  OK  ] Created slice system-modprobe.slice.
[  OK  ] Created slice User and Session Slice.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Reached target Local Encrypted Volumes.
[  OK  ] Reached target Paths.
[  OK  ] Reached target Remote File Systems.
[  OK  ] Reached target Slices.
[  OK  ] Reached target Swap.
[  OK  ] Listening on Process Core Dump Socket.
[  OK  ] Listening on initctl Compatibility Named Pipe.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket.
[  OK  ] Listening on User Database Manager Socket.
         Mounting Huge Pages File System...
         Mounting FUSE Control File System...
         Starting Journal Service...
         Starting Remount Root and Kernel File Systems...
[  OK  ] Mounted Huge Pages File System.
[  OK  ] Mounted FUSE Control File System.
[  OK  ] Finished Remount Root and Kernel File Systems.
         Starting Create Static Device Nodes in /dev...
[  OK  ] Finished Create Static Device Nodes in /dev.
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Reached target Local File Systems.
         Starting Restore /run/initramfs on shutdown...
[  OK  ] Finished Restore /run/initramfs on shutdown.
[  OK  ] Started Journal Service.
         Starting Flush Journal to Persistent Storage...
[  OK  ] Finished Flush Journal to Persistent Storage.
         Starting Create Volatile Files and Directories...
[  OK  ] Finished Create Volatile Files and Directories.
         Starting Network Name Resolution...
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Finished Update UTMP about System Boot/Shutdown.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target Timers.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting Home Area Manager...
         Starting User Login Management...
         Starting Permit User Sessions...
[  OK  ] Finished Permit User Sessions.
[  OK  ] Started Console Getty.
[  OK  ] Reached target Login Prompts.
         Starting D-Bus System Message Bus...
[  OK  ] Started D-Bus System Message Bus.
[  OK  ] Started Home Area Manager.
[  OK  ] Started User Login Management.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Finished Update UTMP about System Runlevel Changes.
[  OK  ] Started Network Name Resolution.
[  OK  ] Reached target Host and Network Name Lookups.

Fedora 33 (Thirty Three) (built from systemd tree)
Kernel 5.9.11-arch2-1 on an x86_64 (console)
```

(cherry picked from commit ecd3c86b60655d892f5ec68549226cc5fa4be818)
2020-12-16 14:31:40 +01:00
Michael Marley
ed1f8f4ba2 manager: Fix HW watchdog when systemd starts before driver loaded
When manager_{set|override}_watchdog is called, set the watchdog timeout
regardless of whether the hardware watchdog was successfully initialized.  If
the watchdog was requested but could not be initialized, then instead of
pinging it, attempt to initialize it again.  This ensures that the hardware
watchdog is initialized even if the kernel module for it isn't loaded when
systemd starts (which is quite likely, unless it is compiled in).

This builds on work by @danc86 in https://github.com/systemd/systemd/pull/17460,
but fixes the issue of not updating the watchdog timeout with the actual value
from the hardware.

Fixes https://github.com/systemd/systemd/issues/17838

Co-authored-by: Dan Callaghan <djc@djc.id.au>
Co-authored-by: Michael Marley <michael@michaelmarley.com>
(cherry picked from commit 61927b9f116bf45bfdbf19dc2981d4a4f527ae5f)
2020-12-16 14:31:40 +01:00