]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 years agojournal-upload: use mfree() 27774/head
David Tardon [Wed, 24 May 2023 12:27:27 +0000 (14:27 +0200)] 
journal-upload: use mfree()

2 years agotree-wide: use free_and_str*dup() more
David Tardon [Wed, 24 May 2023 12:47:36 +0000 (14:47 +0200)] 
tree-wide: use free_and_str*dup() more

2 years agotree-wide: use free_and_replace() more
David Tardon [Wed, 24 May 2023 12:21:04 +0000 (14:21 +0200)] 
tree-wide: use free_and_replace() more

2 years agocore/slice: shorten code a bit
Yu Watanabe [Tue, 23 May 2023 21:24:11 +0000 (06:24 +0900)] 
core/slice: shorten code a bit

2 years agoelf2efi: Do not emit an empty relocation section
Jan Janssen [Tue, 23 May 2023 17:00:52 +0000 (19:00 +0200)] 
elf2efi: Do not emit an empty relocation section

At least shim will choke on an empty relocation section when loading the
binary. Note that the binary is still considered relocatable (just with
no base relocations to apply) as we do not set the
IMAGE_FILE_RELOCS_STRIPPED DLL characteristic.

2 years agocore: Do not check child freezability when thawing slice
msizanoen1 [Tue, 23 May 2023 11:46:26 +0000 (18:46 +0700)] 
core: Do not check child freezability when thawing slice

We want thawing operations to still succeed even in the presence of an
unfreezable unit type (e.g. mount) appearing under a slice after the
slice was frozen. The appearance of such units should never cause the
slice thawing operation to fail to prevent potential future repeats of
https://github.com/systemd/systemd/issues/25356.

2 years agoMerge pull request #27755 from keszybz/fix-root-resize-new
Yu Watanabe [Tue, 23 May 2023 21:08:54 +0000 (06:08 +0900)] 
Merge pull request #27755 from keszybz/fix-root-resize-new

Reload keymap and locale config after firstboot writes it out

2 years agoMerge pull request #27754 from poettering/cloexec-fdset-madness
Yu Watanabe [Tue, 23 May 2023 21:08:17 +0000 (06:08 +0900)] 
Merge pull request #27754 from poettering/cloexec-fdset-madness

pid1: when taking possession of passed fds check O_CLOEXEC state first

2 years agosd-boot,sd-stub: also print version after the address
Zbigniew Jędrzejewski-Szmek [Fri, 19 May 2023 15:18:41 +0000 (17:18 +0200)] 
sd-boot,sd-stub: also print version after the address

The kernel, systemd, and many other things print their version during boot.
sd-boot and sd-stub are also important, so let's print the version if EFI_DEBUG.
(If !EFI_DEBUG, continue to be quiet.)

When updating the docs, I saw that that the text in HACKING.md was out of date.
Instead of trying to update the instructions there, make it shorter and refer
the reader to tools/debug-sd-boot.sh for details.

2 years agomkfs-util: Silence noisy warning from mkfs.btrfs
Daan De Meyer [Tue, 23 May 2023 10:16:53 +0000 (12:16 +0200)] 
mkfs-util: Silence noisy warning from mkfs.btrfs

2 years agotest: test O_CLOEXEC filtering of fdset fill logic 27754/head
Lennart Poettering [Tue, 23 May 2023 16:39:53 +0000 (18:39 +0200)] 
test: test O_CLOEXEC filtering of fdset fill logic

2 years agofdset: minor modernizations
Lennart Poettering [Tue, 23 May 2023 18:45:40 +0000 (20:45 +0200)] 
fdset: minor modernizations

2 years agotree-wide: Fix false positives on newer gcc
Daan De Meyer [Tue, 23 May 2023 11:25:58 +0000 (13:25 +0200)] 
tree-wide: Fix false positives on newer gcc

Recent gcc versions have started to trigger false positive
maybe-uninitialized warnings. Let's make sure we initialize
variables annotated with _cleanup_ to avoid these.

2 years agojson: correctly handle magic strings when parsing variant strv
Frantisek Sumsal [Tue, 23 May 2023 07:55:17 +0000 (09:55 +0200)] 
json: correctly handle magic strings when parsing variant strv

We can't dereference the variant object directly, as it might be
a magic object (which has an address on a faulting page); use
json_variant_is_sensitive() instead that handles this case.

For example, with an empty array:

==1547789==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000023 (pc 0x7fd616ca9a18 bp 0x7ffcba1dc7c0 sp 0x7ffcba1dc6d0 T0)
==1547789==The signal is caused by a READ memory access.
==1547789==Hint: address points to the zero page.
SCARINESS: 10 (null-deref)
    #0 0x7fd616ca9a18 in json_variant_strv ../src/shared/json.c:2190
    #1 0x408332 in oci_args ../src/nspawn/nspawn-oci.c:173
    #2 0x7fd616cc09ce in json_dispatch ../src/shared/json.c:4400
    #3 0x40addf in oci_process ../src/nspawn/nspawn-oci.c:428
    #4 0x7fd616cc09ce in json_dispatch ../src/shared/json.c:4400
    #5 0x41fef5 in oci_load ../src/nspawn/nspawn-oci.c:2187
    #6 0x4061e4 in LLVMFuzzerTestOneInput ../src/nspawn/fuzz-nspawn-oci.c:23
    #7 0x40691c in main ../src/fuzz/fuzz-main.c:50
    #8 0x7fd61564a50f in __libc_start_call_main (/lib64/libc.so.6+0x2750f)
    #9 0x7fd61564a5c8 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x275c8)
    #10 0x405da4 in _start (/home/fsumsal/repos/@systemd/systemd/build-san/fuzz-nspawn-oci+0x405da4)

DEDUP_TOKEN: json_variant_strv--oci_args--json_dispatch
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV ../src/shared/json.c:2190 in json_variant_strv
==1547789==ABORTING

