]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
7 months agotree-wide: unify OpenSSL spelling in log messages 30018/head
Frantisek Sumsal [Mon, 13 Nov 2023 19:47:17 +0000 (20:47 +0100)] 
tree-wide: unify OpenSSL spelling in log messages

Seeing three different spellings of OpenSSL in one log file triggers
some inner OCD I didn't even know I have.

7 months agotest: skip --tpm2-device-key= tests with older OpenSSL
Frantisek Sumsal [Mon, 13 Nov 2023 19:35:29 +0000 (20:35 +0100)] 
test: skip --tpm2-device-key= tests with older OpenSSL

--tpm2-device-key= requires OpenSSL >= 3 with KDF-SS, so let's skip the
test if we're running with older OpenSSL.

+ systemd-cryptenroll --tpm2-device-key=/tmp/srk.pub --tpm2-pcrs=12:sha256=F5A5FD42D16A20302798EF6ED309979B43003D2320D9F0E8EA9831A92759FB4B /tmp/systemd-cryptsetup-H8y.IMAGE
Failed to find TPM2 pcrlock policy file 'pcrlock.json': No such file or directory
Allocating context for crypt device /tmp/systemd-cryptsetup-H8y.IMAGE.
Trying to open and read device /tmp/systemd-cryptsetup-H8y.IMAGE with direct-io.
Trying to open device /tmp/systemd-cryptsetup-H8y.IMAGE without direct-io.
Initialising device-mapper backend library.
Trying to load LUKS2 crypt type from device /tmp/systemd-cryptsetup-H8y.IMAGE.
Crypto backend (OpenSSL 1.1.1k  FIPS 25 Mar 2021) initialized in cryptsetup library version 2.3.7.
Detected kernel Linux 4.18.0-521.el8.ppc64le ppc64le.
...
Failed to find TPM PCR public key file 'tpm2-pcr-public-key.pem': No such file or directory
Failed to read TPM2 PCR public key, proceeding without: No such file or directory
Can't find symbol Esys_TR_GetTpmHandle: /lib64/libtss2-esys.so.0: undefined symbol: Esys_TR_GetTpmHandle
libtss2-esys too old, does not include Esys_TR_GetTpmHandle.
Can't find symbol Esys_TR_GetTpmHandle: /lib64/libtss2-esys.so.0: undefined symbol: Esys_TR_GetTpmHandle
libtss2-esys too old, does not include Esys_TR_GetTpmHandle.
PolicyPCR calculated digest: 9a1f511fb94f030eb21d0332ef2739727bf0ead4ec26a204d15b09cdeb4b2555
Calculating sealed object.
Calculating encrypted seed for sealed object.
Calculating encrypted seed for ECC sealed object.
Calculating KDFe().
KDF-SS requires openssl >= 3.
Could not calculate KDFe: Operation not supported
Could not calculate encrypted seed: Operation not supported
Failed to seal to TPM2: Operation not supported

7 months agoMerge pull request #29990 from Flowdalic/memory-zswap-current
Mike Yuan [Mon, 13 Nov 2023 08:40:18 +0000 (16:40 +0800)] 
Merge pull request #29990 from Flowdalic/memory-zswap-current

cgroup: add support for memory.zswap.current

7 months agosystemctl-show: merge subsequent swap printf() blocks 29990/head
Florian Schmaus [Sun, 12 Nov 2023 20:12:02 +0000 (21:12 +0100)] 
systemctl-show: merge subsequent swap printf() blocks

7 months agoconf-parser: pin seen config files
Mike Yuan [Thu, 9 Nov 2023 18:54:21 +0000 (02:54 +0800)] 
conf-parser: pin seen config files

Follow-up for 93f1da45566d064f4f053b37bbac2813631f58b1

Addresses https://github.com/systemd/systemd/commit/93f1da45566d064f4f053b37bbac2813631f58b1#r132152321

7 months agocgroup: add support for memory.zswap.current
Florian Schmaus [Sun, 12 Nov 2023 17:17:02 +0000 (18:17 +0100)] 
cgroup: add support for memory.zswap.current

7 months agoMerge pull request #29976 from YHNdnzj/session-by-leader-pidref
Yu Watanabe [Sun, 12 Nov 2023 20:09:47 +0000 (05:09 +0900)] 
Merge pull request #29976 from YHNdnzj/session-by-leader-pidref

logind: switch sessions_by_leader to PidRef

7 months agoMerge pull request #29968 from bluca/executor_selinux_lazy_load
Yu Watanabe [Sun, 12 Nov 2023 20:06:44 +0000 (05:06 +0900)] 
Merge pull request #29968 from bluca/executor_selinux_lazy_load

