]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
8 weeks agoiovec-util: rename iovec_increment() -> iovec_inc_many() 41700/head
Yu Watanabe [Sat, 18 Apr 2026 23:10:14 +0000 (08:10 +0900)] 
iovec-util: rename iovec_increment() -> iovec_inc_many()

Also,
- use iovec_inc() in the loop,
- do not return true when input is NULL or all iovec are empty.

2 months agodhcp-protocol: introduce dhcp_option_code_to_string() 41710/head
Yu Watanabe [Thu, 16 Apr 2026 18:58:12 +0000 (03:58 +0900)] 
dhcp-protocol: introduce dhcp_option_code_to_string()

2 months agosd-dhcp-protocol: rename SD_DHCP_OPTION_HOME_AGENT_ADDRESSES -> SD_DHCP_OPTION_HOME_A...
Yu Watanabe [Sat, 18 Apr 2026 23:23:24 +0000 (08:23 +0900)] 
sd-dhcp-protocol: rename SD_DHCP_OPTION_HOME_AGENT_ADDRESSES -> SD_DHCP_OPTION_HOME_AGENT_ADDRESS

All other similar options are named in singular.

2 months agodhcp-protocol: introduce {bootp,dhcp}_message_type_to_string()
Yu Watanabe [Sat, 21 Mar 2026 17:07:30 +0000 (02:07 +0900)] 
dhcp-protocol: introduce {bootp,dhcp}_message_type_to_string()

2 months agodhcp-protocol: rename several dhcp message types
Yu Watanabe [Sat, 21 Mar 2026 16:55:22 +0000 (01:55 +0900)] 
dhcp-protocol: rename several dhcp message types

These are unused, hence we can freely rename them.

2 months agodhcp-protocol: define BOOTP_MESSAGE_SIZE
Yu Watanabe [Wed, 18 Mar 2026 10:19:18 +0000 (19:19 +0900)] 
dhcp-protocol: define BOOTP_MESSAGE_SIZE

It will be used later.

2 months agodhcp-protocol: introduce DHCPMessageHeader struct
Yu Watanabe [Tue, 17 Mar 2026 17:04:08 +0000 (02:04 +0900)] 
dhcp-protocol: introduce DHCPMessageHeader struct

It is similar to DHCPMessage, but does not have the tail 'options'
variable array. Then, we can use it in another struct.

2 months agodhcp-protocol: Option Overload (52) DHCP option value takes flags
Yu Watanabe [Tue, 17 Mar 2026 17:00:08 +0000 (02:00 +0900)] 
dhcp-protocol: Option Overload (52) DHCP option value takes flags

2 months agotree-wide: check result of iovec_total_size()
Yu Watanabe [Sat, 18 Apr 2026 18:41:42 +0000 (03:41 +0900)] 
tree-wide: check result of iovec_total_size()

2 months agoiovec-util: add overflow check in iovec_total_size()
Yu Watanabe [Fri, 17 Apr 2026 22:21:38 +0000 (07:21 +0900)] 
iovec-util: add overflow check in iovec_total_size()

Mostly theoretical. But for safety.

2 months agoresolve: add missing OOM check
Yu Watanabe [Sat, 18 Apr 2026 22:33:17 +0000 (07:33 +0900)] 
resolve: add missing OOM check

2 months agotree-wide: use iovec_equal()
Yu Watanabe [Sat, 18 Apr 2026 18:30:49 +0000 (03:30 +0900)] 
tree-wide: use iovec_equal()