Or with an empty string in an array:

../src/shared/json.c:2202:39: runtime error: member access within misaligned address 0x000000000007 for type 'struct JsonVariant', which requires 8 byte alignment
0x000000000007: note: pointer points here
<memory cannot be printed>
    #0 0x7f35f4ca9bcf in json_variant_strv ../src/shared/json.c:2202
    #1 0x408332 in oci_args ../src/nspawn/nspawn-oci.c:173
    #2 0x7f35f4cc09ce in json_dispatch ../src/shared/json.c:4400
    #3 0x40addf in oci_process ../src/nspawn/nspawn-oci.c:428
    #4 0x7f35f4cc09ce in json_dispatch ../src/shared/json.c:4400
    #5 0x41fef5 in oci_load ../src/nspawn/nspawn-oci.c:2187
    #6 0x4061e4 in LLVMFuzzerTestOneInput ../src/nspawn/fuzz-nspawn-oci.c:23
    #7 0x40691c in main ../src/fuzz/fuzz-main.c:50
    #8 0x7f35f364a50f in __libc_start_call_main (/lib64/libc.so.6+0x2750f)
    #9 0x7f35f364a5c8 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x275c8)
    #10 0x405da4 in _start (/home/fsumsal/repos/@systemd/systemd/build-san/fuzz-nspawn-oci+0x405da4)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../src/shared/json.c:2202:39 in

Note: this happens only if json_variant_copy() in json_variant_set_source() fails.

Found by Nallocfuzz.

2 years agopid1: when taking possession of passed fds check O_CLOEXEC state first
Lennart Poettering [Tue, 23 May 2023 15:24:46 +0000 (17:24 +0200)] 
pid1: when taking possession of passed fds check O_CLOEXEC state first

So here's the thing. One library we use (libselinux) is opening fds
behind our back when we initialize it and keeps it open. On the other
hand we want to automatically pick up all fds passed in to us, so that
we can distribute them to our services and close the rest. We pick them
up very early in our code, to ensure that we don't get confused by open
fds at that point. Except that libselinux insists on being initialized
even earlier. So suddenly we might take possession of libselinux' fds,
and then close them later when we decide no service wants them. Then
during shutdown we close down selinux and selinux closes its fds, but
since already closed long ago this ight close our fds instead. Hilarity
ensues.

I wish low-level software wouldn't do such things behind our back, but
well, let's make the best of it.

This changes the fd pick-up logic to only pick up fds that have
O_CLOEXEC unset. O_CLOEXEC must be unset for any fds passed in to us
over execve() after all. And for all our own fds we should set O_CLOEXEC
since we generally don't want to litter fd tables for execve(). Also,
libselinux thankfully appears to set O_CLOEXEC correctly on its fds,
hence the filter works.

Fixes: #27491
2 years agolog: propagate max log level into glibc's setlogmask()
Lennart Poettering [Tue, 23 May 2023 07:27:01 +0000 (09:27 +0200)] 
log: propagate max log level into glibc's setlogmask()

Follow-up for: #27734

It makes sense to propagate the select log level we maintain also into
glibc, so that any code that uses syslog() directly that ends up in our
processes (libraries and such) are affected by our settings the same way
as we are ourselves.

2 years agoudevadm: improve debug logging when triggering/watching events
Lennart Poettering [Tue, 23 May 2023 07:29:57 +0000 (09:29 +0200)] 
udevadm: improve debug logging when triggering/watching events

Let's make debugging udev triggering a bit easier, by generating debug
log messages whenever we trigger a device, and also when we see the
event in pid1.

2 years agoMerge pull request #27750 from keszybz/fix-root-resize-new
Lennart Poettering [Tue, 23 May 2023 16:53:13 +0000 (09:53 -0700)] 
Merge pull request #27750 from keszybz/fix-root-resize-new

Allow firstboot.service to be started after sysusers.service

2 years agolocaled: simplify method call 27755/head
Zbigniew Jędrzejewski-Szmek [Tue, 23 May 2023 14:36:14 +0000 (16:36 +0200)] 
localed: simplify method call

Also remove lines between call and result handling.

2 years agofirstboot: reload manager after writing /etc/locale.conf
Zbigniew Jędrzejewski-Szmek [Tue, 23 May 2023 15:32:49 +0000 (17:32 +0200)] 
firstboot: reload manager after writing /etc/locale.conf

Requested in https://github.com/systemd/systemd/pull/27750#issuecomment-1559258861.
I didn't apply the locale configuration in firstboot itself, because
we don't have any localized messages, so that wouldn't change anything.

2 years agofirstboot: do vconsole setup after configuring keymap
Zbigniew Jędrzejewski-Szmek [Tue, 23 May 2023 14:35:54 +0000 (16:35 +0200)] 
firstboot: do vconsole setup after configuring keymap

Fixes #13466.

2 years agofirstboot: process the root account after sysusers created it 27750/head
Zbigniew Jędrzejewski-Szmek [Mon, 3 Oct 2022 10:12:15 +0000 (12:12 +0200)] 
firstboot: process the root account after sysusers created it

We would create root account from sysusers or from firstboot, depending on
which one ran earlier. Since firstboot offers more options, in particular can
set the root password, we needed to order it earlier. This created an ugly
ordering requirement:

systemd-sysusers.service > systemd-firstboot.service > ... >
  systemd-remount-fs.service > systemd-tmpfiles-setup-dev.service >
  systemd-sysusers.service

We want sysusers.service to create basic users, so we can create nodes in dev,
so we can operate on block devices and such, so that we can resize and remount
things. But at the same time, systemd-firstboot.service can only work if it is
run early, before systemd-sysusers.service has created /etc/passwd. We can't
have it both ways: the units that want to have a fully writable root file
system cannot be ordered before units which are required to do file system
preparation.