executor: lazily load SELinux

7 months agoMerge pull request #29989 from yuwata/conf-parser-arg-type
Luca Boccassi [Sun, 12 Nov 2023 17:30:44 +0000 (17:30 +0000)] 
Merge pull request #29989 from yuwata/conf-parser-arg-type

conf-parser: fix argument type

7 months agoconf-parser: fix argument type of ConfigPerfItemLookup 29989/head
Yu Watanabe [Sun, 12 Nov 2023 15:37:18 +0000 (00:37 +0900)] 
conf-parser: fix argument type of ConfigPerfItemLookup

Prompted by #29972.

7 months agoconf-parser: inline variable declaration
Yu Watanabe [Sun, 12 Nov 2023 15:30:01 +0000 (00:30 +0900)] 
conf-parser: inline variable declaration

7 months agoFix some typos in RESOLVED-VPNS.md
Jeremy Fleischman [Sun, 12 Nov 2023 10:58:09 +0000 (02:58 -0800)] 
Fix some typos in RESOLVED-VPNS.md

7 months agoMerge pull request #29941 from Flowdalic/cgroup-memory-swap-peak
Mike Yuan [Sun, 12 Nov 2023 08:21:44 +0000 (16:21 +0800)] 
Merge pull request #29941 from Flowdalic/cgroup-memory-swap-peak

cgroup: add support for memory.swap.peak and memory.swap.current

7 months agotest: sort files in generate-sym-test.py
Luca Boccassi [Sat, 11 Nov 2023 20:29:03 +0000 (20:29 +0000)] 
test: sort files in generate-sym-test.py

The test binaries are different depending on the filesystem, due to os.walk().
Sort the input before iterating on it to make it stable.

7 months agologind: switch sessions_by_leader to PidRef 29976/head
Mike Yuan [Thu, 9 Nov 2023 16:51:52 +0000 (00:51 +0800)] 
logind: switch sessions_by_leader to PidRef

7 months agoselinux: change fd check into assertion 29968/head
Luca Boccassi [Fri, 10 Nov 2023 13:10:13 +0000 (13:10 +0000)] 
selinux: change fd check into assertion

7 months agoexecutor: lazily load SELinux
Luca Boccassi [Fri, 10 Nov 2023 00:22:21 +0000 (00:22 +0000)] 
executor: lazily load SELinux

Loading the SELinux DB on every invocation can be slow and
takes 2ms-10ms, so do not initialize it unconditionally, but
wait for the first use. On a mkosi Fedora rawhide image, this
cuts the number of loads in half.

7 months agoselinux: support lazy initialization
Luca Boccassi [Fri, 10 Nov 2023 00:21:03 +0000 (00:21 +0000)] 
selinux: support lazy initialization

Loading the SELinux DB is slow, so support lazy initialization so
that it is done when needed.

7 months agoselinux: avoid probing memory status if debug logs are not enabled
Luca Boccassi [Fri, 10 Nov 2023 11:53:11 +0000 (11:53 +0000)] 
selinux: avoid probing memory status if debug logs are not enabled

Given we are optimizing the selinux paths, avoid doing these operations
unless the result is actually used

7 months agocgroup: add support for memory.swap.current 29941/head
Florian Schmaus [Fri, 10 Nov 2023 10:44:09 +0000 (11:44 +0100)] 
cgroup: add support for memory.swap.current

In systemctl-show we only show current swap if ever swapped or non-zero. This
reduces the noise on swapless systems, that would otherwise always show a swap
value that never has the chance to become non-zero. It further reduces the
noise for services that never swapped.

7 months agocgroup: de-duplicate uni_get_memory_* code
Florian Schmaus [Thu, 9 Nov 2023 08:49:29 +0000 (09:49 +0100)] 
cgroup: de-duplicate uni_get_memory_* code

7 months agocgroup: add support for memory.swap.peak
Florian Schmaus [Wed, 8 Nov 2023 18:22:06 +0000 (19:22 +0100)] 
cgroup: add support for memory.swap.peak

7 months agocore/unit: remove unneeded comparison for hashmap_remove_value
Mike Yuan [Sat, 11 Nov 2023 07:53:38 +0000 (15:53 +0800)] 
core/unit: remove unneeded comparison for hashmap_remove_value

hashmap_remove_value returns NULL if the value in the hashmap doesn't
match with the one provided by the caller.

7 months agopidref: introduce hash ops that doesn't come with destructor
Mike Yuan [Sat, 11 Nov 2023 07:48:24 +0000 (15:48 +0800)] 
pidref: introduce hash ops that doesn't come with destructor

