]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agotest: add test for large uevent message 24992/head
Yu Watanabe [Mon, 17 Oct 2022 12:48:27 +0000 (21:48 +0900)] 
test: add test for large uevent message

3 years agosd-device-monitor: dynamically allocate receive buffer
Yu Watanabe [Thu, 13 Oct 2022 16:18:47 +0000 (01:18 +0900)] 
sd-device-monitor: dynamically allocate receive buffer

If udevd broadcasts a processed device with huge amount of properties,
then clients cannot receive the device.

Fixes #24987.

3 years agocryptsetup: drop redundant parens/drop ternary op
Lennart Poettering [Sun, 16 Oct 2022 22:14:21 +0000 (00:14 +0200)] 
cryptsetup: drop redundant parens/drop ternary op

A ternary op is a bit weird to use if we end up assigning a variable to
itself in one of the branches. Hence use a plain if check.

3 years agoMerge pull request #24919 from anitazha/varlinkserialize
Zbigniew Jędrzejewski-Szmek [Mon, 17 Oct 2022 11:44:28 +0000 (13:44 +0200)] 
Merge pull request #24919 from anitazha/varlinkserialize

varlink/pid1 fixes for systemd-oomd (addresses #20330)

3 years agoMerge pull request #24986 from keszybz/news-systemd-measure
Zbigniew Jędrzejewski-Szmek [Mon, 17 Oct 2022 11:24:07 +0000 (13:24 +0200)] 
Merge pull request #24986 from keszybz/news-systemd-measure

NEWS: rework the description of systemd-measure a bit again

3 years agopcrphase: fix --help text
Lennart Poettering [Mon, 17 Oct 2022 10:27:41 +0000 (12:27 +0200)] 
pcrphase: fix --help text

We don't take a command, we just take a "word" which we'll extend into
PCR 11.

3 years agopcrphase: add two additional phases
Lennart Poettering [Fri, 14 Oct 2022 18:53:42 +0000 (20:53 +0200)] 
pcrphase: add two additional phases

This adds two more phases to the PCR boot phase logic: "sysinit" +
"final".

The "sysinit" one is placed between sysinit.target and basic.target.
It's good to have a milestone in this place, since this is after all
file systems/LUKS volumes are in place (which sooner or later should
result in measurements of their own) and before services are started
(where we should be able to rely on them to be complete).

This is particularly useful to make certain secrets available for
mounting secondary file systems, but making them unavailable later.

This breaks API in a way (as measurements during runtime will change),
but given that the pcrphase stuff wasn't realeased yet should be OK.

3 years agotests: add nspawn's rootidmap integration test
Quentin Deslandes [Tue, 6 Sep 2022 13:42:43 +0000 (14:42 +0100)] 
tests: add nspawn's rootidmap integration test

Add integration test to testsuite-13.sh to ensure rootidmap option map
user IDs as expected.

3 years agoMerge pull request #24938 from msizanoen1/journald-harden-clock-jump
Luca Boccassi [Mon, 17 Oct 2022 10:00:02 +0000 (12:00 +0200)] 
Merge pull request #24938 from msizanoen1/journald-harden-clock-jump

journald: harden against forward clock jumps before unclean shutdown

3 years agoMerge pull request #25003 from DaanDeMeyer/mkosi-fixes
Luca Boccassi [Mon, 17 Oct 2022 09:36:55 +0000 (11:36 +0200)] 
Merge pull request #25003 from DaanDeMeyer/mkosi-fixes

mkosi: Add Centos Stream 8 back to CI

3 years agoupdate TODO
Lennart Poettering [Sun, 16 Oct 2022 16:16:53 +0000 (18:16 +0200)] 
update TODO

3 years agomkosi: Add Centos Stream 8 back to CI 25003/head
Daan De Meyer [Fri, 14 Oct 2022 12:30:12 +0000 (14:30 +0200)] 
mkosi: Add Centos Stream 8 back to CI

We can build all of systemd's features again on CentOS Stream 8, so
let's add it back to CI.

3 years agomkosi: Make sure bpf-framework works on CentOS Stream 8 as well
Daan De Meyer [Fri, 14 Oct 2022 12:53:41 +0000 (14:53 +0200)] 
mkosi: Make sure bpf-framework works on CentOS Stream 8 as well

3 years agoREADME: Fix libbpf minimum version
Daan De Meyer [Fri, 14 Oct 2022 12:27:48 +0000 (14:27 +0200)] 
README: Fix libbpf minimum version

This didn't get properly updated as part of #24511

3 years agomkosi: Reenable bpf-framework
Daan De Meyer [Fri, 14 Oct 2022 12:26:50 +0000 (14:26 +0200)] 
mkosi: Reenable bpf-framework

This got changed by mistake by #24511. Since we still support the
same libbpf version, we can keep this enabled everywhere.

3 years agoqrcode-util: Add support for libqrencode 3.0
Daan De Meyer [Fri, 14 Oct 2022 12:21:43 +0000 (14:21 +0200)] 
qrcode-util: Add support for libqrencode 3.0

They didn't actually change API between major versions, so let's
support the previous version as well so we can add CentOS 8 Stream
back to CI.

3 years agostub: Fix booting with old kernels
Jan Janssen [Sun, 16 Oct 2022 07:36:21 +0000 (09:36 +0200)] 
stub: Fix booting with old kernels

This fixes a regression introduced in e1636807 that removed setting this
value as it seemingly was not used by the kernel and would actively
break above 4G boots. But old kernels (4.18 in particular) will not boot
properly if it is not filled out by us.
The original issue was using the truncated value to then jump into the
kernel entry point, which we do not do anymore. So setting this value
again on newer kernels is fine.

3 years agogpt-auto: rename all functions that operate on a DissectedPartition object add_partit...
Lennart Poettering [Fri, 14 Oct 2022 13:46:04 +0000 (15:46 +0200)] 
gpt-auto: rename all functions that operate on a DissectedPartition object add_partition_xyz()

The function for handling regular mounts based on DissectedPartition
objects is called add_partition_mount(), so let's follow this scheme for
all other functions that handle them, too. This nicely separates out the
low-level functions (which get split up args) from the high-level
functions (which get a DissectedPartition object): the latter are called
add_partition_xyz() the former just add_xyz().

This makes naming a bit more systematic. No change in behaviour.

3 years agogenerator: modernize generator_open_unit_file()
Lennart Poettering [Sun, 16 Oct 2022 20:37:26 +0000 (22:37 +0200)] 
generator: modernize generator_open_unit_file()

3 years agogpt-auto-generator: use our usual ret_xyz parameter naming
Lennart Poettering [Fri, 14 Oct 2022 13:30:06 +0000 (15:30 +0200)] 
gpt-auto-generator: use our usual ret_xyz parameter naming

3 years agoman: mention that pcrphase also measures into PCR 11
Lennart Poettering [Fri, 14 Oct 2022 13:27:53 +0000 (15:27 +0200)] 
man: mention that pcrphase also measures into PCR 11

3 years agocryptsetup: use errno-flavoured logging where we have an errno
Lennart Poettering [Fri, 14 Oct 2022 12:42:37 +0000 (14:42 +0200)] 
cryptsetup: use errno-flavoured logging where we have an errno

3 years agotpm2-util: fix parameter name
Lennart Poettering [Tue, 11 Oct 2022 16:22:21 +0000 (18:22 +0200)] 
tpm2-util: fix parameter name

3 years agojournal: fix indentation in managed_journal_file_open_reliably 24938/head
msizanoen1 [Tue, 11 Oct 2022 11:16:41 +0000 (18:16 +0700)] 
journal: fix indentation in managed_journal_file_open_reliably

3 years agojournald: harden against forward clock jumps before unclean shutdown
msizanoen1 [Sat, 8 Oct 2022 12:41:18 +0000 (19:41 +0700)] 
journald: harden against forward clock jumps before unclean shutdown

Try harder to inherit the sequence number and ID from the old journal
file before rotating it away.

This helps the libsystemd journal file selection code make better decisions
even in the face of massive incorrect forward clock jumps prior to an
unclean shutdown.

3 years agoseccomp: add riscv_flush_icache to allow list
Celeste Liu [Sun, 16 Oct 2022 02:47:17 +0000 (10:47 +0800)] 
seccomp: add riscv_flush_icache to allow list

This system call is harmless because it only enforces ordering between stores
and instruction cache fetch.

fixed #24991
Related: https://github.com/felixonmars/archriscv-packages/issues/1840

Signed-off-by: Celeste Liu <CoelacanthusHex@gmail.com>
3 years agoudev: drop unused source file
Yu Watanabe [Sat, 15 Oct 2022 00:30:22 +0000 (09:30 +0900)] 
udev: drop unused source file

Follow-up for 5bbcfbaa11a92732f9bbc8d5f77e9311e6ac3d56.

3 years agoseccomp: drop per arch conditionalization in filter groups
Lennart Poettering [Fri, 14 Oct 2022 16:02:31 +0000 (18:02 +0200)] 
seccomp: drop per arch conditionalization in filter groups

We list plenty of arch-specific syscalls in our filter groups, treat the
s390 syscalls the same.

We handle gracefully anyway if some syscall doesn't exist locally on the
kernel or arch, let's rely on it. This has the benefit that
"systemd-analyze" will comprehensively tell you the syscalls filtered on
any arch for any arch.

And less conditionalization is good anyway.

3 years agoUpdate list of partition type identifiers
Pyfisch [Fri, 14 Oct 2022 19:32:47 +0000 (21:32 +0200)] 
Update list of partition type identifiers

Include verity sig partition identifiers.
List all supported CPU architectures.

3 years agoDocument two systemd-repart options in man page
Pyfisch [Fri, 14 Oct 2022 18:43:16 +0000 (20:43 +0200)] 
Document two systemd-repart options in man page

Note --private-key and --certificate options for configuring
verity signature partitions in the listing of options.

Adjust one error message referring to the --certificate option.

3 years agoupdate TODO
Lennart Poettering [Fri, 14 Oct 2022 11:05:37 +0000 (13:05 +0200)] 
update TODO

3 years agobasic/mountpoint-util: skip dependency on quota services for some filesystems
Thomas Blume [Thu, 29 Sep 2022 12:50:48 +0000 (14:50 +0200)] 
basic/mountpoint-util:  skip dependency on quota services for some filesystems

3 years agoMerge pull request #25002 from poettering/install-type-fix
Luca Boccassi [Fri, 14 Oct 2022 18:56:44 +0000 (20:56 +0200)] 
Merge pull request #25002 from poettering/install-type-fix

install: make InstallChangeType enum a proper enum

3 years agocore: only allow systemd-oomd to use SubscribeManagedOOMCGroups 24919/head
Anita Zhang [Wed, 5 Oct 2022 08:40:40 +0000 (01:40 -0700)] 
core: only allow systemd-oomd to use SubscribeManagedOOMCGroups

Attempt to address
https://github.com/systemd/systemd/issues/20330#issuecomment-1210028422.

Summary of the comment: Unprivileged users can potentially cause a denial of
service during systemd-oomd unit subscriptions by spamming requests to
SubscribeManagedOOMCGroups. As systemd-oomd.service is the only unit that
should be accessing this method, add a check on the caller's unit name to deter
them from successfully using this method.

3 years agocore: serialize/deserialize varlink sockets for pid1
Anita Zhang [Wed, 5 Oct 2022 07:13:32 +0000 (00:13 -0700)] 
core: serialize/deserialize varlink sockets for pid1

Fixes #20330

3 years agoelf-util: drop assertion for metadata in report_module_metadata()
Yu Watanabe [Fri, 14 Oct 2022 08:18:41 +0000 (17:18 +0900)] 
elf-util: drop assertion for metadata in report_module_metadata()

Fixes a bug introduced by 1a0281a3ebf4f8c16d40aa9e63103f16cd23bb2a.

Fixes RHBZ#2134741 (https://bugzilla.redhat.com/show_bug.cgi?id=2134741).

3 years agoshared/logs-show: do not overwrite journal time in export format with source timestamps
msizanoen1 [Wed, 12 Oct 2022 06:40:05 +0000 (13:40 +0700)] 
shared/logs-show: do not overwrite journal time in export format with source timestamps

Using _SOURCE_{MONOTONIC,REALTIME}_TIMESTAMP in place of the results of
sd_journal_get_{monotonic,realtime}_usecs in export formats might cause
internal inconsistency of realtime timestamp values within a journal export,
violating the export file format and causing systemd-journal-remote to
mass-generate journal files.

Fix this by using the real journal timestamps for
__{REALTIME,MONOTONIC}_TIMESTAMP.

3 years agoman: reword some awkward sentences 24986/head
Zbigniew Jędrzejewski-Szmek [Thu, 13 Oct 2022 20:30:48 +0000 (22:30 +0200)] 
man: reword some awkward sentences

3 years agoNEWS: rework the description of systemd-measure a bit again
Zbigniew Jędrzejewski-Szmek [Wed, 12 Oct 2022 15:05:27 +0000 (17:05 +0200)] 
NEWS: rework the description of systemd-measure a bit again

Try to separate the description so that changes are described first, and the
discussion follows separately. Remove some repeated verbose descriptions of the
subject: if one sentence describes that UKI contains an signature and describes
it in detail, the next sentence can just say "the signature" without
elaborating. Also, we don't do version-keying yet, so don't say "future"
kernels — older kernels will work too.

3 years agoudev-builtin-kmod: support to run without arguments
Yu Watanabe [Fri, 14 Oct 2022 07:18:35 +0000 (16:18 +0900)] 
udev-builtin-kmod: support to run without arguments

If no module name is provided, then try to load modules based on the
device modealias.

Previously, MODALIAS property is passed as an argument, but it may
contain quotation. Hence, unfortunately the modalias may be modified
and cannot load expected modules.

Fixes #24715.

3 years agoinstall: include full type name in special UnitFilePresetMode values 25002/head
Lennart Poettering [Fri, 14 Oct 2022 09:12:19 +0000 (11:12 +0200)] 
install: include full type name in special UnitFilePresetMode values

Typically the _MAX and _INVALID special enum values use the full type as
prefix, even if the actual values of the enum might not. Let's follow
this rule here too.

3 years agoinstall: make InstallChange enum type a proper type
Lennart Poettering [Fri, 14 Oct 2022 09:11:53 +0000 (11:11 +0200)] 
install: make InstallChange enum type a proper type

We can just make this an enum, as long as we ensure it has enough range,
which we can do by adding -ERRNO_MAX as one possible value (at least on
GNU C). We already do that at multiple other places, so let's do this
here too.

3 years agoupdate TODO
Lennart Poettering [Fri, 14 Oct 2022 09:32:43 +0000 (11:32 +0200)] 
update TODO

3 years agocore: refactor manager varlink init
Anita Zhang [Wed, 5 Oct 2022 07:12:53 +0000 (00:12 -0700)] 
core: refactor manager varlink init

Split out per-socket code into a separate function to use as part of
serialize/deserialize in the next commit.

3 years agovarlink: refactor adding socket event source to the event loop
Anita Zhang [Tue, 11 Oct 2022 09:36:32 +0000 (02:36 -0700)] 
varlink: refactor adding socket event source to the event loop

3 years agoudev/rules: add by-path and by-ibdev links to infiniband verbs
Lubomir Rintel [Thu, 13 Oct 2022 11:49:22 +0000 (13:49 +0200)] 
udev/rules: add by-path and by-ibdev links to infiniband verbs

The uverbs devices are sequentially numbered and are not guarranteed to
stay stable across reboot.

At least one good person was disappointed by this, because they couldn't
find their device: https://bugzilla.redhat.com/show_bug.cgi?id=2036515

Let's add a few helpful links.

3 years agoMerge pull request #24461 from keszybz/better-unmask-message
Zbigniew Jędrzejewski-Szmek [Thu, 13 Oct 2022 21:17:49 +0000 (23:17 +0200)] 
Merge pull request #24461 from keszybz/better-unmask-message

Better unmask message when unit is masked via kernel commandline

3 years agoshared/install: print warning when unmasking unit with cmdline mask 24461/head
Zbigniew Jędrzejewski-Szmek [Fri, 26 Aug 2022 10:02:43 +0000 (12:02 +0200)] 
shared/install: print warning when unmasking unit with cmdline mask

'systemctl unmask foo' will try to remove the symlink to /dev/null under /etc/.
But the unit may also be masked by a symlink under /run/generator, in particular
the one created by systemd-debug-generator based on systemd.mask=foo on the
kernel commandline. The unmask call cannot anything about this: even if it removed
the symlink from /run/generator, it'll be recreated on the next daemon-reload.
Thus, we can only warn about it.

Initially, I wanted to check if 'systemctl.mask' is defined on the kernel
command-line, but that's not effective, because such mask symlinks can be
created by other generators based on other conditions. Checking for runtime
mask is "dumber", but is more robust because it doesn't assume who created the
mask and why.

The handling of InstallInfo is the copied from install_info_symlink_wants().
It's pretty ugly, this whole code should be rewritten from scratch.

The message is printed, but the whole operation is still "successful". This
keep backwards compatibility: people might call unmask to remove filesystem
masks even if there's still a cmdline param in place. We allow 'systemctl
mask' to create such a mask, so 'unmask' should be able to remove it.

Fixes #22689.

3 years agoshared/install: use cleanup func for InstallInfo*
Zbigniew Jędrzejewski-Szmek [Mon, 29 Aug 2022 08:11:41 +0000 (10:11 +0200)] 
shared/install: use cleanup func for InstallInfo*

In the next commit cleanup will be used in one more place. This change
avoids proliferation of the open-coded cleanup calls.

3 years agoshared/install: rename 'UnitFileInstallInfo' to 'InstallInfo'
Zbigniew Jędrzejewski-Szmek [Fri, 26 Aug 2022 08:40:17 +0000 (10:40 +0200)] 
shared/install: rename 'UnitFileInstallInfo' to 'InstallInfo'

- shorter is better
- name now matches the defining-file name

I was also considering UnitInstallInfo. Can change if people prefer that.

3 years agoshared/install: rename 'unit_file_change_type' to 'install_change' + followups
Zbigniew Jędrzejewski-Szmek [Sun, 18 Sep 2022 16:00:41 +0000 (18:00 +0200)] 
shared/install: rename 'unit_file_change_type' to 'install_change' + followups

We had an anonymous enum with values called UNIT_FILE_…, which could easily be
confused with UNIT_FILE_… from UnitFileFlags enum. This commit renames the enum
values and also the variables which refer to them.

3 years agoshared/install: rename UnitFileInstallInfo.type to .install_mode
Zbigniew Jędrzejewski-Szmek [Fri, 26 Aug 2022 08:11:13 +0000 (10:11 +0200)] 
shared/install: rename UnitFileInstallInfo.type to .install_mode

3 years agoshared/install: rename 'unit file type' to 'install mode'
Zbigniew Jędrzejewski-Szmek [Fri, 26 Aug 2022 07:52:59 +0000 (09:52 +0200)] 
shared/install: rename 'unit file type' to 'install mode'

git grep -l -nwi 'UnitFileType|UNIT_FILE_TYPE' | \
xargs sed -r -i 's/UnitFileType/InstallMode/g; s/UNIT_FILE_TYPE/INSTALL_MODE/g; s/unit_file_type/install_mode/g'

3 years agoshared/install: rename UnitFileChange to InstallChange
Zbigniew Jędrzejewski-Szmek [Fri, 26 Aug 2022 07:30:01 +0000 (09:30 +0200)] 
shared/install: rename UnitFileChange to InstallChange

It's shorter and more generic. The struct can contain info about changes to
unit files, but also symlinks and errors.

3 years agoshared/install: rename 'files' param to 'names'
Zbigniew Jędrzejewski-Szmek [Wed, 24 Aug 2022 15:23:40 +0000 (17:23 +0200)] 
shared/install: rename 'files' param to 'names'

… or 'name_or_path' or 'names_or_paths' as appropriate. Those functions are
generally called with unit names as arguments.

3 years agosd-journal: use new() instead of newa() if too many items will be added 24702/head
Yu Watanabe [Wed, 12 Oct 2022 06:45:55 +0000 (15:45 +0900)] 
sd-journal: use new() instead of newa() if too many items will be added

For safety, as the size may not be under our control.

3 years agoMerge pull request #24985 from yuwata/codeql
Yu Watanabe [Thu, 13 Oct 2022 12:36:16 +0000 (21:36 +0900)] 
Merge pull request #24985 from yuwata/codeql

test: several cleanups suggested by CodeQL

3 years agotest: introduce __eq__() and __ne__() 24985/head
Yu Watanabe [Thu, 13 Oct 2022 08:41:45 +0000 (17:41 +0900)] 
test: introduce __eq__() and __ne__()

Suggested by CodeQL#160 (https://github.com/systemd/systemd/security/code-scanning/160).

3 years agotest: drop unused modules
Yu Watanabe [Thu, 13 Oct 2022 08:34:08 +0000 (17:34 +0900)] 
test: drop unused modules

Suggested by CodeQL#167 (https://github.com/systemd/systemd/security/code-scanning/167)
and CodeQL#168 (https://github.com/systemd/systemd/security/code-scanning/168).

3 years agotest: improve assertion message on failure
Yu Watanabe [Thu, 13 Oct 2022 08:31:37 +0000 (17:31 +0900)] 
test: improve assertion message on failure

Suggested by CodeQL#169 (https://github.com/systemd/systemd/security/code-scanning/169).

3 years agoTODO: fix typo
Yu Watanabe [Thu, 13 Oct 2022 08:15:50 +0000 (17:15 +0900)] 
TODO: fix typo

3 years agoupdate TODO
Lennart Poettering [Thu, 13 Oct 2022 07:47:55 +0000 (09:47 +0200)] 
update TODO

3 years agoupdate NEWS
Lennart Poettering [Thu, 13 Oct 2022 07:47:48 +0000 (09:47 +0200)] 
update NEWS

3 years agoanalyze: extend the dump command to accept patterns
Franck Bui [Tue, 13 Sep 2022 14:13:16 +0000 (16:13 +0200)] 
analyze: extend the dump command to accept patterns

The new function DumpPatterns() can be used to limit (drastically) the size of
the data returned by PID1. Hence the optimization of serializing data into a
file descriptor should be less relevant than having the possibility to limit
the data when communicating with the service manager remotely.

NB: when passing patterns, the dump command omits the version of the manager as
well as the features and the timestamps.

3 years agoMerge pull request #24625 from yuwata/dissect-image-open-and-lock-decrypted
Yu Watanabe [Wed, 12 Oct 2022 22:47:08 +0000 (07:47 +0900)] 
Merge pull request #24625 from yuwata/dissect-image-open-and-lock-decrypted

dissect-image: open dissected and decrypted partitions

3 years agogpt-auto: allow using without cryptsetup
David Seifert [Wed, 12 Oct 2022 19:47:29 +0000 (21:47 +0200)] 
gpt-auto: allow using without cryptsetup

Fixes #24978

3 years agodissect-image: introduce probe_filesystem_full() which can take file descriptor of... 24625/head
Yu Watanabe [Sat, 1 Oct 2022 02:02:40 +0000 (11:02 +0900)] 
dissect-image: introduce probe_filesystem_full() which can take file descriptor of device node

In dissect_loop_device(), we have opened the device node. Let's reuse
the file descriptor.

3 years agodissect-image: open dissected or decrypted partitions and mount through the file...
Yu Watanabe [Fri, 9 Sep 2022 20:44:27 +0000 (05:44 +0900)] 
dissect-image: open dissected or decrypted partitions and mount through the file descriptor

If multiple services with the same encrypted image are simultaneously
starting, one may deactivate the dm device while others using it.
Or, similary, after (regular) partitions are dissected, another process
may try to remove them before we mount them.

To prevent such situations, let's keep the dissected and decrypted
partitions opened. Then, use the file descriptors when we mount the
partitions.

Fixes #24617.

3 years agodissect-image: try to open device node before activating
Yu Watanabe [Fri, 16 Sep 2022 20:03:24 +0000 (05:03 +0900)] 
dissect-image: try to open device node before activating

Hopefully decrease the chance that the device is removed soon after
it is detected.

3 years agodissect-image: fix error handling of @cancel_deferred_remove DM command
Yu Watanabe [Sat, 17 Sep 2022 06:27:15 +0000 (15:27 +0900)] 
dissect-image: fix error handling of @cancel_deferred_remove DM command

See target_message() in drivers/md/dm-ioctl.c and
dm_cancel_deferred_remove() in drivers/md/dm.c.

3 years agodissect-image: reduce indentation
Yu Watanabe [Fri, 16 Sep 2022 18:30:13 +0000 (03:30 +0900)] 
dissect-image: reduce indentation

No functional change, just refactoring.

3 years agotest: disable LSan in the ASan env wrapper
Frantisek Sumsal [Wed, 12 Oct 2022 15:28:47 +0000 (17:28 +0200)] 
test: disable LSan in the ASan env wrapper

This wrapper is used in situations where  we don't care about *San reports,
we just want to make things work. However, with enabled LSan we might
trigger some bogus reports we're definitely not interested in, causing
unexpected test fails.

Spotted on C8S in TEST-34-DYNAMICUSERMIGRATE:
```
[10654.804162] testsuite-34.sh[56]: + systemctl start testservice-34-check-writable.service
         Starting testservice-34-check-writable.service...
[10655.055969] bash[546]: + set -o pipefail
[10655.056127] bash[546]: + declare -a writable_dirs
[10655.056234] bash[546]: + readarray -t writable_dirs
[10655.060838] bash[548]: ++ find / '(' -path /var/tmp -o -path /tmp -o -path /proc -o -path /dev/mqueue -o -path /dev/shm -o -path /sys/fs/bpf -o -path /dev/.lxc -o -path /sys/devices/system/cpu ')' -prune -o -type d -writable -print
[10655.061534] bash[549]: ++ sort -u
[10655.688740] bash[547]: =================================================================
[10655.689075] bash[547]: ==547==ERROR: LeakSanitizer: detected memory leaks
[10655.689246] bash[547]: Direct leak of 112 byte(s) in 1 object(s) allocated from:
[10655.743851] bash[547]:     #0 0x7ffff752d364  (/usr/lib64/clang/14.0.0/lib/libclang_rt.asan-powerpc64le.so+0x13d364) (BuildId: 321f4ed1caea6a1a4c37f9272e07275cf16f034d)
[10655.744060] bash[547]:     #1 0x1000b5d20 in xmalloc (/usr/bin/bash+0xb5d20) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.744224] bash[547]:     #2 0x100083338  (/usr/bin/bash+0x83338) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.744393] bash[547]:     #3 0x10008847c  (/usr/bin/bash+0x8847c) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.744552] bash[547]:     #4 0x1000af6ec in redirection_expand (/usr/bin/bash+0xaf6ec) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.744728] bash[547]:     #5 0x1000b005c  (/usr/bin/bash+0xb005c) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.744886] bash[547]:     #6 0x1000b1388 in do_redirections (/usr/bin/bash+0xb1388) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.745051] bash[547]:     #7 0x100050484  (/usr/bin/bash+0x50484) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.745208] bash[547]:     #8 0x100052160 in execute_command_internal (/usr/bin/bash+0x52160) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.745376] bash[547]:     #9 0x100052a10 in execute_command_internal (/usr/bin/bash+0x52a10) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.745536] bash[547]:     #10 0x100053e38 in execute_command (/usr/bin/bash+0x53e38) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.745711] bash[547]:     #11 0x1000529d8 in execute_command_internal (/usr/bin/bash+0x529d8) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.745870] bash[547]:     #12 0x100053e38 in execute_command (/usr/bin/bash+0x53e38) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.746038] bash[547]:     #13 0x1000529d8 in execute_command_internal (/usr/bin/bash+0x529d8) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.746198] bash[547]:     #14 0x100053e38 in execute_command (/usr/bin/bash+0x53e38) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.746367] bash[547]:     #15 0x1000529d8 in execute_command_internal (/usr/bin/bash+0x529d8) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.746548] bash[547]:     #16 0x100053e38 in execute_command (/usr/bin/bash+0x53e38) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.746741] bash[547]:     #17 0x1000529d8 in execute_command_internal (/usr/bin/bash+0x529d8) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.746897] bash[547]:     #18 0x100053e38 in execute_command (/usr/bin/bash+0x53e38) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.747067] bash[547]:     #19 0x1000529d8 in execute_command_internal (/usr/bin/bash+0x529d8) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.747227] bash[547]:     #20 0x100053e38 in execute_command (/usr/bin/bash+0x53e38) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.747414] bash[547]:     #21 0x1000529d8 in execute_command_internal (/usr/bin/bash+0x529d8) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.747573] bash[547]:     #22 0x100053e38 in execute_command (/usr/bin/bash+0x53e38) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.747741] bash[547]:     #23 0x1000529d8 in execute_command_internal (/usr/bin/bash+0x529d8) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.747896] bash[547]:     #24 0x100053e38 in execute_command (/usr/bin/bash+0x53e38) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.748064] bash[547]:     #25 0x1000529d8 in execute_command_internal (/usr/bin/bash+0x529d8) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.748225] bash[547]:     #26 0x100053e38 in execute_command (/usr/bin/bash+0x53e38) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.748390] bash[547]:     #27 0x1000529d8 in execute_command_internal (/usr/bin/bash+0x529d8) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.748553] bash[547]:     #28 0x1000bf91c in parse_and_execute (/usr/bin/bash+0xbf91c) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.748717] bash[547]:     #29 0x1000311ec  (/usr/bin/bash+0x311ec) (BuildId: da38eb38f6870bdc2a6ef51c52aa6ce20921fe40)
[10655.748883] bash[547]: Direct leak of 17 byte(s) in 1 object(s) allocated from:
...
```

3 years agoMerge pull request #24883 from bluca/extrel_force
Luca Boccassi [Wed, 12 Oct 2022 18:20:46 +0000 (20:20 +0200)] 
Merge pull request #24883 from bluca/extrel_force

portable: allow caller to override extension-release name check

3 years agoMerge pull request #24974 from yuwata/sd-journal
Zbigniew Jędrzejewski-Szmek [Wed, 12 Oct 2022 15:47:05 +0000 (17:47 +0200)] 
Merge pull request #24974 from yuwata/sd-journal

sd-journal: several cleanups and follow-ups for compact mode PR

3 years agoMerge pull request #24976 from mbiebl/logind-fix-dbus-on_ac_power
Michael Biebl [Wed, 12 Oct 2022 14:55:21 +0000 (16:55 +0200)] 
Merge pull request #24976 from mbiebl/logind-fix-dbus-on_ac_power

logind: fix getting property OnExternalPower via D-Bus

3 years agoMerge pull request #24934 from keszybz/remove-nss-lookup
Luca Boccassi [Wed, 12 Oct 2022 13:21:40 +0000 (15:21 +0200)] 
Merge pull request #24934 from keszybz/remove-nss-lookup

Remove nss lookups from pid1

3 years agoboot: Always reconnect all drivers
Jan Janssen [Wed, 12 Oct 2022 07:39:59 +0000 (09:39 +0200)] 
boot: Always reconnect all drivers

Fixes: #23442
3 years agoboot: export reconnect()
Gerd Hoffmann [Mon, 19 Sep 2022 08:56:47 +0000 (10:56 +0200)] 
boot: export reconnect()

Also give it a more descriptive name.

3 years agostub: Correctly handle multi node file paths
Jan Janssen [Tue, 11 Oct 2022 09:19:04 +0000 (11:19 +0200)] 
stub: Correctly handle multi node file paths

Fixes: #24955
3 years agoboot: Use device_path_to_str
Jan Janssen [Tue, 11 Oct 2022 07:45:01 +0000 (09:45 +0200)] 
boot: Use device_path_to_str

3 years agoboot: Add device_path_to_str
Jan Janssen [Sun, 5 Jun 2022 13:31:01 +0000 (15:31 +0200)] 
boot: Add device_path_to_str

3 years agoMerge pull request #24973 from keszybz/simplify-variable-declarations
Yu Watanabe [Wed, 12 Oct 2022 10:36:47 +0000 (19:36 +0900)] 
Merge pull request #24973 from keszybz/simplify-variable-declarations

Simplify variable declarations

3 years agosd-journal: add comments that journal_file_move_to() may break previous read data 24974/head
Yu Watanabe [Wed, 12 Oct 2022 07:19:27 +0000 (16:19 +0900)] 
sd-journal: add comments that journal_file_move_to() may break previous read data

We have already made similar mistakes several times, e.g.
b8478c14c7367c3ec5d47d2680a3390b0dedecb1, and
b596d06c385e104fc330288b791a56661f0c2d17. Let's document the function
invalidates previously read objects.

3 years agosd-journal: re-read object on next try
Yu Watanabe [Wed, 12 Oct 2022 07:08:57 +0000 (16:08 +0900)] 
sd-journal: re-read object on next try

Otherwise, the object may be already altered by another cached entry.

3 years agosd-journal: re-read object from cache
Yu Watanabe [Wed, 12 Oct 2022 06:59:43 +0000 (15:59 +0900)] 
sd-journal: re-read object from cache

Fixes a bug introduced by 0e35afff1db475b46281fac75fa3fc2d7f26cae7.

Replaces 3388a4b5820012b945d9925446764717afcdb5b0.

3 years agosd-journal: drop unused argument
Yu Watanabe [Wed, 12 Oct 2022 06:50:53 +0000 (15:50 +0900)] 
sd-journal: drop unused argument

Follow-up for a9089a6604066a8fa8138af2a6388be48f2a80ef.

3 years agosd-journal: several coding style updates
Yu Watanabe [Wed, 12 Oct 2022 06:39:24 +0000 (15:39 +0900)] 
sd-journal: several coding style updates

- rename `ret` -> `ret_object`,
- add missing assertions,
- add FIXME comments,
- wrap function arguments, etc., etc..

3 years agologind: fix getting property OnExternalPower via D-Bus 24976/head
Michael Biebl [Wed, 12 Oct 2022 09:07:57 +0000 (11:07 +0200)] 
logind: fix getting property OnExternalPower via D-Bus

The BUS_DEFINE_PROPERTY_GET_GLOBAL macro requires a value as third
argument, so we need to call manager_is_on_external_power(). Otherwise
the function pointer is interpreted as a boolean and always returns
true:

```
$ busctl get-property org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager OnExternalPower
b true
$ /lib/systemd/systemd-ac-power  --verbose
no
```

Thanks: Helmut Grohne <helmut@subdivi.de>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1021644

3 years agoportable: allow caller to override extension-release name check 24883/head
Luca Boccassi [Tue, 11 Oct 2022 17:58:33 +0000 (18:58 +0100)] 
portable: allow caller to override extension-release name check

When the --force flag is used, do not insist that the extension-release
file has to match the extension image name

3 years agoportable: rename flag PORTABLE_FORCE -> PORTABLE_FORCE_ATTACH
Luca Boccassi [Tue, 11 Oct 2022 17:53:59 +0000 (18:53 +0100)] 
portable: rename flag PORTABLE_FORCE -> PORTABLE_FORCE_ATTACH

The name is used only internally, also it was just added.
Allows adding different types of force flags.

3 years agoos-util: split out extension-release xattr helper
Luca Boccassi [Tue, 11 Oct 2022 17:31:06 +0000 (18:31 +0100)] 
os-util: split out extension-release xattr helper

3 years agomount-util: do not pass 'x-*' options to mount syscall
Luca Boccassi [Tue, 11 Oct 2022 17:28:10 +0000 (18:28 +0100)] 
mount-util: do not pass 'x-*' options to mount syscall

They will not be recognized. libmount filters them manually.

3 years agoNEWS: expand on systemd-measure a bit
Lennart Poettering [Wed, 12 Oct 2022 08:33:47 +0000 (10:33 +0200)] 
NEWS: expand on systemd-measure a bit

3 years agoupdate TODO with discussions from Image-based Linux summit
Lennart Poettering [Wed, 12 Oct 2022 08:03:56 +0000 (10:03 +0200)] 
update TODO with discussions from Image-based Linux summit

3 years agoMerge pull request #24784 from yuwata/core-exec-directory
Zbigniew Jędrzejewski-Szmek [Wed, 12 Oct 2022 07:37:16 +0000 (09:37 +0200)] 
Merge pull request #24784 from yuwata/core-exec-directory

core: do not create symlink to private directory if parent already exists

3 years agoMerge pull request #24970 from DaanDeMeyer/crypsetup-fix
Lennart Poettering [Wed, 12 Oct 2022 07:32:56 +0000 (09:32 +0200)] 
Merge pull request #24970 from DaanDeMeyer/crypsetup-fix

Cryptsetup compilation fixes

3 years agobasic/user-util: simplify variable declarations in fget{pw,gr}ent_sane() 24973/head
Zbigniew Jędrzejewski-Szmek [Mon, 3 Oct 2022 09:50:16 +0000 (11:50 +0200)] 
basic/user-util: simplify variable declarations in fget{pw,gr}ent_sane()

3 years agolibsystemd-network: trivial simplification
Zbigniew Jędrzejewski-Szmek [Wed, 12 Oct 2022 07:18:24 +0000 (09:18 +0200)] 
libsystemd-network: trivial simplification

3 years agoMerge pull request #24867 from yuwata/sd-dhcp6-client-large-packet
Zbigniew Jędrzejewski-Szmek [Wed, 12 Oct 2022 07:18:07 +0000 (09:18 +0200)] 
Merge pull request #24867 from yuwata/sd-dhcp6-client-large-packet

sd-dhcp6-client: allow to build large packet

3 years agosd-journal: rename next_hash_offset() -> get_next_hash_offset()
Yu Watanabe [Wed, 12 Oct 2022 06:37:00 +0000 (15:37 +0900)] 
sd-journal: rename next_hash_offset() -> get_next_hash_offset()

As the function name conflicts with one of its argument.