Instead of trying to order firstboot very early, let's let it do its thing even
if it is started later. Instead of refusing to create to the root account if
/etc/passwd and /etc/shadow exist, actually check if the account is configured.
Now sysusers writes root account with password PASSWORD_UNPROVISIONED
("!unprovisioned"), and then firstboot checks for this, and will configure root
in this case.

This allows sysusers to be executed earlier (or accounts to be set up earlier
in another way).

This effectively reverts b825ab1a99b69956057c79838faaf7b44afee474.

2 years agoshared/condition: add envvar override for the check for first-boot
Zbigniew Jędrzejewski-Szmek [Thu, 13 Oct 2022 12:05:01 +0000 (14:05 +0200)] 
shared/condition: add envvar override for the check for first-boot

Before 7cd43e34c5a302ff323c013f437092d2ff5ccbbf, it was possible to use
SYSTEMD_PROC_CMDLINE=systemd.condition-first-boot to override autodetection.
But now this doesn't work anymore, and it's useful to be able to do that for
testing.

2 years agosysusers: fix argument confusion in error message
Zbigniew Jędrzejewski-Szmek [Thu, 13 Oct 2022 12:51:28 +0000 (14:51 +0200)] 
sysusers: fix argument confusion in error message

Bug introduced in 335f6ab4f13abcd8073fe84f2a3c70c67271126e. pw/sp are totally
wrong in this context, most likely NULL.

2 years agosysusers: add usual "ret_" prefix, fix messages
Zbigniew Jędrzejewski-Szmek [Thu, 13 Oct 2022 11:39:17 +0000 (13:39 +0200)] 
sysusers: add usual "ret_" prefix, fix messages

We had 'make backup x'. 'make backup of x' would be correct, but 'backup x' is
shorter and to the point.

2 years agounits: create /dev with --graceful first, allow sysusers to run later
Zbigniew Jędrzejewski-Szmek [Sun, 9 Oct 2022 17:02:27 +0000 (19:02 +0200)] 
units: create /dev with --graceful first, allow sysusers to run later

We want to call systemd-tmpfiles-setup-dev.service to create /dev/fuse and
other device nodes so that module probing will work. But it is possible that
when we're in first boot, some users or groups need to be created by
systemd-sysusers first. But it is also possible that systemd-sysusers cannot
actually execute configuration because the root partition is not fully writable
yet. So let systemd-tmpfiles-setup-dev.service run earlier, possibly without
all users and groups in place. Since systemd-tmpfiles-setup-dev.service writes
to /dev only, it doesn't care how the root partition is mounted. In this early
run, some some nodes might be created with default permissions (i.e. not
accessible to non-root users or groups). This should be OK for the early boot
phase. Afterwards, we let systemd-tmpfiles-setup.service execute full
configuration. We will configure any files in /dev twice, but considering that
there's only a few of them and that the second run should only adjust ownership
and permissions, this should be OK. This way, we avoid the dependency loop.

2 years agoman: extend description of --boot
Zbigniew Jędrzejewski-Szmek [Sun, 9 Oct 2022 16:58:01 +0000 (18:58 +0200)] 
man: extend description of --boot

2 years agorepart: do not require /var/tmp if not used
Zbigniew Jędrzejewski-Szmek [Tue, 23 May 2023 10:28:55 +0000 (12:28 +0200)] 
repart: do not require /var/tmp if not used

If systemd-repart is running sufficiently early, /var/tmp might not be in place
yet. But if there is nothing to minimize, we won't even use it. Let's move the
check right before the first use.

systemd-repart[441]: Device '/' has no dm-crypt/dm-verity device, no need to look for…
systemd-repart[441]: Device /dev/sda opened and locked.
systemd-repart[441]: Sector size of device is 512 bytes. Using grain size of 4096.
systemd-repart[441]: Could not determine temporary directory: No such file or directory
systemd[1]: systemd-repart.service: Child 441 belongs to systemd-repart.service.
systemd[1]: systemd-repart.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: systemd-repart.service: Failed with result 'exit-code'.

2 years agotmpfiles: add --graceful
Zbigniew Jędrzejewski-Szmek [Sun, 9 Oct 2022 16:57:25 +0000 (18:57 +0200)] 
tmpfiles: add --graceful

See the man page diff for description.

2 years agobasic/user-util: return -ESRCH if passwd/group are missing
Zbigniew Jędrzejewski-Szmek [Tue, 23 May 2023 10:07:13 +0000 (12:07 +0200)] 
basic/user-util: return -ESRCH if passwd/group are missing

2 years agosd-bus: refuse to send messages with an invalid string
Yu Watanabe [Thu, 18 May 2023 19:33:39 +0000 (04:33 +0900)] 
sd-bus: refuse to send messages with an invalid string

Prompted by aaf7b0e41105d7b7cf30912cdac32820f011a219 and
4804da58536ab7ad46178a03f4d2da49fd8e4ba2.

2 years agotmpfiles: align table
Zbigniew Jędrzejewski-Szmek [Sun, 9 Oct 2022 16:36:43 +0000 (18:36 +0200)] 
tmpfiles: align table

2 years agofirstboot: clarify that machine-id options are only offline, add missing docs
Zbigniew Jędrzejewski-Szmek [Mon, 3 Oct 2022 09:04:24 +0000 (11:04 +0200)] 
firstboot: clarify that machine-id options are only offline, add missing docs

Let's flat out refuse to configure machine-id on a running system with
systemd-firstboot. It wouldn't work anyway, because by the time firstboot is
started, pid1 has created /etc/machine-id, possibly with "unitialized", so
firstboot wouldn't touch the file. (If --force is specified, it works. So
let's allow that in case people want to do crazy things.)

While at it, add missing descriptions of various things that were added over
time, and group descriptions of similar options together.