7 months agocgroup-util: introduce cg_pidref_get_unit
Mike Yuan [Thu, 9 Nov 2023 16:18:53 +0000 (00:18 +0800)] 
cgroup-util: introduce cg_pidref_get_unit

7 months agoTODO: fix typo
Yu Watanabe [Sat, 11 Nov 2023 08:58:14 +0000 (17:58 +0900)] 
TODO: fix typo

7 months agoMerge pull request #29929 from poettering/tty-reset-fixes
Yu Watanabe [Sat, 11 Nov 2023 03:44:31 +0000 (12:44 +0900)] 
Merge pull request #29929 from poettering/tty-reset-fixes

pid1: various fixes around TTY resets

7 months agoMerge pull request #29958 from mrc0mmand/journal-line_max
Yu Watanabe [Sat, 11 Nov 2023 03:39:57 +0000 (12:39 +0900)] 
Merge pull request #29958 from mrc0mmand/journal-line_max

journal: recalculate line_max when stdout stream state changes

7 months agoUpdate kernel-install man page, Ukify is the default UKI_GENERATOR
cvlc12 [Thu, 9 Nov 2023 14:01:48 +0000 (15:01 +0100)] 
Update kernel-install man page, Ukify is the default UKI_GENERATOR

Ukify is the default generator, and will be used if UKI_GENERATOR is unset. See https://github.com/systemd/systemd/pull/28687

7 months agoMerge pull request #29982 from poettering/repart-message-tweaks
Luca Boccassi [Fri, 10 Nov 2023 23:16:13 +0000 (23:16 +0000)] 
Merge pull request #29982 from poettering/repart-message-tweaks

repart: minor log message tweaks

7 months agoboot: load device tree even if no original config exists
Clayton Craft [Fri, 27 Oct 2023 19:50:50 +0000 (12:50 -0700)] 
boot: load device tree even if no original config exists

Firmware may not have loaded a devicetree, for example if the device
shipped with windows and exclusively supports ACPI.
We should always load the specified devicetree regardless of firmware
state to enable booting on platforms where Linux only supports DT.

Note: in _cleanup, the orig. config is NULL in this case, and passing
NULL to InstallConfigurationTable is permitted by the EFI spec.
See: https://uefi.org/specs/UEFI/2.10/07_Services_Boot_Services.html

Fixes #24059

Co-authored-by: Daniel Thompson <daniel.thompson@linaro.org>
7 months agoMerge pull request #29981 from yuwata/network-dhcp6-pd-without-address
Luca Boccassi [Fri, 10 Nov 2023 22:04:25 +0000 (22:04 +0000)] 
Merge pull request #29981 from yuwata/network-dhcp6-pd-without-address

network: fix DHCPv6-PD without addressing

7 months agorepart: downgrade pcrlock pickup log message 29982/head
Lennart Poettering [Fri, 10 Nov 2023 21:46:19 +0000 (22:46 +0100)] 
repart: downgrade pcrlock pickup log message

This is not relevant in most cases, hence don't mention this all the
time.

7 months agorepart: say on which device we apply things
Lennart Poettering [Fri, 10 Nov 2023 21:45:57 +0000 (22:45 +0100)] 
repart: say on which device we apply things

So far we never mention the device in our output. Let's fix that.

7 months agorepart: when we copy in blocks, indicate we are doing from an offset
Lennart Poettering [Fri, 10 Nov 2023 21:45:02 +0000 (22:45 +0100)] 
repart: when we copy in blocks, indicate we are doing from an offset

At first I thought when using --copy-from= that it was copying in my
whole disk into a partition instead of just a partition into a
partition.

Let's make the log message clearer and say that we copy starting from an
offset.

7 months agorepart: mention how long it took to copy in data blocks
Lennart Poettering [Fri, 10 Nov 2023 21:44:36 +0000 (22:44 +0100)] 
repart: mention how long it took to copy in data blocks

This is quite interesting information, show it.

7 months agoexecute: add comment explaining what stdio_as_fds does 29929/head
Lennart Poettering [Wed, 8 Nov 2023 13:11:33 +0000 (14:11 +0100)] 
execute: add comment explaining what stdio_as_fds does

7 months agoexecute: use right fd to fix tty size
Lennart Poettering [Wed, 8 Nov 2023 12:57:09 +0000 (13:57 +0100)] 
execute: use right fd to fix tty size

7 months agoexecute: make clear what reset_terminal_fd()'s 2nd param is about
Lennart Poettering [Wed, 8 Nov 2023 12:56:51 +0000 (13:56 +0100)] 
execute: make clear what reset_terminal_fd()'s 2nd param is about