2 months agoiovec-wrapper: fix memleak, rename functions for consistency, and introduce several...
Yu Watanabe [Sat, 18 Apr 2026 22:29:03 +0000 (07:29 +0900)] 
iovec-wrapper: fix memleak, rename functions for consistency, and introduce several helper functions (#41689)

2 months agoiovec-util: introduce iovec_equal()
Yu Watanabe [Fri, 17 Apr 2026 22:19:27 +0000 (07:19 +0900)] 
iovec-util: introduce iovec_equal()

2 months agoiovec-wrapper: introduce several more helper functions 41689/head
Yu Watanabe [Fri, 17 Apr 2026 14:06:28 +0000 (23:06 +0900)] 
iovec-wrapper: introduce several more helper functions

2 months agoiovec-wrapper: rename iovw_append() to iovw_extend()
Yu Watanabe [Fri, 17 Apr 2026 14:03:11 +0000 (23:03 +0900)] 
iovec-wrapper: rename iovw_append() to iovw_extend()

The naming is consistent with strv_extend().

This also
- introduces tiny iovw_extend_iov() wrapper,
- refuse when the source and target points to the same object,
- check the final count before extending in iovw_extend_iovw().

2 months agoiovec-wrapper: introduce iovw_concat()
Yu Watanabe [Fri, 17 Apr 2026 13:54:54 +0000 (22:54 +0900)] 
iovec-wrapper: introduce iovw_concat()

This is similar to iovw_to_cstring(), but allows embedded NUL, as this
just concat multiple iovec, the result may not be a string.

Now, iovw_to_cstring() internally uses iovw_concat().

2 months agoiovec-wrapper: introduce iovw_compare() and iovw_equal()
Yu Watanabe [Fri, 17 Apr 2026 13:53:56 +0000 (22:53 +0900)] 
iovec-wrapper: introduce iovw_compare() and iovw_equal()

2 months agoiovec-wrapper: fix memleak in iovw_consume() when len == 0
Yu Watanabe [Fri, 17 Apr 2026 13:52:18 +0000 (22:52 +0900)] 
iovec-wrapper: fix memleak in iovw_consume() when len == 0

This makes even when len == 0, the input buffer is freed.
The behavior is consistent with strv_consume() and friends.

2 months agoiovec-util: introduce IOVEC_SHIFT() macro and friends
Yu Watanabe [Mon, 23 Mar 2026 14:04:05 +0000 (23:04 +0900)] 
iovec-util: introduce IOVEC_SHIFT() macro and friends

2 months agosd-dhcp-client: fix memleak of sd_dhcp_client.timeout_ipv6_only_mode
Yu Watanabe [Fri, 10 Apr 2026 04:05:48 +0000 (13:05 +0900)] 
sd-dhcp-client: fix memleak of sd_dhcp_client.timeout_ipv6_only_mode

This also drops unnecessary zero assignments.

2 months agomailmap: name change
Sebastian Bernardt [Sat, 18 Apr 2026 11:19:08 +0000 (21:19 +1000)] 
mailmap: name change

2 months agorepart: add EncryptKDF= option for LUKS2 partitions
Nandakumar Raghavan [Mon, 6 Apr 2026 10:42:51 +0000 (10:42 +0000)] 
repart: add EncryptKDF= option for LUKS2 partitions

systemd-repart currently creates LUKS2 encrypted partitions using
libcryptsetup's default KDF (Argon2id), which requires ~1GB of memory
during key derivation. This is too much for memory-constrained
environments such as kdump with limited crashkernel memory, where
luksOpen fails due to insufficient memory.

Add an EncryptKDF= option to repart.d partition definitions that allows
selecting the KDF type. Supported values are:

- "argon2id" — Argon2id with libcryptsetup-benchmarked parameters
- "pbkdf2"  — PBKDF2 with libcryptsetup-benchmarked parameters
- "minimal" — PBKDF2 with SHA-512, 1000 iterations, no benchmarking,
  matching the existing cryptsetup_set_minimal_pbkdf() behaviour used
  for TPM2-sealed keys

When not specified, the libcryptsetup default (argon2id) is used,
preserving existing behaviour.

The KDF type is applied via sym_crypt_set_pbkdf_type() after
sym_crypt_format() and before any keyslots are added.

2 months agobootspec: two smaller tweaks to bootspec.c (#41690)
Luca Boccassi [Sat, 18 Apr 2026 10:02:35 +0000 (11:02 +0100)] 
bootspec: two smaller tweaks to bootspec.c (#41690)

The first commit is prep work for #41543 but I think it makes a ton of
sense on its own as it cleans up logging a bit.

2 months agorandom-util: introduce random_bytes_allocate_iovec() helper function
Yu Watanabe [Wed, 18 Mar 2026 10:10:01 +0000 (19:10 +0900)] 
random-util: introduce random_bytes_allocate_iovec() helper function

It is similar to crypto_random_bytes_allocate_iovec(), but possibly
insecure.

2 months agobootspec: improve documentation around id/file BootEntry fields 41690/head
Lennart Poettering [Wed, 15 Apr 2026 14:19:43 +0000 (16:19 +0200)] 
bootspec: improve documentation around id/file BootEntry fields

2 months agobootspec: make boot_filename_extract_tries() ready for use outside of bootspec.c
Lennart Poettering [Wed, 15 Apr 2026 14:18:53 +0000 (16:18 +0200)] 
bootspec: make boot_filename_extract_tries() ready for use outside of bootspec.c

2 months agoVarious useful helpers (#41684)
Lennart Poettering [Sat, 18 Apr 2026 07:50:19 +0000 (09:50 +0200)] 
Various useful helpers (#41684)

Split out of #41543.

These don't make too much sense on their own, but they also don't really
hurt. They are preparation for #41543, but in order to make things
either to review I split these four commits out, since they are not
directly part of what the PR shall achieve

2 months agoboot: minor clean-ups in initrd_unregister()
Lennart Poettering [Tue, 7 Apr 2026 20:25:24 +0000 (22:25 +0200)] 
boot: minor clean-ups in initrd_unregister()

2 months agobootctl: minor tweaks (#41695)
Lennart Poettering [Sat, 18 Apr 2026 06:41:46 +0000 (08:41 +0200)] 
bootctl: minor tweaks (#41695)

This is split out of #41543, but makes sense on its own.

2 months agoboot: switch initrd_register() to use _cleanup_free_ and other tweaks
Lennart Poettering [Fri, 20 Mar 2026 21:07:51 +0000 (22:07 +0100)] 
boot: switch initrd_register() to use _cleanup_free_ and other tweaks

2 months agoman: Fix NOTES formatting
Tobias Stoeckmann [Fri, 17 Apr 2026 19:48:53 +0000 (21:48 +0200)] 
man: Fix NOTES formatting

The NOTES section in os-release(5) contains an unusual formatting.
Switch function and ulink tags and remove a newline within ulink text to
keep the entry formatting in sync with others. Also, this preserves the
formatting within the text itself.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 months agonetwork/json: two trivial cleanups (#41693)
Zbigniew Jędrzejewski-Szmek [Fri, 17 Apr 2026 17:25:17 +0000 (19:25 +0200)] 
network/json: two trivial cleanups (#41693)

2 months agostring-util: make make_cstring() take void* rather than char*
Yu Watanabe [Thu, 16 Apr 2026 23:41:50 +0000 (08:41 +0900)] 
string-util: make make_cstring() take void* rather than char*

It is typically used for making C string embedded in a binary data.
Hence, the input pointer may not be char*.

2 months agomountpoint-util: initialize mnt_id for name_to_handle_at(AT_HANDLE_MNT_ID_UNIQUE)
Yu Watanabe [Fri, 17 Apr 2026 06:43:38 +0000 (15:43 +0900)] 
mountpoint-util: initialize mnt_id for name_to_handle_at(AT_HANDLE_MNT_ID_UNIQUE)

Suppress the following message:
```
$ sudo valgrind --leak-check=full build/networkctl dhcp-lease wlp59s0
==175708== Memcheck, a memory error detector
==175708== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al.
==175708== Using Valgrind-3.26.0 and LibVEX; rerun with -h for copyright info
==175708== Command: build/networkctl status wlp59s0
==175708==
==175708== Conditional jump or move depends on uninitialised value(s)
==175708==    at 0x4BC33D1: inode_same_at (stat-util.c:610)
==175708==    by 0x4BF1972: inode_same (stat-util.h:86)
==175708==    by 0x4BF48FE: running_in_chroot (virt.c:817)
==175708==    by 0x4B16643: running_in_chroot_or_offline (verbs.c:37)
==175708==    by 0x4B175CE: _dispatch_verb_with_args (verbs.c:136)
==175708==    by 0x4B17868: dispatch_verb (verbs.c:160)
==175708==    by 0x407CBB: networkctl_main (networkctl.c:249)
==175708==    by 0x407D06: run (networkctl.c:263)
==175708==    by 0x407D39: main (networkctl.c:266)
==175708==
```
Not sure if it is an issue in valgrind or glibc, but at least there is
nothing we can do except for working around it.

2 months agoA small batch of conversions to the new option+verbs macros (#41671)
Zbigniew Jędrzejewski-Szmek [Fri, 17 Apr 2026 17:04:04 +0000 (19:04 +0200)] 
A small batch of conversions to the new option+verbs macros (#41671)

Those are all relatively straightforward.

2 months agosleep: convert to "verbs", using the new option+verb macros
Zbigniew Jędrzejewski-Szmek [Fri, 17 Apr 2026 06:00:54 +0000 (08:00 +0200)] 
sleep: convert to "verbs", using the new option+verb macros

We had verb-like dispatch, but done in a manual way. We have a fairly
heavy preperation steps that wraps all operations in the same way, so we
don't want to call the operation implementation functions directly. But
let's use the generic verb machinery and pass the state directly using
the userdata pointer and the recently added verb data pointer.

--help output is substantially the same, but options are now in a new
section below the verbs.

2 months agoRework ssh-issue to be verb-based and convert to the new verb+option parsing (#41668)
Zbigniew Jędrzejewski-Szmek [Fri, 17 Apr 2026 17:01:01 +0000 (19:01 +0200)] 
Rework ssh-issue to be verb-based and convert to the new verb+option parsing (#41668)

This is a bit involved because the old interface was documented, so
compat glue needed to be added.
But I think it's an improvement overall.

2 months agobootctl: make bootspec-util.c independent of bootctl.c 41695/head
Lennart Poettering [Fri, 17 Apr 2026 14:34:34 +0000 (16:34 +0200)] 
bootctl: make bootspec-util.c independent of bootctl.c

This changes boot_config_load_and_select() to also take the root path as
input, just like the ESP and XBOOTLDR path.

This has the benefit of making the whole file independent of bootctl.c,
which means we can link it into a separate test, and is preparatory work
for a follow-up commit.

2 months agobootctl: drop redundant log message
Lennart Poettering [Mon, 13 Apr 2026 20:50:26 +0000 (22:50 +0200)] 
bootctl: drop redundant log message

If unprivileged_mode is false then verify_esp() will treat access errors
like any other and log about them. Here we set it to false, hence
there's no point to log a 2nd time.

2 months agonetwork/json: drop unnecessary return value assignment 41693/head
Yu Watanabe [Thu, 9 Apr 2026 23:02:41 +0000 (08:02 +0900)] 
network/json: drop unnecessary return value assignment

2 months agonetwork/json: fix error handling
Yu Watanabe [Thu, 9 Apr 2026 23:02:14 +0000 (08:02 +0900)] 
network/json: fix error handling

2 months agostat-util: add vfs_free_bytes() 41684/head
Lennart Poettering [Mon, 13 Apr 2026 15:57:10 +0000 (17:57 +0200)] 
stat-util: add vfs_free_bytes()

The casts and the right fields to multiply aren't entirely trivial,
let's add a helper for it.

2 months agostring-util: add minor optimization to strrstr()
Lennart Poettering [Wed, 15 Apr 2026 14:06:04 +0000 (16:06 +0200)] 
string-util: add minor optimization to strrstr()

2 months agostring-util: add new strrstr_no_case() call
Lennart Poettering [Wed, 15 Apr 2026 14:05:37 +0000 (16:05 +0200)] 
string-util: add new strrstr_no_case() call

2 months agoparse-util: add safe_atou64_full()
Lennart Poettering [Fri, 17 Apr 2026 12:56:15 +0000 (14:56 +0200)] 
parse-util: add safe_atou64_full()

2 months agoboot: gracefully handle LoadFile() implementations that return EFI_SUCCESS with a...
Lennart Poettering [Fri, 17 Apr 2026 12:58:46 +0000 (14:58 +0200)] 
boot: gracefully handle LoadFile() implementations that return EFI_SUCCESS with a NULL buffer

LoadFile() with a NULL buffer is supposed to return the file size
without acquiring the data and return EFI_BUFFER_TOO_SMALL.

However it appears some firmware returns EFI_SUCCESS in case the file is
empty, i.e. the file size returned is zero. And I guess that's even
fine.

Let's handle this gracefully hence.

2 months agoboot: never auto-boot a menu entry with the non-default profile
Lennart Poettering [Fri, 17 Apr 2026 10:19:58 +0000 (12:19 +0200)] 
boot: never auto-boot a menu entry with the non-default profile

When figuring out which menu entry to pick by default, let's not
consider any with a profile number > 0. This reflects that fact that
additional profiles are generally used for
debug/recovery/factory-reset/storage target mode boots, and those should
never be auto-selected. Hence do a simple check: if profile != 0, simply
do not consider the entry as a default.

We might eventually want to beef this up, and add a property one can set
in the profile metadata that controls this behaviour, but for now let's
just do a this simple fix.

2 months agoman: drop redundant word from varlinkctl man page
Lennart Poettering [Fri, 17 Apr 2026 13:12:05 +0000 (15:12 +0200)] 
man: drop redundant word from varlinkctl man page

2 months agonamespace: don't log misleading error in the r > 0 path
Frantisek Sumsal [Fri, 17 Apr 2026 13:51:40 +0000 (15:51 +0200)] 
namespace: don't log misleading error in the r > 0 path

fd_is_fs_type() returns < 0 for errors, 0 for false, and > 0 for true, so
in the r > branch we'd most likely report EPERM together with the error
message which is misleading.

2 months agoRevert "ci: Switch PR review workflow to Opus 4.7 via Mantle endpoint"
Luca Boccassi [Fri, 17 Apr 2026 13:16:21 +0000 (14:16 +0100)] 
Revert "ci: Switch PR review workflow to Opus 4.7 via Mantle endpoint"

This reverts commit 011233858520fe607eeff29cfc92d40cf71a6002.

2 months agosystemctl: add --kernel-cmdline= argument
Luca Boccassi [Thu, 16 Apr 2026 22:50:07 +0000 (23:50 +0100)] 
systemctl: add --kernel-cmdline= argument

Allows appending kernel command line arguments, like
kexec-tool does. This is especially needed for the integration
tests, as mkosi adds a bunch of options that are needed for the
test suite to work, and it breaks without them.

2 months agoFollowups for recent changes to basic/iovec-wrapper (#41676)
Luca Boccassi [Fri, 17 Apr 2026 12:55:51 +0000 (13:55 +0100)] 
Followups for recent changes to basic/iovec-wrapper (#41676)

2 months agonspawn: avoid passing NULL to log_syntax()
Frantisek Sumsal [Fri, 17 Apr 2026 12:55:29 +0000 (14:55 +0200)] 
nspawn: avoid passing NULL to log_syntax()

If range is NULL (i.e. when PrivateUsers= doesn't contain ':'),
both later error paths will then pass NULL to log_syntax():

~# cat foo.nspawn
[Exec]
PrivateUsers=9999999999999999999

~# SYSTEMD_LOG_LEVEL=debug systemd-nspawn -D foo |& grep foo.nspawn
Found settings file: /root/foo.nspawn
/root/foo.nspawn:2: UID/GID shift invalid, ignoring: (null)

or

~# cat foo.nspawn
[Exec]
PrivateUsers=4294967294

~ # SYSTEMD_LOG_LEVEL=debug systemd-nspawn -D foo |& grep foo.nspawn
Found settings file: /root/foo.nspawn
/root/foo.nspawn:2: UID/GID shift and range combination invalid, ignoring: (null)

Let's just use rvalue in both of these cases instead.

2 months agovmspawn: catch unsupported growing of qcow2 images 41654/head
Kai Lüke [Thu, 16 Apr 2026 06:10:02 +0000 (15:10 +0900)] 
vmspawn: catch unsupported growing of qcow2 images

For qcow2 images it's not enough to grow the file. Since we probably
don't want to shell out to qemu-img either let's just error out to make
the user aware that growing needs to be done manually.

2 months agoudev-builtin: add a couple of asserts 41674/head
Frantisek Sumsal [Thu, 16 Apr 2026 13:48:16 +0000 (15:48 +0200)] 
udev-builtin: add a couple of asserts

2 months agoscsi_id: use safe_atoi() instead of plain atoi()
Frantisek Sumsal [Thu, 16 Apr 2026 13:55:10 +0000 (15:55 +0200)] 
scsi_id: use safe_atoi() instead of plain atoi()

2 months agobasic/iovec-wrapper: use iovw_append in one more place 41676/head
Zbigniew Jędrzejewski-Szmek [Fri, 17 Apr 2026 10:25:58 +0000 (12:25 +0200)] 
basic/iovec-wrapper: use iovw_append in one more place

2 months agobasic/iovec-wrapper: fix potential memleak on error
Zbigniew Jędrzejewski-Szmek [Fri, 17 Apr 2026 10:19:40 +0000 (12:19 +0200)] 
basic/iovec-wrapper: fix potential memleak on error

Also reorder the functions in the call stack order.

2 months agodissect-image: fix path building for non-raw images
Frantisek Sumsal [Fri, 17 Apr 2026 09:52:41 +0000 (11:52 +0200)] 
dissect-image: fix path building for non-raw images

If the passed in image path didn't end with .raw, we'd return an empty
string + suffix instead of the intended image + suffix path.

Follow-up for 89e62e0bd3cb72915b705b5e2da1834e4d8aea9f.

2 months agossh-issue: replace verb options by normal verbs 41668/head
Zbigniew Jędrzejewski-Szmek [Fri, 17 Apr 2026 07:07:31 +0000 (09:07 +0200)] 
ssh-issue: replace verb options by normal verbs

The interface of this program was rather strange. It took an option that
specified what to do, but that option behaved exactly like a verb. Let's
change the interface to the more modern style with verbs. Since the
inteface was documented in the man page, provide a compat shim to handle
the old options.

(In practice, I doubt anybody will notice the change. But since it was
documented, it's easier to provide the compat then to think too much
whether it is actually needed. I think we can drop it an year or so.)

2 months agosocket-proxyd: convert to the new option parser 41671/head
Zbigniew Jędrzejewski-Szmek [Fri, 17 Apr 2026 06:00:58 +0000 (08:00 +0200)] 
socket-proxyd: convert to the new option parser

--help output is identical in content. --help/--version as now
first in the list, as is usual.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
2 months agorandom-seed: convert to "verbs", use the new option+verb code
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 21:42:48 +0000 (23:42 +0200)] 
random-seed: convert to "verbs", use the new option+verb code

--help output is the same except for indentation.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
2 months agossh-issue: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Fri, 17 Apr 2026 06:41:30 +0000 (08:41 +0200)] 
ssh-issue: convert to the new option parser

--make-vsock and --rm-vsock are now described in --help, not only
shown in synopsis.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
2 months agostring-util: check for overflow in strrep() (#41661)
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 20:36:22 +0000 (22:36 +0200)] 
string-util: check for overflow in strrep() (#41661)

This simply mirrors the same overflow check we already have in
strrepa(), in case someone passed us a sufficiently long string.

strrep() is currently used only in tests, so this is just hardening.

2 months agoreport: add ability to upload reports over http (#41440)
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 20:35:05 +0000 (22:35 +0200)] 
report: add ability to upload reports over http (#41440)

2 months agoSupport for "positional options" and another batch of conversions (#41651)
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 20:33:06 +0000 (22:33 +0200)] 
Support for "positional options" and another batch of conversions (#41651)

To make review more sensible, I split out the reordering into separate
commits when there was a lot of reordering.

2 months agoreport: limit server answer to 1 MiB 41440/head
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 15:54:03 +0000 (17:54 +0200)] 
report: limit server answer to 1 MiB

As suggested in review.

2 months agotest: add HTTPS upload test for systemd-report
Zbigniew Jędrzejewski-Szmek [Tue, 7 Apr 2026 12:34:53 +0000 (14:34 +0200)] 
test: add HTTPS upload test for systemd-report

Extend fake-report-server.py with optional --cert, --key, --port
arguments for TLS support. Add a test case that generates a
self-signed certificate and tests HTTPS upload of metrics and facts.

Also exercise the --header param.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
2 months agotest: add HTTP upload test for systemd-report
Zbigniew Jędrzejewski-Szmek [Tue, 7 Apr 2026 12:09:25 +0000 (14:09 +0200)] 
test: add HTTP upload test for systemd-report

Add a fake HTTP server (fake-report-server.py) that accepts JSON POST
requests and validates the report structure, and test cases in
TEST-74-AUX-UTILS.report.sh that exercise plain HTTP upload of both
metrics and facts.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
2 months agoreport: add option to inject additional HTTP headers
Zbigniew Jędrzejewski-Szmek [Wed, 1 Apr 2026 05:32:46 +0000 (07:32 +0200)] 
report: add option to inject additional HTTP headers

This is useful when debugging things. The option is named and implements
the same logic as imdsd.

2 months agoshared/webutil: reorder .c to match .h, mark one more function as _pure_
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 15:31:59 +0000 (17:31 +0200)] 
shared/webutil: reorder .c to match .h, mark one more function as _pure_

2 months agoreport: add basic upload functionality
Zbigniew Jędrzejewski-Szmek [Fri, 6 Mar 2026 10:36:13 +0000 (11:36 +0100)] 
report: add basic upload functionality

2 months agoshared/curl-util: add curl_append_to_header
Zbigniew Jędrzejewski-Szmek [Mon, 13 Apr 2026 19:46:44 +0000 (21:46 +0200)] 
shared/curl-util: add curl_append_to_header

2 months agotest-string-util: test empty_to_null on a char array
Zbigniew Jędrzejewski-Szmek [Mon, 13 Apr 2026 19:46:12 +0000 (21:46 +0200)] 
test-string-util: test empty_to_null on a char array

Unfortunately empty_to_null(t) where t is char[] fails. But it
works with &t[0].

2 months agotest: add test-iovec-wrapper
Zbigniew Jędrzejewski-Szmek [Tue, 14 Apr 2026 22:48:31 +0000 (00:48 +0200)] 
test: add test-iovec-wrapper

Tests the old code in iovec-wrapper and the two new functions.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
2 months agobasic/iovec-wrapper: add iovw_append and iovw_to_cstring
Zbigniew Jędrzejewski-Szmek [Mon, 13 Apr 2026 19:41:32 +0000 (21:41 +0200)] 
basic/iovec-wrapper: add iovw_append and iovw_to_cstring

Existing iovw_append is renamed to iovw_append_iovw.
iovw_consume is made noninline.

2 months agotimesync: verify the actual size of the received data
Frantisek Sumsal [Thu, 16 Apr 2026 09:13:27 +0000 (11:13 +0200)] 
timesync: verify the actual size of the received data

iov.iov_len doesn't change after calling recvmsg() so it remains set to
sizeof(ntpmsg), which makes the check for a short packet always false.
Let's fix that by checking the actual size of the received data instead.

2 months agoci: Switch PR review workflow to Opus 4.7 via Mantle endpoint
Daan De Meyer [Thu, 16 Apr 2026 17:04:43 +0000 (19:04 +0200)] 
ci: Switch PR review workflow to Opus 4.7 via Mantle endpoint

Opus 4.7 is in research preview on Bedrock and the Invoke API rejects
the beta headers Claude Code sends ("invalid beta flag"). Enable the
Mantle endpoint, which serves Claude via the native Anthropic API shape
and accepts those headers, and switch the model ID to the Mantle form
(no region prefix or version suffix).

2 months agopcrextend: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 16:47:33 +0000 (18:47 +0200)] 
pcrextend: convert to the new option parser

--help is identical except for indentation and common option strings.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
2 months agopath-tool: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 16:34:53 +0000 (18:34 +0200)] 
path-tool: convert to the new option parser

--help output is identical except for indentation and common option
strings.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
2 months agooomd: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 16:33:32 +0000 (18:33 +0200)] 
oomd: convert to the new option parser

--help output is idential except for indentation.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
2 months agooomctl: convert to the new option and verb parsers
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 16:32:13 +0000 (18:32 +0200)] 
oomctl: convert to the new option and verb parsers

--help is the same, except for whitespace and common option
descriptions.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
2 months agostring-util: check for overflow in strrep() 41661/head
Frantisek Sumsal [Thu, 16 Apr 2026 09:59:36 +0000 (11:59 +0200)] 
string-util: check for overflow in strrep()

This simply mirrors the same overflow check we already have in
strrepa(), in case someone passed us a sufficiently long string.

strrep() is currently used only in tests, so this is just hardening.

2 months agobasic/iovec-wrapper: drop unused code
Zbigniew Jędrzejewski-Szmek [Tue, 14 Apr 2026 06:28:28 +0000 (08:28 +0200)] 
basic/iovec-wrapper: drop unused code

All non-test users iovec_wrapper define the struct as a field in a
bigger structure, so we never free it individually. Let's simplify the
code and assume it is never null.

2 months agoshared/facts: use SD_JSON_BUILD_PAIR_VARIANT in one more place
Zbigniew Jędrzejewski-Szmek [Tue, 7 Apr 2026 11:32:33 +0000 (13:32 +0200)] 
shared/facts: use SD_JSON_BUILD_PAIR_VARIANT in one more place

Suggested in review by Claude.

2 months agojournal-upload: require TLS 1.2 as the minimum version
Zbigniew Jędrzejewski-Szmek [Tue, 7 Apr 2026 11:25:08 +0000 (13:25 +0200)] 
journal-upload: require TLS 1.2 as the minimum version

RFC 8996 says:
> This document formally deprecates Transport Layer Security (TLS)
> versions 1.0 (RFC 2246) and 1.1 (RFC 4346). Accordingly, those
> documents have been moved to Historic status. These versions lack
> support for current and recommended cryptographic algorithms and
> mechanisms, and various government and industry profiles of
> applications using TLS now mandate avoiding these old TLS versions.
> TLS version 1.2 became the recommended version for IETF protocols in
> 2008 (subsequently being obsoleted by TLS version 1.3 in 2018),
> providing sufficient time to transition away from older versions.
> Removing support for older versions from implementations reduces the
> attack surface, reduces opportunity for misconfiguration, and
> streamlines library and product maintenance.

This code probably only talks to our own receiver which uses
libmicrohttpd. That in turn delegates to GnuTLS, which supports
1.2, 1.3, 3.0, etc.

2 months agomeson: use a convenience lib for curl-util.c
Zbigniew Jędrzejewski-Szmek [Tue, 31 Mar 2026 11:08:03 +0000 (13:08 +0200)] 
meson: use a convenience lib for curl-util.c

Previously we compiled curl-util.c at least two times, and then also
shared it using the extract+object. Let's build a static "convenience lib"
for it.

(Using extract+object everywhere is not possible because the different
places where it is used are conditionalized independently so we don't
have a single "source" that is always available.)

2 months agofirstboot: use parse_boolean_argument in one more place 41651/head
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 07:20:31 +0000 (09:20 +0200)] 
firstboot: use parse_boolean_argument in one more place

This was pointed out in review.

2 months agofirstboot: use free_and_strdup_warn in parse_argv
Zbigniew Jędrzejewski-Szmek [Tue, 14 Apr 2026 14:31:15 +0000 (16:31 +0200)] 
firstboot: use free_and_strdup_warn in parse_argv

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
2 months agofirstboot: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Tue, 14 Apr 2026 14:27:35 +0000 (16:27 +0200)] 
firstboot: convert to the new option parser

The descriptions for boolean options are adjusted to work better
with BOOL as the metavar.

Description of --copy is fixed, fixup for
f649325ba73a7165a14c1f1134b30b12a96d3718.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
2 months agofirstboot: reorder option cases to match --help output
Zbigniew Jędrzejewski-Szmek [Tue, 14 Apr 2026 14:53:56 +0000 (16:53 +0200)] 
firstboot: reorder option cases to match --help output

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
2 months agocreds: convert to the new option and verb parsers
Zbigniew Jędrzejewski-Szmek [Tue, 14 Apr 2026 13:37:24 +0000 (15:37 +0200)] 
creds: convert to the new option and verb parsers

Metavars in --help are adjusted to make the left column less
wide. --no-ask-password and --quiet are now shown in help.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
2 months agocreds: reorder option cases to match --help output
Zbigniew Jędrzejewski-Szmek [Tue, 14 Apr 2026 14:50:55 +0000 (16:50 +0200)] 
creds: reorder option cases to match --help output

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
2 months agocgtop: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Tue, 14 Apr 2026 13:08:25 +0000 (15:08 +0200)] 
cgtop: convert to the new option parser

A few --help strings are changed to the common option variants.
The optional args for --unit, --user-unit, --xattr, --cgroup-id
are shown in synopsis.

A define is defined for the default of --depth to make things
clearer.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
2 months agocgtop: reorder option cases to match --help output
Zbigniew Jędrzejewski-Szmek [Tue, 14 Apr 2026 14:46:38 +0000 (16:46 +0200)] 
cgtop: reorder option cases to match --help output

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
2 months agocgls: fix/update/restore the handling of --xattr and --cgroup-id
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 08:07:32 +0000 (10:07 +0200)] 
cgls: fix/update/restore the handling of --xattr and --cgroup-id

This is a bit tricky. Previously, the --help string said
"-x --xattr=BOOL", which normally means that '-x BOOL' and '--xattr BOOL'
and '--xattr=BOOL' are all accepted and equivalent. But actually only
the third form was accepted. '-x' should have been and is now documented
as "Same as --xattr=true". The man page tried to explain this, but not
very strongly. So update the man page to have more emphasis and restore
the special behaviour for -x and -c. This is a on old program, so I
think in this case, maintaining compatiblity in behaviour is important.

2 months agocgls: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Tue, 14 Apr 2026 13:06:55 +0000 (15:06 +0200)] 
cgls: convert to the new option parser

arg_names is changed to be a normal strv. In the new parser code,
the argument is returned as a const char*. Dropping the const
to stuff it into the array would be too ugly.

The metavars for optional args are now shown in --help.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
2 months agopo: Update Serbian and add Serbian Latin translation (#41597)
kostich [Thu, 16 Apr 2026 12:38:09 +0000 (14:38 +0200)] 
po: Update Serbian and add Serbian Latin translation (#41597)

Updates the existing Serbian (`sr`) translation and adds a new Serbian
Latin (`sr@latin`) translation, with both locales registered in
`po/LINGUAS`.

2 months agomachined: gate metadata querying behind inspect-machines/images action
Luca Boccassi [Tue, 14 Apr 2026 19:22:39 +0000 (20:22 +0100)] 
machined: gate metadata querying behind inspect-machines/images action

Ensure only privileged users can call the system scope machined's
APIs that get data out of a machine

Follow-up for 1bd979dddbb6ed3ffe410d78a7ff80cbb1c42a64
Follow-up for 9153b02bb5030e29d6008992fb74b9028d7c392c