2 years agounits: make sure proc-sys-binfmt_misc.automount is actually stopped
Zbigniew Jędrzejewski-Szmek [Fri, 30 Sep 2022 14:05:54 +0000 (16:05 +0200)] 
units: make sure proc-sys-binfmt_misc.automount is actually stopped

As with other units, stopping of the automount requires actual work,
and without the ordering dependency systemd might not execute the stop
job before shutdown.target is reached and units ordered after that are
executed.

2 years agounits/systemd-repart: stop pretending that root config is executed in the initrd
Zbigniew Jędrzejewski-Szmek [Thu, 15 Sep 2022 14:12:05 +0000 (16:12 +0200)] 
units/systemd-repart: stop pretending that root config is executed in the initrd

I have a system with /usr/lib/repart.d/50-root.conf with GrowFileSystem=yes.
The partition wouldn't be resized in the initrd, because
ConditionDirectoryNotEmpty=|/sysusr/usr/lib/repart.d was evaluated very early,
before /sysroot was mounted. There was no ordering dependency between
systemd-repart.service and sysroot.mount. (There was After=initrd-usr-fs.target,
but it seems to be only referred to by systemd-fstab-generator, which in my
case doesn't even run, because there's no fstab.)

But in fact, we neeed to run systemd-repart in the initrd only in limited
circumstances: when we need to create the root device based on config under
sysusr.mount. If there is config on the root device, it can be executed in
the host system, early during boot. Thus, let's remove the condition on
/sysroot/…. Without an ordering dependency on sysroot.mount, it was subject to
a race condition anyway. (A race condition with a low probability of "winning",
because systemd-repart.service has no dependencies, but sysroot.mount requires
a device to be detected and the mount to happen.)

The other problem was that systemd-repart.service didn't have the ordering wrt.
initrd-switch-root.target, so it was subject to the same race condition that
was fixed for other units in 7c0e2b555968d70ac563a37e32a6931ee90961a6. (If the
systemd-repart.service/stop job is slow, we could end up not restarting
systemd-repart.service in the host system.)

With the changes here, I see systemd-repart.service/start running twice:
in the initrd it is skipped because the conditions fail, and then in the
host system it runs normally.

Note: support for /sysroot is retained in systemd-repart code. I don't see a
strong reason to remove it, since it may still be useful to people invoking
repart in the initrd in other circumstances.

2 years agoshared/generator: apply similar config reordering of generated units
Zbigniew Jędrzejewski-Szmek [Wed, 28 Sep 2022 11:38:56 +0000 (13:38 +0200)] 
shared/generator: apply similar config reordering of generated units

2 years agounits: do more reordering of ordering config
Zbigniew Jędrzejewski-Szmek [Thu, 15 Sep 2022 13:54:18 +0000 (15:54 +0200)] 
units: do more reordering of ordering config

No functional change, just a cleanup to make the subsequent changes easier to
see. This is a continuation of 9810e419425263bde86787bc21251f1ad3c35628

> The block is reordered and split to have:
>    1. description + documentation
>    2. (optionally) conditions
>    3. all the dependencies

The dependencies for shutdown.target are listed separately because they are the
other deps are for startup, and shutdown.target only matter much later.

2 years agoupdate TODO
Lennart Poettering [Tue, 23 May 2023 09:02:22 +0000 (11:02 +0200)] 
update TODO

2 years agonetworkctl: fix a potential memory leak
Frantisek Sumsal [Mon, 22 May 2023 17:59:19 +0000 (19:59 +0200)] 
networkctl: fix a potential memory leak

Resolves: CID#1512516
Follow-up to 96bab8fd63.

2 years agocore/service: when resetting PID also reset known flag
Michal Sekletar [Mon, 22 May 2023 15:44:30 +0000 (17:44 +0200)] 
core/service: when resetting PID also reset known flag

Re-watching pids on cgroup v1 (needed because of unreliability of cgroup
empty notifications in containers) is handled bellow at the end of
service_sigchld_event() and depends on value main_pid_known flag.

In CentOS Stream 8 container on cgroup v1 the stop action would get stuck
indefinitely on unit like this,

$ cat /run/systemd/system/foo.service
[Service]
ExecStart=/bin/bash -c 'trap "nohup sleep 1 & exit 0" TERM;  sleep infinity'
ExecStop=/bin/bash -c 'kill -s TERM $MAINPID'
TimeoutSec=0

However, upstream works "fine" because in upstream version of systemd we
actually never wait on processes killed in containers and proceed
immediately to sending SIGKILL hence re-watching of pids in the cgroup
is not necessary. But for the sake of correctness we should merge the
patch also upstream.

2 years agoMerge pull request #27739 from dtardon/test-session-properties
Luca Boccassi [Mon, 22 May 2023 22:55:25 +0000 (23:55 +0100)] 
Merge pull request #27739 from dtardon/test-session-properties

Add a test for org.freedesktop.logind1.Session SetIdleHint

2 years agomkosi: Make sure persistent journal storage is enabled
Daan De Meyer [Mon, 22 May 2023 11:33:01 +0000 (13:33 +0200)] 
mkosi: Make sure persistent journal storage is enabled

We ship with empty /var, so /var/log/journal does not exist, which
means journald does not do persistent logging. Let's fix that by
setting the config to explicitly enable persistent logging.

2 years agorepart: Default to vfat for ESP/XBOOTLDR partitions
Daan De Meyer [Mon, 22 May 2023 17:32:18 +0000 (19:32 +0200)] 
repart: Default to vfat for ESP/XBOOTLDR partitions

vfat makes a lot more sense than ext4 for these partitions.

2 years agoMerge pull request #27733 from mrc0mmand/more-test-followups
Yu Watanabe [Mon, 22 May 2023 20:02:36 +0000 (05:02 +0900)] 
Merge pull request #27733 from mrc0mmand/more-test-followups