7 months agoexec-invoke: only reset tty if we are told to
Lennart Poettering [Wed, 8 Nov 2023 12:55:58 +0000 (13:55 +0100)] 
exec-invoke: only reset tty if we are told to

We have a setting for this, honour it also if we are invoked with
stdin passed in as fd.

Fixes: #29714
7 months agoexecute: add new helper exec_context_apply_tty_size()
Lennart Poettering [Wed, 8 Nov 2023 12:39:49 +0000 (13:39 +0100)] 
execute: add new helper exec_context_apply_tty_size()

This combines exec_context_determine_tty_size() and
terminal_set_size_fd() since we always use one after the other.

Also make exec_context_determine_tty_size() return void, since it cannot
fail.

7 months agotest-network: add test case for issue #29979 29981/head
Yu Watanabe [Fri, 10 Nov 2023 18:30:00 +0000 (03:30 +0900)] 
test-network: add test case for issue #29979

7 months agonetwork/dhcp6: skip to check existence of DHCPv6 address when UseAddress=no
Yu Watanabe [Fri, 10 Nov 2023 17:30:20 +0000 (02:30 +0900)] 
network/dhcp6: skip to check existence of DHCPv6 address when UseAddress=no

Follow-up for 1536b7b2d00819615bf8eba194de7ccd20c3689f and
5f950e56211a90b21e8096ebf27c9c2b8afbd231.

Fixes #29979.

7 months agonetwork/dhcp6: use link_check_address_ready() at one more place
Yu Watanabe [Fri, 10 Nov 2023 17:28:56 +0000 (02:28 +0900)] 
network/dhcp6: use link_check_address_ready() at one more place

7 months agonetwork/dhcp-pd: use correct flag when DHCPv4 6rd is enabled
Yu Watanabe [Fri, 10 Nov 2023 17:39:33 +0000 (02:39 +0900)] 
network/dhcp-pd: use correct flag when DHCPv4 6rd is enabled

Previously, Link.dhcp6_configured flag was unconditionally used even if
the route is configured based on the DHCPv4 protocol.

Follow-up for a27588d4e7f780243a1828e2af56562f9d779412 and
e49bad0179cb670edeac12ef062887af0ac4c8c5.

7 months agoupdate TODO
Lennart Poettering [Fri, 10 Nov 2023 15:11:01 +0000 (16:11 +0100)] 
update TODO

7 months agofuzz: pass -Dc_args=/-Dcpp_args= to fuzzer targets
Frantisek Sumsal [Fri, 10 Nov 2023 15:38:01 +0000 (16:38 +0100)] 
fuzz: pass -Dc_args=/-Dcpp_args= to fuzzer targets

Prompted by #29972, because right now it's practically impossible to pass
-fno-sanitize=function to the fuzzer targets without some extensive
sed'ing.

This splits both c_args and cpp_args to separate arguments for
tools/meson-build.sh, because the other way would be to use `eval`, so
the space-separated but quoted strings passed to these options are not
split where they shouldn't, and I'd rather avoid using `eval` if
possible.

Also, this switches the positional arguments we pass to `meson setup`,
as they were in incorrect order (docs say it should be buildir followed
by sourcedir); meson is apparently clever enough to figure this out and
switch the arguments around if necessary, so it didn't complain.

7 months agoMerge pull request #29955 from poettering/repart-seal-key
Luca Boccassi [Fri, 10 Nov 2023 16:52:00 +0000 (16:52 +0000)] 
Merge pull request #29955 from poettering/repart-seal-key

repart: add --tpm2-seal-key= support, matching the recently added support cryptenroll has

7 months agoMerge pull request #29947 from poettering/srk-beefup
Luca Boccassi [Fri, 10 Nov 2023 16:47:46 +0000 (16:47 +0000)] 
Merge pull request #29947 from poettering/srk-beefup

tpm2: make SRK easily accessible for use with systemd-cryptenroll --tpm2-device-key=

7 months agohwdb: Add accelerometer data for Librem11 (#29974)
zeroskyx [Fri, 10 Nov 2023 13:32:05 +0000 (14:32 +0100)] 
hwdb: Add accelerometer data for Librem11 (#29974)

7 months agoportablectl: fix detaching when an extension image has been deleted
Luca Boccassi [Thu, 9 Nov 2023 20:22:26 +0000 (20:22 +0000)] 
portablectl: fix detaching when an extension image has been deleted

7 months agoit.po: updates
Daniele Medri [Fri, 10 Nov 2023 09:44:50 +0000 (10:44 +0100)] 
it.po: updates

7 months agopo: Translated using Weblate (Chinese (Traditional) (zh_TW))
Cheng-Chia Tseng [Fri, 10 Nov 2023 11:30:02 +0000 (12:30 +0100)] 
po: Translated using Weblate (Chinese (Traditional) (zh_TW))

Currently translated at 83.7% (190 of 227 strings)

Co-authored-by: Cheng-Chia Tseng <pswo10680@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/zh_TW/
Translation: systemd/main

7 months agotest: don't pre-process $KERNEL_APPEND
Frantisek Sumsal [Thu, 9 Nov 2023 14:33:31 +0000 (15:33 +0100)] 
test: don't pre-process $KERNEL_APPEND

Let's just rely on the word splitting done by bash instead of messing
with that ourselves, as it's just adding extra complexity to appease one
ShellCheck check. Also, this apparently never worked for the nspawn
stuff anyway, since I forgot to set $IFS to an appropriate value, so it
always put all arguments from $KERNEL_APPEND into a single array item
with an extra newline, which then made systemd sad:

~# readarray arr <<< "foo bar baz"; for i in "${arr[@]}"; do echo "'$i'"; done
'foo bar baz
'
~# make -C test/TEST-45-TIMEDATE/ clean setup run BUILD_DIR=$PWD/build TEST_NO_QEMU=1 KERNEL_APPEND="systemd.log_level=console"
...
~# journalctl -o short-monotonic --no-hostname --file /var/tmp/systemd-tests/systemd-test.XaDX67/system.journal --grep "Failed to parse" -p info --no-pager
[551138.986882] systemd-tmpfiles[21]: Failed to parse log level 'console
[551138.987179] systemd-remount-fs[20]: Failed to parse log level 'console
[551138.993125] systemd-sysusers[23]: Failed to parse log level 'console
[551138.998685] journalctl[29]: Failed to parse log level 'console

Resolves: #29945

7 months agoMerge pull request #29954 from DaanDeMeyer/fix
Luca Boccassi [Thu, 9 Nov 2023 16:30:37 +0000 (16:30 +0000)] 
Merge pull request #29954 from DaanDeMeyer/fix

repart: Fix size round up/round down

7 months agoMerge pull request #29937 from yuwata/network-fix-json-format
Yu Watanabe [Thu, 9 Nov 2023 12:47:37 +0000 (21:47 +0900)] 
Merge pull request #29937 from yuwata/network-fix-json-format

network: fix json output

7 months agoMerge pull request #29783 from CodethinkLabs/vmspawn/notify-socket-forward-pr
Luca Boccassi [Thu, 9 Nov 2023 12:39:10 +0000 (12:39 +0000)] 
Merge pull request #29783 from CodethinkLabs/vmspawn/notify-socket-forward-pr

vmspawn - forward messages to notify socket forward

7 months agotest: drop the workaround for unexpected newlines 29958/head
Frantisek Sumsal [Thu, 9 Nov 2023 12:27:02 +0000 (13:27 +0100)] 
test: drop the workaround for unexpected newlines

7 months agojournal: recalculate line_max when stdout stream state changes
Frantisek Sumsal [Thu, 9 Nov 2023 12:24:57 +0000 (13:24 +0100)] 
journal: recalculate line_max when stdout stream state changes

Otherwise we might still use the more restrictive limit when we get to
STDOUT_STREAM_RUNNING, causing unexpected line breaks in the journal
messages.

Follow-up to: 80e9720616
Resolves: #29916

7 months agobootctl: fix code comment
Antonio Alvarez Feijoo [Thu, 9 Nov 2023 11:07:00 +0000 (12:07 +0100)] 
bootctl: fix code comment

7 months agotest: add one missing assertion
Frantisek Sumsal [Thu, 9 Nov 2023 10:45:35 +0000 (11:45 +0100)] 
test: add one missing assertion

This also makes sure the first signal doesn't "spill" over into the
second check.

7 months agotest: test the new srk extraction functionality 29947/head
Lennart Poettering [Wed, 8 Nov 2023 21:46:44 +0000 (22:46 +0100)] 
test: test the new srk extraction functionality

7 months agoman: update --tpm2-device-key= docs to reference the new ways to get the SRK
Lennart Poettering [Wed, 8 Nov 2023 21:36:28 +0000 (22:36 +0100)] 
man: update --tpm2-device-key= docs to reference the new ways to get the SRK

7 months agoanalyze: add "srk" verb to extract current srk from TPM2 chip
Lennart Poettering [Wed, 8 Nov 2023 21:34:24 +0000 (22:34 +0100)] 
analyze: add "srk" verb to extract current srk from TPM2 chip

This is pretty low-level functionality, hence placed in systemd-analyze.
This is useful for working with systemd-cryptenroll --tpm2-device-key=,
as it acquires the SRK without requiring the full tpm2-tss tool set.

7 months agotpm2-setup: also save the SRK to the file system in TPM2_PUBLIC format
Lennart Poettering [Wed, 8 Nov 2023 21:24:33 +0000 (22:24 +0100)] 
tpm2-setup: also save the SRK to the file system in TPM2_PUBLIC format

We already save it in PEM format, also store it TPM2_PUBLIC format next
to it. This is useful for usage with systemd-cryptenroll's
--tpm2-device-key= switch.

7 months agorepart: add missing --tpm2-pcrlock= in --help text
Lennart Poettering [Thu, 9 Nov 2023 10:01:23 +0000 (11:01 +0100)] 
repart: add missing --tpm2-pcrlock= in --help text

Follow-up for: 404aea7815595c1324947ed7f2a7502b17d3cc01

7 months agoupdate TODO 29955/head
Lennart Poettering [Thu, 9 Nov 2023 09:59:06 +0000 (10:59 +0100)] 
update TODO

7 months agotest: make sure --tpm2-device-key= works correctly in repart, too
Lennart Poettering [Thu, 9 Nov 2023 11:25:07 +0000 (12:25 +0100)] 
test: make sure --tpm2-device-key= works correctly in repart, too

7 months agorepart: add --tpm2-device-key= to repart, too
Lennart Poettering [Wed, 8 Nov 2023 21:42:51 +0000 (22:42 +0100)] 
repart: add --tpm2-device-key= to repart, too

This adds what was added to systemd-cryptenroll recently to
systemd-repart too.

Follow-up for: c3a2a681bed77ce4f9218cd28405994ab5263077

7 months agocryptenroll: slightly reorder things
Lennart Poettering [Wed, 8 Nov 2023 21:37:37 +0000 (22:37 +0100)] 
cryptenroll: slightly reorder things

The tpm2_tpm2b_public_from_pem() invocation only makes sense when we
succeed to load the file from disk, hence we might do this together and
safe a conditionalization.

7 months agotpm2-util: move loading of TPM2B_PUBLIC from disk into tpm2-util.c
Lennart Poettering [Wed, 8 Nov 2023 20:31:45 +0000 (21:31 +0100)] 
tpm2-util: move loading of TPM2B_PUBLIC from disk into tpm2-util.c

No change in behaviour, let's just move this over so that we can reuse
this in repart later (and don't have to export the ugly `sym_` function
pointer for it)

7 months agorepart,cryptenroll: bring tpm2 switches/--help/handling in a single, canonical order
Lennart Poettering [Wed, 8 Nov 2023 19:57:29 +0000 (20:57 +0100)] 
repart,cryptenroll: bring tpm2 switches/--help/handling in a single, canonical order

Let's define the same switches and their backing variables in the same
order, and let's make sure the enums and switches are named the same.

No actual code changes.

7 months agorepart: Fix size round up/round down 29954/head
Daan De Meyer [Thu, 9 Nov 2023 11:10:53 +0000 (12:10 +0100)] 
repart: Fix size round up/round down

Currently, we round minimum sizes up and maximum size down, whereas
it should be the opposite as the current approach means that if the
same size is used for min and max, the min size will end up bigger
than the max size after rounding.

7 months agoSet default value for tools tree
Daan De Meyer [Thu, 9 Nov 2023 11:10:11 +0000 (12:10 +0100)] 
Set default value for tools tree

This allows overriding it from CLI or previous config file if
required.

7 months agovmspawn: update man page to include vsock options 29783/head
Sam Leonard [Thu, 26 Oct 2023 13:03:59 +0000 (14:03 +0100)] 
vmspawn: update man page to include vsock options

7 months agovmspawn: added vsock functionality
Sam Leonard [Tue, 31 Oct 2023 11:35:22 +0000 (11:35 +0000)] 
vmspawn: added vsock functionality

also includes cosmetic fixups from: https://github.com/systemd/systemd/pull/29874

7 months agocore: fix array size in unit_log_resources()
Florian Schmaus [Thu, 9 Nov 2023 07:59:59 +0000 (08:59 +0100)] 
core: fix array size in unit_log_resources()

In 0531bded79dc ("core: include peak memory in unit_log_resources()") new log
messages where added, however the size of the according arrays to hold the
messages was not adjusted.

Fixes: 0531bded79dc ("core: include peak memory in unit_log_resources()")
7 months agoman: document explicitly tha ReadWritePaths= cannot undo superblock read-only settings
Lennart Poettering [Wed, 8 Nov 2023 14:36:43 +0000 (15:36 +0100)] 
man: document explicitly tha ReadWritePaths= cannot undo superblock read-only settings

Fixes: #29266
7 months agoMerge pull request #29949 from mrc0mmand/even-more-ntp-followups
Yu Watanabe [Thu, 9 Nov 2023 06:08:31 +0000 (15:08 +0900)] 
Merge pull request #29949 from mrc0mmand/even-more-ntp-followups

busctl: send READY=1 when we become a monitor

7 months agoMerge pull request #29939 from YHNdnzj/fdopen-independent-mode
Yu Watanabe [Thu, 9 Nov 2023 06:07:11 +0000 (15:07 +0900)] 
Merge pull request #29939 from YHNdnzj/fdopen-independent-mode

basic/fileio: drop O_CREAT in flags passed to fd_reopen

7 months agotest: use Type=notify together with `busctl monitor` 29949/head
Frantisek Sumsal [Wed, 8 Nov 2023 23:00:27 +0000 (00:00 +0100)] 
test: use Type=notify together with `busctl monitor`

Let's use the newly gained feature of `busctl` and start is as a
Type=notify unit, which should make sure the unit is started only after
`busctl` is on the bus listening for messages.

This should help with a race spotted in CIs, where we continued too
early after starting `busctl monitor` and miss the emitted signals:

[   10.914831] testsuite-45.sh[694]: + systemd-run --unit busctl-monitor.service --service-type=exec busctl monitor --json=short '--match=type='\''signal'\'',sender=org.freedesktop.timesync1,member='\''PropertiesChanged'\'',path=/org/free>
[   11.064365] systemd[1]: Starting busctl-monitor.service...
[   11.064903] systemd[1]: Started busctl-monitor.service.
[   11.065192] testsuite-45.sh[740]: Running as unit: busctl-monitor.service; invocation ID: ee44a9d713c34b9a97e3e7f6f4fffe77
...
[   11.069255] testsuite-45.sh[694]: + timedatectl ntp-servers ntp99 10.0.0.1
[   11.077140] systemd-timesyncd[728]: Network configuration changed, trying to establish connection.
[   11.077461] testsuite-45.sh[694]: + assert_networkd_ntp ntp99 10.0.0.1
...
[   11.087418] testsuite-45.sh[694]: + assert_timesyncd_signal '2023-11-08 16:28:48.861455' LinkNTPServers 10.0.0.1
...
[   11.095543] testsuite-45.sh[694]: + for _ in {0..9}
[   11.095543] testsuite-45.sh[694]: + journalctl -q '--since=2023-11-08 16:28:48.861455' -p info _SYSTEMD_UNIT=busctl-monitor.service --grep .
[   11.193258] systemd-journald[375]: Received client request to sync journal.
[   11.112424] testsuite-45.sh[694]: + sleep .5
[   11.160318] dbus-daemon[465]: [system] Connection :1.56 (uid=0 pid=741 comm="/usr/bin/busctl monitor --json=short --match=type=") became a monitor.

Resolves: #29923

7 months agobusctl: send READY=1 when we become a monitor
Frantisek Sumsal [Wed, 8 Nov 2023 22:57:27 +0000 (23:57 +0100)] 
busctl: send READY=1 when we become a monitor

This is pretty much the same stuff as `resolvectl monitor` does, and
allows us to run `busctl monitor` in a Type=notify unit which ensures
that `busctl` is really listening for messages once the unit is marked
as started.

7 months agotest: drop some unnecessary quotes
Frantisek Sumsal [Wed, 8 Nov 2023 22:38:28 +0000 (23:38 +0100)] 
test: drop some unnecessary quotes

7 months agotest-process-util: Handle unprivileged setrlimit success
Dan Nicholson [Wed, 8 Nov 2023 19:15:22 +0000 (12:15 -0700)] 
test-process-util: Handle unprivileged setrlimit success

Currently test_setpriority_closest assumes that setting RLIMIT_NICE to 30 will
fail if the process is unprivileged. If it succeeds, it assumes that the
process is privileged and setresuid and setresgid will succeed.

However, if RLIMIT_NICE is already >= 30, then setrlimit will succeed even if
the process is unprivileged. Guard against that by checking for permission
errors in setresuid and setresgid and skipping the full test if so.

Fixes #22896.

7 months agoMerge pull request #29932 from yuwata/default-network-cleanups
Yu Watanabe [Wed, 8 Nov 2023 20:15:13 +0000 (05:15 +0900)] 
Merge pull request #29932 from yuwata/default-network-cleanups

network: several cleanups for default .network files

7 months agojournalctl: verify sealed log epochs are continuous
Felix Dörre [Fri, 18 Aug 2023 08:00:40 +0000 (10:00 +0200)] 
journalctl: verify sealed log epochs are continuous

Currently empty epochs are not sealed. This allows an attacker to truncate
a sealed log and continue it without any problems showing when verifying the
log.

This partially addresses CVE-2023-31438. One way to extend this change to
address CVE-2023-31438 completely, would be to verify that there is exactly
one seal per epoch (and not sealing when the epoch has not ended yet).

the change also adds a journal-file flag: HEADER_COMPATIBLE_SEALED_CONTINUOUS
this flag indicates that a journal file is sealed continuously and decides whether
any missing crypto epochs should trigger a warning or an error.

7 months agoMerge pull request #29942 from bluca/executor_no_utmp
Luca Boccassi [Wed, 8 Nov 2023 20:01:39 +0000 (20:01 +0000)] 
Merge pull request #29942 from bluca/executor_no_utmp

core: fix build with -Dutmp=false

7 months agoMerge pull request #29927 from yuwata/resolve-mdns-fixlets
Luca Boccassi [Wed, 8 Nov 2023 19:56:31 +0000 (19:56 +0000)] 
Merge pull request #29927 from yuwata/resolve-mdns-fixlets

resolve: several mdns fixlets

7 months agoMerge pull request #29931 from dtardon/udev-remove-property
Luca Boccassi [Wed, 8 Nov 2023 19:55:45 +0000 (19:55 +0000)] 
Merge pull request #29931 from dtardon/udev-remove-property

 udev-manager: actually remove the property

7 months agobasic/fileio: drop O_CREAT before passing flags to fd_reopen 29939/head
Mike Yuan [Wed, 8 Nov 2023 17:43:08 +0000 (01:43 +0800)] 
basic/fileio: drop O_CREAT before passing flags to fd_reopen

Follow-up for 78c21009bfcf0758f9c85dc70ac896c8aab6b535

Fixes #29938

7 months agofd-util: refuse O_CREAT in fd_reopen
Mike Yuan [Wed, 8 Nov 2023 17:10:06 +0000 (01:10 +0800)] 
fd-util: refuse O_CREAT in fd_reopen

O_CREAT doesn't make sense for fd_reopen, since we're
working on an already opened fd. Also, in fd_reopen
we don't handle the mode parameter of open(2), which
means we may get runtime error like #29938.

7 months agoci: add -Dutmp=false coverage 29942/head
Luca Boccassi [Wed, 8 Nov 2023 18:41:09 +0000 (18:41 +0000)] 
ci: add -Dutmp=false coverage

7 months agocore: fix build with -Dutmp=false
Luca Boccassi [Wed, 8 Nov 2023 18:39:48 +0000 (18:39 +0000)] 
core: fix build with -Dutmp=false

7 months agoman: document nameserver= option
Michal Sekletar [Wed, 8 Nov 2023 15:29:25 +0000 (16:29 +0100)] 
man: document nameserver= option

7 months agocore: call mac_init from sd-executor
Luca Boccassi [Wed, 8 Nov 2023 15:24:17 +0000 (15:24 +0000)] 
core: call mac_init from sd-executor

Before the split the SELinux database was inherited via CoW. Since
the split we need to reopen it.

Follow-up for bb5232b6a3b8af

7 months agoupdate TODO
Lennart Poettering [Wed, 8 Nov 2023 17:18:00 +0000 (18:18 +0100)] 
update TODO

7 months agotest-network: verify json format about DHCPv6 client status 29937/head
Yu Watanabe [Wed, 8 Nov 2023 16:31:17 +0000 (01:31 +0900)] 
test-network: verify json format about DHCPv6 client status

7 months agonetwork: fix json generation
Yu Watanabe [Wed, 8 Nov 2023 16:23:12 +0000 (01:23 +0900)] 
network: fix json generation

When the DHCPv6 client is running in the information requesting mode,
then T1 and T2 are not set.

7 months agoman: fix typo
Yu Watanabe [Wed, 8 Nov 2023 15:09:10 +0000 (00:09 +0900)] 
man: fix typo

Follow-up for a9d54de66d62b1180aef845fae2eabde4968dda5.

7 months agonetwork: make 89-ethernet.network match only physical interfaces 29932/head
Yu Watanabe [Wed, 8 Nov 2023 14:05:09 +0000 (23:05 +0900)] 
network: make 89-ethernet.network match only physical interfaces

For safety. We already add similar condition to a generated one:
c25aa6c8acc6d95eaacae7858a7057907d61a25e