test: a couple of follow-ups

2 years agologin: add test for SetIdleHint 27739/head
David Tardon [Mon, 22 May 2023 13:30:03 +0000 (15:30 +0200)] 
login: add test for SetIdleHint

2 years agologin: do not hardcode tty used in TEST-35-LOGIN
David Tardon [Mon, 22 May 2023 13:36:21 +0000 (15:36 +0200)] 
login: do not hardcode tty used in TEST-35-LOGIN

The test can be run manually outside of CI.

2 years agoman: use setlogmask in LogControl1 example
Luca Boccassi [Mon, 22 May 2023 15:25:50 +0000 (16:25 +0100)] 
man: use setlogmask in LogControl1 example

Useful to show programs using syslog() how to easily set a mask.

2 years agotest: use run_testcases() in a few more places 27733/head
Frantisek Sumsal [Mon, 22 May 2023 14:02:43 +0000 (16:02 +0200)] 
test: use run_testcases() in a few more places

2 years agotest: add a missing session activation
Frantisek Sumsal [Mon, 22 May 2023 13:08:29 +0000 (15:08 +0200)] 
test: add a missing session activation

Otherwise test_list_user_sessions() would fail unless ordered after
test_session(), which activates the session.

2 years agotest: prefix "internal" stuff with an underscore
Frantisek Sumsal [Mon, 22 May 2023 11:24:12 +0000 (13:24 +0200)] 
test: prefix "internal" stuff with an underscore

Since bash has no namespaces, let's do the second best thing and prefix
all "internal" stuff with an underscore, to minimize the chance of a name
conflict in the future.

2 years agotest: abstract the test case logic into a shared function
Frantisek Sumsal [Mon, 22 May 2023 10:39:25 +0000 (12:39 +0200)] 
test: abstract the test case logic into a shared function

2 years agoMerge pull request #27703 from keszybz/systemd-vconsole-ordering
Zbigniew Jędrzejewski-Szmek [Mon, 22 May 2023 11:27:33 +0000 (13:27 +0200)] 
Merge pull request #27703 from keszybz/systemd-vconsole-ordering

Order systemd-vconsole-setup before getty units

2 years agozsh: amend completion for networkctl edit
Ronan Pigott [Sun, 21 May 2023 20:33:22 +0000 (13:33 -0700)] 
zsh: amend completion for networkctl edit

2 years agotest: fix a typo in the cleanup stuff
Frantisek Sumsal [Mon, 22 May 2023 10:06:16 +0000 (12:06 +0200)] 
test: fix a typo in the cleanup stuff

2 years agotest: avoid memleak when allocation fails
Frantisek Sumsal [Sun, 21 May 2023 21:13:16 +0000 (23:13 +0200)] 
test: avoid memleak when allocation fails

==8==ERROR: LeakSanitizer: detected memory leaks

Indirect leak of 168 byte(s) in 3 object(s) allocated from:
    #0 0x4a0e6e in __interceptor_calloc /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:77:3
    #1 0x4dec61 in calloc (/build/fuzz-bus-match+0x4dec61)
    #2 0x7f7c25e2b92d in bus_match_add_leaf /work/build/../../src/systemd/src/libsystemd/sd-bus/bus-match.c:548:13
    #3 0x7f7c25e2b92d in bus_match_add /work/build/../../src/systemd/src/libsystemd/sd-bus/bus-match.c:886:16
    #4 0x4de864 in LLVMFuzzerTestOneInput /work/build/../../src/systemd/src/libsystemd/sd-bus/fuzz-bus-match.c:83:21
    #5 0x4defc8 in NaloFuzzerTestOneInput (/build/fuzz-bus-match+0x4defc8)
    #6 0x4fdf53 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:611:15
    #7 0x4fd73a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:514:3
    #8 0x4fee09 in fuzzer::Fuzzer::MutateAndTestOne() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:757:19
    #9 0x4ffad5 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:895:5
    #10 0x4eee3f in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:912:6
    #11 0x4ef708 in LLVMFuzzerRunDriver /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:925:10
    #12 0x4df225 in main (/build/fuzz-bus-match+0x4df225)
    #13 0x7f7c252e3082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)

DEDUP_TOKEN: __interceptor_calloc--calloc--bus_match_add_leaf
SUMMARY: AddressSanitizer: 168 byte(s) leaked in 3 allocation(s).

Found by Nallocfuzz.

2 years agoshared: correctly propagate possible allocation errors
Frantisek Sumsal [Sun, 21 May 2023 19:00:26 +0000 (21:00 +0200)] 
shared: correctly propagate possible allocation errors

instead of just asserting in case the memstream couldn't be resized.

Found by Nallocufuzz.

2 years agowait-online: downgrade log level of failure that interface is removed or unmanaged...
Yu Watanabe [Mon, 22 May 2023 05:30:58 +0000 (14:30 +0900)] 
wait-online: downgrade log level of failure that interface is removed or unmanaged during processing it

Closing #27145.

2 years agoboot: Read files in small chunks on broken firmware
Jan Janssen [Thu, 5 Jan 2023 17:35:19 +0000 (18:35 +0100)] 
boot: Read files in small chunks on broken firmware

Fixes: #25911
2 years agoMerge pull request #27726 from yuwata/network-wireguard-doc
Yu Watanabe [Mon, 22 May 2023 07:46:38 +0000 (16:46 +0900)] 
Merge pull request #27726 from yuwata/network-wireguard-doc

network: update doc

2 years agoMerge pull request #26577 from ChenQi1989/revert-revert-journal
Daan De Meyer [Mon, 22 May 2023 05:51:01 +0000 (07:51 +0200)] 
Merge pull request #26577 from ChenQi1989/revert-revert-journal

Revert "Revert "journal: Make sd_journal_previous/next() return 0 at …

2 years agoman: AllowedIPs= can be specified multiple times 27726/head
Yu Watanabe [Mon, 22 May 2023 05:18:40 +0000 (14:18 +0900)] 
man: AllowedIPs= can be specified multiple times

Closes #27507.

2 years agonetwork/wireguard: make AllowedIPs= cleared by specifying an empty string
Yu Watanabe [Mon, 22 May 2023 05:15:49 +0000 (14:15 +0900)] 
network/wireguard: make AllowedIPs= cleared by specifying an empty string

2 years agotest: install test specific modules in test_append_files()
Yu Watanabe [Fri, 19 May 2023 20:01:05 +0000 (05:01 +0900)] 
test: install test specific modules in test_append_files()

2 years agoRevert "Revert "journal: Make sd_journal_previous/next() return 0 at HEAD/TAIL"" 26577/head
Chen Qi [Fri, 24 Feb 2023 04:36:55 +0000 (12:36 +0800)] 
Revert "Revert "journal: Make sd_journal_previous/next() return 0 at HEAD/TAIL""

This reverts commit 1db6dbb1dcdacfd7d2b4c84562fc6e77bc8c43a5.

The original patch was reverted because of issue #25369. The issue was created
because it wrongly assumed that sd_journal_seek_tail() seeks to 'current' tail.
But in fact, only when a subsequent sd_journal_previous() is called that it's
pointing to the tail at that time. The concept of 'tail' in sd_journal_seek_tail()
only has a logical meaning, and a sd_journal_previous is needed. In fact, if we
look at the codes in journalctl, we can see sd_journal_seek_tail() is followed by
sd_journal_previous(). By contrary, a sd_journal_next() after a 'logical' tail does
not make much sense. So the original patch is correct, and projects that are
using 'sd_journal_next()' right after 'sd_journal_seek_tail()' should do fixes
as in https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2823#note_1637715.

2 years agosd-journal: save correct location specifier
Yu Watanabe [Sun, 21 May 2023 16:59:18 +0000 (01:59 +0900)] 
sd-journal: save correct location specifier

2 years agotest-journal-interleaving: extend tests to clarify the issue in sd_journal_next(...
Yu Watanabe [Sun, 21 May 2023 16:56:08 +0000 (01:56 +0900)] 
test-journal-interleaving: extend tests to clarify the issue in sd_journal_next() or friends

This illustrates bug in sd_journal_next() or friends;
calling sd_jounral_next() followed by sd_journal_seek_tail() makes the
location saved in sd-journal something corrupted, and subsequent
sd_journal_previous() or friends may fail or provides unexpected result.

2 years agoudevadm-verify: introduce --no-summary option
Dmitry V. Levin [Tue, 16 May 2023 08:00:00 +0000 (08:00 +0000)] 
udevadm-verify: introduce --no-summary option

When udevadm verify is invoked by an analyzer tool like rpminspect
to verify individual udev rules files, the summary just clutters the
output, so provide an option to turn the summary off.

2 years agoMerge pull request #27157 from YHNdnzj/networkctl-edit
Yu Watanabe [Sun, 21 May 2023 12:36:56 +0000 (21:36 +0900)] 
Merge pull request #27157 from YHNdnzj/networkctl-edit

networkctl: add verb edit and cat to operate on network configs

2 years agotest: add tests for networkctl edit/cat 27157/head
Mike Yuan [Mon, 10 Apr 2023 10:45:00 +0000 (18:45 +0800)] 
test: add tests for networkctl edit/cat

2 years agonetworkctl: add verb edit and cat to operate on network configs
Mike Yuan [Sat, 1 Apr 2023 11:44:29 +0000 (19:44 +0800)] 
networkctl: add verb edit and cat to operate on network configs

This adds two verbs, edit and cat, to networkctl for
operating on network configs (namely .network, .netdev
and .link files). Specially, if the config name is
prefixed by @, it will be treated as network interface
name, and operations will be performed on config files
associated with the link.

Closes #26906

2 years agoconf-parser: move config_get_dropin_files to conf-files
Mike Yuan [Fri, 12 May 2023 18:38:41 +0000 (02:38 +0800)] 
conf-parser: move config_get_dropin_files to conf-files

2 years agonetworkctl: mark some verbs as online only
Mike Yuan [Sun, 9 Apr 2023 12:39:12 +0000 (20:39 +0800)] 
networkctl: mark some verbs as online only

2 years agonetworkctl: fix a typo in log message
Mike Yuan [Fri, 14 Apr 2023 18:04:34 +0000 (02:04 +0800)] 
networkctl: fix a typo in log message

2 years agonetworkctl: add missing asserts
Mike Yuan [Sun, 9 Apr 2023 23:31:24 +0000 (07:31 +0800)] 
networkctl: add missing asserts

2 years agonetworkctl: check netns only if networkd is running
Mike Yuan [Sun, 2 Apr 2023 18:20:32 +0000 (02:20 +0800)] 
networkctl: check netns only if networkd is running

2 years agoMerge pull request #27719 from mrc0mmand/fuzz-tweaks
Mike Yuan [Sun, 21 May 2023 07:41:15 +0000 (15:41 +0800)] 
Merge pull request #27719 from mrc0mmand/fuzz-tweaks

fuzz: a couple of fixes for issues found by Nallocfuzz

2 years agosd-event: check the allocation before calling expand_to_usable() 27719/head
Frantisek Sumsal [Sat, 20 May 2023 21:00:48 +0000 (23:00 +0200)] 
sd-event: check the allocation before calling expand_to_usable()

As it might hide a possible allocation error since it uses
the returns_nonnull attribute:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==8==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000004 (pc 0x7f317897db8d bp 0x7ffd436fe9a0 sp 0x7ffd436fe970 T0)
==8==The signal is caused by a WRITE memory access.
==8==Hint: address points to the zero page.
SCARINESS: 10 (null-deref)
    #0 0x7f317897db8d in source_new /work/build/../../src/systemd/src/libsystemd/sd-event/sd-event.c:1214:18
    #1 0x7f317897e68c in sd_event_add_time /work/build/../../src/systemd/src/libsystemd/sd-event/sd-event.c:1417:13
    #2 0x7f317897a0f6 in event_reset_time /work/build/../../src/systemd/src/libsystemd/sd-event/event-util.c:68:21
    #3 0x4e2c8e in client_initialize_time_events /work/build/../../src/systemd/src/libsystemd-network/sd-dhcp-client.c:1366:13
    #4 0x4eb0fd in client_initialize_events /work/build/../../src/systemd/src/libsystemd-network/sd-dhcp-client.c:1380:9
    #5 0x4eb0fd in client_start_delayed /work/build/../../src/systemd/src/libsystemd-network/sd-dhcp-client.c:1410:16
    #6 0x4e30aa in client_start /work/build/../../src/systemd/src/libsystemd-network/sd-dhcp-client.c:1415:16
    #7 0x4e30aa in sd_dhcp_client_start /work/build/../../src/systemd/src/libsystemd-network/sd-dhcp-client.c:2045:13
    #8 0x4e700e in LLVMFuzzerTestOneInput /work/build/../../src/systemd/src/libsystemd-network/fuzz-dhcp-client.c:73:15
    #9 0x5062f8 in NaloFuzzerTestOneInput (/build/fuzz-dhcp-client+0x5062f8)
    #10 0x525283 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:611:15
    #11 0x524a6a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:514:3
    #12 0x526139 in fuzzer::Fuzzer::MutateAndTestOne() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:757:19
    #13 0x526e05 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:895:5
    #14 0x51616f in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:912:6
    #15 0x516a38 in LLVMFuzzerRunDriver /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:925:10
    #16 0x506555 in main (/build/fuzz-dhcp-client+0x506555)
    #17 0x7f3177ce3082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
    #18 0x420c4d in _start (/build/fuzz-dhcp-client+0x420c4d)

Found by Nallocfuzz.

2 years agofuzz: avoid a couple of NULL pointer dereferences
Frantisek Sumsal [Sat, 20 May 2023 18:13:20 +0000 (20:13 +0200)] 
fuzz: avoid a couple of NULL pointer dereferences

In case one of the allocations fails.

For example:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==17==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fb352a476e5 bp 0x7ffe45154850 sp 0x7ffe45154008 T0)
==17==The signal is caused by a READ memory access.
==17==Hint: address points to the zero page.
SCARINESS: 10 (null-deref)
    #0 0x7fb352a476e5  (/lib/x86_64-linux-gnu/libc.so.6+0x1886e5) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
    #1 0x435878 in __interceptor_strlen /src/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc
    #2 0x4de1e4 in LLVMFuzzerTestOneInput /work/build/../../src/systemd/src/fuzz/fuzz-calendarspec.c:20:21
    #3 0x4deea8 in NaloFuzzerTestOneInput (/build/fuzz-calendarspec+0x4deea8)
    #4 0x4fde33 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:611:15
    #5 0x4fd61a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:514:3
    #6 0x4fece9 in fuzzer::Fuzzer::MutateAndTestOne() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:757:19
    #7 0x4ff9b5 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:895:5
    #8 0x4eed1f in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:912:6
    #9 0x4ef5e8 in LLVMFuzzerRunDriver /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:925:10
    #10 0x4df105 in main (/build/fuzz-calendarspec+0x4df105)
    #11 0x7fb3528e3082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
    #12 0x41f80d in _start (/build/fuzz-calendarspec+0x41f80d)

Found by Nallocfuzz.

2 years agoREADME: drop the CentOS CI SELinux job
Frantisek Sumsal [Sat, 20 May 2023 15:12:01 +0000 (17:12 +0200)] 
README: drop the CentOS CI SELinux job

It has been failing for more than a year and I don't think that anyone
cares about the stuff it keeps finding.

2 years agoMerge pull request #27714 from yuwata/cryptenroll-password
Mike Yuan [Sat, 20 May 2023 08:33:16 +0000 (16:33 +0800)] 
Merge pull request #27714 from yuwata/cryptenroll-password

cryptenroll-password: tiny cleanups

2 years agocryptenroll: update log messages 27714/head
Yu Watanabe [Fri, 19 May 2023 20:30:33 +0000 (05:30 +0900)] 
cryptenroll: update log messages

2 years agocryptenroll: drop unmet condition
Yu Watanabe [Fri, 19 May 2023 20:30:01 +0000 (05:30 +0900)] 
cryptenroll: drop unmet condition

2 years agoMerge pull request #27707 from mrc0mmand/tests
Yu Watanabe [Fri, 19 May 2023 23:40:01 +0000 (08:40 +0900)] 
Merge pull request #27707 from mrc0mmand/tests

test: provide coverage for a couple of recent-ish issues

2 years agotest: replace Makefile for several tests with symlink to the one for TEST-01-BASIC
Yu Watanabe [Fri, 19 May 2023 19:19:19 +0000 (04:19 +0900)] 
test: replace Makefile for several tests with symlink to the one for TEST-01-BASIC

2 years agoMerge pull request #27676 from ldv-alt/udevadm-verify
Yu Watanabe [Fri, 19 May 2023 20:41:05 +0000 (05:41 +0900)] 
Merge pull request #27676 from ldv-alt/udevadm-verify

udevadm-verify: add support for directory arguments

2 years agoMerge pull request #27701 from poettering/switch-root-same-file
Yu Watanabe [Fri, 19 May 2023 20:39:28 +0000 (05:39 +0900)] 
Merge pull request #27701 from poettering/switch-root-same-file

switch-root: use same_files() logic when checking whether new and old root dir are actually the same

2 years agoMerge pull request #27438 from bluca/dump_ratelimit
Luca Boccassi [Fri, 19 May 2023 20:29:58 +0000 (21:29 +0100)] 
Merge pull request #27438 from bluca/dump_ratelimit

manager: restrict Dump*() to privileged callers or ratelimit

2 years agotest: check if we correctly handle locales with leading spaces 27707/head
Frantisek Sumsal [Fri, 19 May 2023 17:53:55 +0000 (19:53 +0200)] 
test: check if we correctly handle locales with leading spaces

Provides coverage for #27179.

2 years agotests: run all functions with testcase_ prefix automagically
Frantisek Sumsal [Fri, 19 May 2023 16:48:07 +0000 (18:48 +0200)] 
tests: run all functions with testcase_ prefix automagically

2 years agotest: check if we correctly handle invalid UTF-8 in mount stuff
Frantisek Sumsal [Fri, 19 May 2023 16:42:36 +0000 (18:42 +0200)] 
test: check if we correctly handle invalid UTF-8 in mount stuff

Provides coverage for #27611.

2 years agotest: assorted TEST-13-NSPAWN tweaks
Frantisek Sumsal [Fri, 19 May 2023 15:27:38 +0000 (17:27 +0200)] 
test: assorted TEST-13-NSPAWN tweaks

2 years agotest: check if we can use --merge with --follow
Frantisek Sumsal [Fri, 19 May 2023 15:37:17 +0000 (17:37 +0200)] 
test: check if we can use --merge with --follow

Provides coverage for #24565.

2 years agounits: order sysinit.target, debug-shell.service after systemd-vconsole-setup 27703/head
Zbigniew Jędrzejewski-Szmek [Fri, 19 May 2023 13:58:18 +0000 (15:58 +0200)] 
units: order sysinit.target, debug-shell.service after systemd-vconsole-setup

Previous patch to add an implicit dependency effectively orders various getty
services after systemd-vconsole-setup.service. But I think it's cleaner to also
order the service before sysinit.target, like it was before
8125e8d38e3aa099c7dce8b0161997b8842aebdc. There might be units which don't do
use TTYVHangup= but would like to have the console fully initialized.

Also, add a manual ordering to debug-shell.service, because it has
ImplicitDependencies=no. This might delay debug-shell.service a bit, but
systemd-vconsole-setup.service has no dependencies and should be very quick, so
this should not be noticable in practice. Without the ordering, the terminal
might not have a key map loaded, making debug-shell.service hard to use.

2 years agorules: start systemd-vconsole-setup via unit
Zbigniew Jędrzejewski-Szmek [Fri, 19 May 2023 13:07:39 +0000 (15:07 +0200)] 
rules: start systemd-vconsole-setup via unit

We started systemd-vconsole-setup in two ways: via a dbus call from localed to
do systemd-vconsole-setup.service/restart, and from udev, calling the binary
directly. This patch makes udev call
  systemctl restart systemd-vconsole-setup.service
effectively implementing the same method as localed.

Ordering is implemented at the unit level, so we can use --no-block to not
block here.

2 years agopid1: order units using TTYVHangup= after vconsole setup
Zbigniew Jędrzejewski-Szmek [Fri, 19 May 2023 13:50:04 +0000 (15:50 +0200)] 
pid1: order units using TTYVHangup= after vconsole setup

The goal of this change is to delay getty services until after
systemd-vconsole-setup has finished. systemd-vconsole-setup starts loadkeys,
and it seems that when loadkeys is interrupted by the TTY hangup call we do
when starting tty services [1], so that loadkeys starts getting EIO from the
ioctl("/dev/tty1", KDSKBENT) syscall it does.

Fixes #26908.

[1] https://github.com/legionus/kbd/issues/92#issuecomment-1554451788

Initially I wanted to add ordering dependencies to individual units, but
TTYVHangup= can be added to other various external units too. The solution with
an implicit dependency should cover those cases too.

2 years agonamespace-util: use inode_same_at() instead of FORMAT_PROC_FD_PATH() 27701/head
Lennart Poettering [Fri, 19 May 2023 12:50:15 +0000 (14:50 +0200)] 
namespace-util: use inode_same_at() instead of FORMAT_PROC_FD_PATH()

Doesn't matter much, but this makes it leas magic and independent of
/proc/ mounts. (Well, it actually doesn't, since the right-hand path is
also in /proc/, but still...

2 years agostat-util: rename files_same() → inode_same()
Lennart Poettering [Fri, 19 May 2023 12:47:37 +0000 (14:47 +0200)] 
stat-util: rename files_same() → inode_same()

Let's be more accurate about what this function does: it checks whether
the underlying reported inode is the same. Internally, this already uses
a better named stat_inode_same() call, hence let's similarly name the
wrapping function following the same logic.

Similar for files_same_at() and path_equal_or_same_files().

No code changes, just some renaming.

2 years agoswitch-root: check if old and new root fs is same via files_same_at()
Lennart Poettering [Tue, 16 May 2023 12:57:20 +0000 (14:57 +0200)] 
switch-root: check if old and new root fs is same via files_same_at()

2 years agostat-util: add _at() variant for files_same()
Lennart Poettering [Mon, 15 May 2023 19:20:17 +0000 (21:20 +0200)] 
stat-util: add _at() variant for files_same()

2 years agojournalctl: make --follow work with --merge again
Frantisek Sumsal [Fri, 19 May 2023 07:17:29 +0000 (09:17 +0200)] 
journalctl: make --follow work with --merge again

Set --boot with --follow only if it's not already set and if --merge is
not used, since it's not compatible with --boot.

Follow-up to 2dd9285bac.
Resolves: #24565