]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 days 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.

3 days 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>
3 days 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>
3 days 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.

3 days 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_

3 days 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

3 days 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

3 days 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].

3 days 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>
3 days 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.

3 days 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.

3 days 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.

3 days 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.

3 days 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.)

4 days agoshared: move src/import/curl-util.h to src/shared/
Zbigniew Jędrzejewski-Szmek [Tue, 31 Mar 2026 10:40:47 +0000 (12:40 +0200)] 
shared: move src/import/curl-util.h to src/shared/

Move more common definitions in the header file instead of repeating
them in bunch of places. src/import/curl-util.[ch] is renamed so that
it's shared more naturally with other components.

5 days agojournal-upload: modernize macro wrapping curl_easy_setopt
Zbigniew Jędrzejewski-Szmek [Mon, 9 Feb 2026 11:02:03 +0000 (12:02 +0100)] 
journal-upload: modernize macro wrapping curl_easy_setopt

We cannot use a function, because the type is unknown and we want
to stringify the option name, but we can use a block macro to make
this a bit nicer, with normal code structure in the caller.

5 days agoreport: use the new option and verb macros
Zbigniew Jędrzejewski-Szmek [Tue, 24 Mar 2026 22:30:13 +0000 (23:30 +0100)] 
report: use the new option and verb macros

5 days agoTEST-75-RESOLVED: Make sure --suppress-sync is not used
Daan De Meyer [Mon, 6 Apr 2026 13:11:08 +0000 (15:11 +0200)] 
TEST-75-RESOLVED: Make sure --suppress-sync is not used

5 days agotest-seccomp: Handle environment where sync() is already suppressed
Daan De Meyer [Sun, 5 Apr 2026 19:29:31 +0000 (21:29 +0200)] 
test-seccomp: Handle environment where sync() is already suppressed

We might be running in an nspawn container booted with --suppress-sync,
so make sure we handle that scenario gracefully.

5 days agoTEST-06-SELINUX: Relabel in the initrd rather than at image build time
Daan De Meyer [Thu, 26 Mar 2026 14:40:07 +0000 (15:40 +0100)] 
TEST-06-SELINUX: Relabel in the initrd rather than at image build time

This gets rid of the requirement to run the image build as root.

5 days agoTEST-64-UDEV-STORAGE: Add missing scsi controllers
Daan De Meyer [Thu, 26 Mar 2026 13:22:43 +0000 (14:22 +0100)] 
TEST-64-UDEV-STORAGE: Add missing scsi controllers

5 days agoTEST-24-CRYPTSETUP: Use virtio-blk-pci
Daan De Meyer [Thu, 26 Mar 2026 12:57:13 +0000 (13:57 +0100)] 
TEST-24-CRYPTSETUP: Use virtio-blk-pci

Doesn't require a controller.

5 days agoTEST-13-NSPAWN: Use timeout --foreground in two more places
Daan De Meyer [Thu, 26 Mar 2026 08:01:58 +0000 (09:01 +0100)] 
TEST-13-NSPAWN: Use timeout --foreground in two more places

5 days agoTEST-07-PID1: Use --foreground with timeout
Daan De Meyer [Thu, 26 Mar 2026 07:41:36 +0000 (08:41 +0100)] 
TEST-07-PID1: Use --foreground with timeout

Otherwise the test fails if a TTY is attached to stdio.

5 days agoTEST-07-PID1: Don't fail in vm without ESP or XBOOTLDR mount
Daan De Meyer [Thu, 26 Mar 2026 07:41:17 +0000 (08:41 +0100)] 
TEST-07-PID1: Don't fail in vm without ESP or XBOOTLDR mount

5 days agodocs: update footer to 2026
roib [Tue, 14 Apr 2026 15:06:34 +0000 (08:06 -0700)] 
docs: update footer to 2026

5 days agotest: do not use nanoseconds width specifier in date command
Nick Rosbrook [Mon, 13 Apr 2026 20:06:23 +0000 (16:06 -0400)] 
test: do not use nanoseconds width specifier in date command

Using the format specifier +%s%6N with GNU date is honored, and only
prints 6 digits of the nanoseconds portion of the seconds since epoch.
The uutils implementation of date does not honor this, and always prints
all 9 digits. This is a known bug[1], but can be worked around by
adapting this test to use nanoseconds instead of microseconds.

[1] https://github.com/uutils/coreutils/issues/11658

5 days agoparse-helpers: Silence coverity warning
Daan De Meyer [Tue, 14 Apr 2026 13:41:21 +0000 (15:41 +0200)] 
parse-helpers: Silence coverity warning

5 days ago tree-wide: convert remaining varlink string fields to enum types (#41615)
Lennart Poettering [Tue, 14 Apr 2026 12:04:13 +0000 (14:04 +0200)] 
 tree-wide: convert remaining varlink string fields to enum types (#41615)

Follow-up to #40972. Convert remaining plain string fields to proper
varlink enum types across all interfaces, per the policy that
user-controlled/API fields should be declared as proper enums in the
IDL.

Interfaces converted:
- io.systemd.Manager — LogTarget, DefaultStandardOutput/Error,
DefaultMemory/CPU/IOPressureWatch, DefaultOOMPolicy,
CtrlAltDelBurstAction (8 fields)
- io.systemd.Unit — CPUSchedulingPolicy, IOSchedulingClass, NUMAPolicy,
MountFlags (4 fields)
- io.systemd.Machine — class, whom (2 fields, input dispatch converted
to JSON_DISPATCH_ENUM_DEFINE for automatic dashify fallback)
- io.systemd.oom / io.systemd.ManagedOOM — mode in ControlGroup (1
field)

Shared types moved to varlink-idl-common: ExecOutputType,
CGroupPressureWatch, EmergencyAction, ManagedOOMMode — these are reused
across multiple interfaces.

Each interface change includes a corresponding enum sync test to catch
future drift between C string tables and varlink IDL definitions.

5 days agotree-wide: use JSON_BUILD_PAIR_ENUM() more often
Lennart Poettering [Tue, 14 Apr 2026 10:29:52 +0000 (12:29 +0200)] 
tree-wide: use JSON_BUILD_PAIR_ENUM() more often

5 days agodocs: clarify when to use varlink enum types vs plain strings
Ivan Kruglov [Tue, 14 Apr 2026 09:25:43 +0000 (02:25 -0700)] 
docs: clarify when to use varlink enum types vs plain strings

Add guidance on when a field should use a proper varlink enum type
versus remaining a plain string: user-controlled/API fields should be
enums, engine-internal state fields may stay as strings.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
6 days agovarlink: add ManagedOOMMode enum type to io.systemd.oom 41615/head
Ivan Kruglov [Mon, 13 Apr 2026 10:56:48 +0000 (03:56 -0700)] 
varlink: add ManagedOOMMode enum type to io.systemd.oom

Convert the mode field in ControlGroup from plain string to the
ManagedOOMMode enum type from varlink-idl-common. Register
ManagedOOMMode in both io.systemd.oom and io.systemd.ManagedOOM
interfaces since both use the ControlGroup struct.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
6 days agovarlink: add enum types for class and whom fields in io.systemd.Machine
Ivan Kruglov [Mon, 13 Apr 2026 10:32:16 +0000 (03:32 -0700)] 
varlink: add enum types for class and whom fields in io.systemd.Machine

Convert the class field (Register input, List output) from plain string
to MachineClass enum type, and the whom field (Kill input) to KillWhom
enum type.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
6 days agovarlink: add enum types for scheduling and mount settings in io.systemd.Unit
Ivan Kruglov [Mon, 13 Apr 2026 10:25:21 +0000 (03:25 -0700)] 
varlink: add enum types for scheduling and mount settings in io.systemd.Unit

Convert CPUSchedulingPolicy, IOSchedulingClass, NUMAPolicy and MountFlags
fields from plain strings to proper varlink enum types in the io.systemd.Unit
interface. Update the corresponding serialization code to use
json_underscorify() for correct enum value formatting.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
6 days agovarlink: add enum types for configuration settings in io.systemd.Manager
Ivan Kruglov [Mon, 13 Apr 2026 09:53:38 +0000 (02:53 -0700)] 
varlink: add enum types for configuration settings in io.systemd.Manager

Convert 8 string fields in the io.systemd.Manager varlink interface to
proper enum types:

- LogTarget: new enum (console, console_prefixed, kmsg, journal, ...)
- DefaultStandardOutput/Error: reuse ExecOutputType from common
- DefaultMemory/CPU/IOPressureWatch: reuse CGroupPressureWatch from common
- DefaultOOMPolicy: new enum (continue, stop, kill)
- CtrlAltDelBurstAction: reuse EmergencyAction from common

Output serialization updated to use JSON_BUILD_PAIR_ENUM for automatic
underscorification of dash-containing values.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
6 days agoimportd: harden curl file protocol handling
Luca Boccassi [Fri, 10 Apr 2026 23:15:13 +0000 (00:15 +0100)] 
importd: harden curl file protocol handling

With old libcurl versions file:// can get redirects which can be messy, while
the new version rejects them. Set an option to explicit block them.

6 days agoAssorted cleanups and fixes (#41626)
Zbigniew Jędrzejewski-Szmek [Tue, 14 Apr 2026 07:10:16 +0000 (09:10 +0200)] 
Assorted cleanups and fixes (#41626)

6 days agoNEWS: pre-announce removal of /run/boot-loader-entries/ support in lo… (#41622)
Christian Brauner [Tue, 14 Apr 2026 06:54:33 +0000 (08:54 +0200)] 
NEWS: pre-announce removal of /run/boot-loader-entries/ support in lo… (#41622)

…gind

logind could read UAPI.1 Boot Loader Spec entries from
/run/boot-loader-entries/ in addition to ESP/XBOOTLDR. This was pretty
half-assed, and to my knowledge was never actually used much.

Let's remove support for it and simplify our codebase.

Let's schedule it for removal via NEWS in a future version, to give
people a chance to speak up.

6 days agohwdb: Add extended SteelSeries Arctis headset device support (#41628)
Sriman Achanta [Tue, 14 Apr 2026 00:08:30 +0000 (20:08 -0400)] 
hwdb: Add extended SteelSeries Arctis headset device support (#41628)

Add USB device IDs for additional SteelSeries Arctis headset models to
the sound card hardware database.

Newly added device IDs:

- Arctis Nova 7x v2 (22AD)
- Arctis Nova 7 Diablo IV (22A9)
- Arctis Nova 7X (22A4)
- Arctis Nova 7X (22A5)
- Arctis Nova 7P V2 (22A7)

6 days agojournal-upload: also disable VERIFYHOST when --trust=all is used 41626/head
Luca Boccassi [Mon, 13 Apr 2026 20:02:10 +0000 (21:02 +0100)] 
journal-upload: also disable VERIFYHOST when --trust=all is used

When --trust=all disables CURLOPT_SSL_VERIFYPEER, the residual
CURLOPT_SSL_VERIFYHOST check is ineffective since an attacker can
present a self-signed certificate with the expected hostname. Disable
both for consistency and log that server certificate verification is
disabled.

Follow-up for 8847551bcbfa8265bae04f567bb1aadc7b480325

6 days agomachined: pass user as positional argument in machine_default_shell_args()
Luca Boccassi [Mon, 13 Apr 2026 19:38:27 +0000 (20:38 +0100)] 
machined: pass user as positional argument in machine_default_shell_args()

Instead of interpolating the user name directly into the sh -c script
body via asprintf %s, pass it as a positional parameter ($1) in a
separate argv entry. This avoids the user string being parsed as part
of the shell script syntax.

Also validate the user name in bus_machine_method_open_shell() with
valid_user_group_name(), matching the validation already done on the
Varlink path via json_dispatch_const_user_group_name().

Follow-up for 49af9e1368571f4e423cde0fd45ee284451434d1

6 days agologind: reject wall messages containing control characters
Luca Boccassi [Mon, 13 Apr 2026 19:26:22 +0000 (20:26 +0100)] 
logind: reject wall messages containing control characters

method_set_wall_message() and the property setter only checked the
message length but not its content. Since wall messages are broadcast
to all TTYs, control characters in the message could interfere with
terminal state. Reject messages containing control characters other
than newline and tab.

Follow-up for 9ef15026c0e7e6600372056c43442c99ec53746e
Follow-up for e2fa5721c3ee5ea400b99a6463e8c1c257e20415

6 days agocore: check selinux access on each unit when listing
Luca Boccassi [Mon, 13 Apr 2026 21:11:27 +0000 (22:11 +0100)] 
core: check selinux access on each unit when listing

Units might have different access rules, so check the access on each
unit when querying the full list.

6 days agocore: add missing SELinux access checks when listing units
Luca Boccassi [Mon, 13 Apr 2026 19:21:25 +0000 (20:21 +0100)] 
core: add missing SELinux access checks when listing units

Add mac_selinux_unit_access_check_varlink() to the unit enumeration
loop in vl_method_list_units(), silently skipping units the caller
is not permitted to see, matching the D-Bus ListUnits behavior.
Add mac_selinux_access_check_varlink() to vl_method_describe_manager().

Follow-up for 472abf7bec89caeb1cc413c1de17984ab8ccb5d6
Follow-up for 736349958efe34089131ca88950e2e5bb391d36a

6 days agovmspawn: Support RUNTIME_DIRECTORY again (#41619)
Christian Brauner [Mon, 13 Apr 2026 17:46:55 +0000 (19:46 +0200)] 
vmspawn: Support RUNTIME_DIRECTORY again (#41619)

In ccecae0efd ("vmspawn: use machine name in runtime directory path")
support for RUNTIME_DIRECTORY was dropped which makes it difficult to
run systemd-vmspawn in a service unit which doesn't have write access to
the regular /run but should use its own managed RUNTIME_DIRECTORY. What
worked before was --keep-unit --system but we can't use XDG_RUNTIME_DIR
and --user because then --keep-unit breaks which we need because it
can't create a scope as there is no session. Switch back to
runtime_directory which handles RUNTIME_DIRECTORY and tells us whether
we should use it as is without later cleanup or if we need to use the
regular path where we create and delete the directory ourselves.

6 days agoNEWS: pre-announce removal of /run/boot-loader-entries/ support in logind 41622/head
Lennart Poettering [Mon, 13 Apr 2026 15:46:00 +0000 (17:46 +0200)] 
NEWS: pre-announce removal of /run/boot-loader-entries/ support in logind

logind could read UAPI.1 Boot Loader Spec entries from
/run/boot-loader-entries/ in addition to ESP/XBOOTLDR. This was pretty
half-assed, and to my knowledge was never actually used much.

Let's remove support for it and simplify our codebase.

Let's schedule it for removal via NEWS in a future version, to give
people a chance to speak up.

6 days agodocs: fix capability name, it's CAP_MKNOD not CAP_SYS_MKNOD (#41621)
rusty-snake [Mon, 13 Apr 2026 15:41:33 +0000 (17:41 +0200)] 
docs: fix capability name, it's CAP_MKNOD not CAP_SYS_MKNOD (#41621)

6 days agoci: Two claude-review fixes
Daan De Meyer [Mon, 13 Apr 2026 14:27:10 +0000 (16:27 +0200)] 
ci: Two claude-review fixes

- Use persist-credentials: false for actions/checkout, so we don't
  leak the github token credentials to subsequent jobs.
- Remove one / from the Edit/Write permissions. Currently, with the
  absolute path from github.workspace, we expand to three slashes while
  we only need two.

6 days agovarlink: move shared enum types to varlink-idl-common
Ivan Kruglov [Mon, 13 Apr 2026 09:53:23 +0000 (02:53 -0700)] 
varlink: move shared enum types to varlink-idl-common

Move ExecOutputType, CGroupPressureWatch, EmergencyAction and
ManagedOOMMode enum type definitions from varlink-io.systemd.Unit to
varlink-idl-common, as these types are shared across multiple varlink
interfaces.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
6 days agovmspawn: Support RUNTIME_DIRECTORY again 41619/head
Kai Lüke [Mon, 13 Apr 2026 12:21:39 +0000 (21:21 +0900)] 
vmspawn: Support RUNTIME_DIRECTORY again

In ccecae0efd ("vmspawn: use machine name in runtime directory path")
support for RUNTIME_DIRECTORY was dropped which makes it difficult to
run systemd-vmspawn in a service unit which doesn't have write access
to the regular /run but should use its own managed RUNTIME_DIRECTORY.
What worked before was --keep-unit --system but we can't use
XDG_RUNTIME_DIR and --user because then --keep-unit breaks which
we need because it can't create a scope as there is no session.
Switch back to runtime_directory which handles RUNTIME_DIRECTORY and
tells us whether we should use it as is without later cleanup or if we
need to use the regular path where we create and delete the directory
ourselves.

6 days agomany: final final set of coccinelle check-pointer-deref tweaks (#41595)
Zbigniew Jędrzejewski-Szmek [Mon, 13 Apr 2026 11:59:24 +0000 (13:59 +0200)] 
many: final final set of coccinelle check-pointer-deref tweaks (#41595)

I promised in https://github.com/systemd/systemd/pull/41426 that its the
final update for coccinelle pointer deref checks. However it turned out
there is this coccinelle/parsing_hacks.h that I wasn't aware of. The
file missed some important things like _cleanup_(x) that prevented
coccinelle to check a bunch of functions.

This PR adds some missing defines to the parsing_hacks.h and fixes the
missing asserts(). I apologize that its a bit long (and frankly boring)
and that I missed this earlier.

The last commit contains one small behavior change (ret in
sd_varlink_idl_parse() is now really optional) but the big one is very
mechanical.

6 days agostat-util: use stat_verify_xyz() and friends more (#41613)
Lennart Poettering [Mon, 13 Apr 2026 11:39:47 +0000 (13:39 +0200)] 
stat-util: use stat_verify_xyz() and friends more (#41613)

6 days agorun: allow setting output format
Arnout Engelen [Mon, 6 Apr 2026 08:00:37 +0000 (10:00 +0200)] 
run: allow setting output format

This is useful when moving from `--pty` or `--pipe` to using
`--verbose`: you can use `--verbose-output=cat` to get similar output on
stdout while still having all of the advantages of `--verbose` over the
other options.

6 days agostat-util: always check S_ISDIR() before S_ISLNK() 41613/head
Lennart Poettering [Mon, 13 Apr 2026 11:14:46 +0000 (13:14 +0200)] 
stat-util: always check S_ISDIR() before S_ISLNK()

Check S_ISDIR() before S_ISLINK() for all stat_verify_xyz() helpers
first, where we check them. Just to ensure we systematically return the
same errors.

6 days agostat-util: also add stat_verify_char() and use it everywhere
Lennart Poettering [Mon, 13 Apr 2026 09:20:57 +0000 (11:20 +0200)] 
stat-util: also add stat_verify_char() and use it everywhere

6 days agosocket-netlink: use stat_verify_socket() more
Lennart Poettering [Mon, 13 Apr 2026 09:10:36 +0000 (11:10 +0200)] 
socket-netlink: use stat_verify_socket() more

6 days agotree-wide: use stat_verify_directory() more
Lennart Poettering [Mon, 13 Apr 2026 09:10:03 +0000 (11:10 +0200)] 
tree-wide: use stat_verify_directory() more

6 days agotree-wide: use stat_verify_regular() more
Lennart Poettering [Mon, 13 Apr 2026 09:09:25 +0000 (11:09 +0200)] 
tree-wide: use stat_verify_regular() more

6 days agostat-util: also introduce stat_verify_block() and use it everywhere
Lennart Poettering [Mon, 13 Apr 2026 08:45:29 +0000 (10:45 +0200)] 
stat-util: also introduce stat_verify_block() and use it everywhere

6 days agostat-util: add shortcut for fd_verify_symlink()
Lennart Poettering [Mon, 13 Apr 2026 08:41:01 +0000 (10:41 +0200)] 
stat-util: add shortcut for fd_verify_symlink()

We have a similar shortcut in the other fd_verify_xyz() calls, let's add
it here too, just for completion's sake.

6 days agotree-wide: make more use of stat_verify_device_node()
Lennart Poettering [Mon, 13 Apr 2026 08:28:54 +0000 (10:28 +0200)] 
tree-wide: make more use of stat_verify_device_node()

6 days agostat-util: introduce a common (stat|fd)_verify_regular_or_block() helper
Lennart Poettering [Mon, 13 Apr 2026 08:26:36 +0000 (10:26 +0200)] 
stat-util: introduce a common (stat|fd)_verify_regular_or_block() helper

We already had one in repart.c, let's generalize it, and use it
everywhere.

6 days agoboot: fix loop bound and OOB in devicetree_get_compatible()
Milan Kyselica [Sat, 11 Apr 2026 08:26:13 +0000 (10:26 +0200)] 
boot: fix loop bound and OOB in devicetree_get_compatible()

The loop used the byte offset end (struct_off + struct_size) as the
iteration limit, but cursor[i] indexes uint32_t words. This reads
past the struct block when end > size_words.

Use size_words (struct_size / sizeof(uint32_t)) which is the correct
number of words to iterate over.

Also fix a pre-existing OOB in the FDT_BEGIN_NODE handler: the guard
i >= size_words is always false inside the loop (since the loop
condition already ensures i < size_words), so cursor[++i] at the
boundary reads one word past the struct block. Use i + 1 >= size_words
to check before incrementing.

Fixes: https://github.com/systemd/systemd/issues/41590
6 days agoboot: fix integer overflow and division by zero in BMP splash parser
Milan Kyselica [Sat, 11 Apr 2026 08:25:19 +0000 (10:25 +0200)] 
boot: fix integer overflow and division by zero in BMP splash parser

Bound image dimensions before computing row_size to prevent overflow
in the depth * x multiplication on 32-bit. Without this, crafted
dimensions like depth=32 x=0x10000001 wrap to a small row_size that
passes all subsequent checks.

Reject channel masks where all bits are set (popcount == 32), since
1U << 32 is undefined behavior and causes division by zero on
architectures where it evaluates to zero. Move the validation before
computing derived values for clarity. Use unsigned 1U in shifts to
avoid signed integer overflow UB for popcount == 31.

Also reject zero-width and zero-height images.

Fixes: https://github.com/systemd/systemd/issues/41589
6 days agocore: use JSON_BUILD_CONST_STRING() where appropriate
Lennart Poettering [Mon, 13 Apr 2026 08:29:11 +0000 (10:29 +0200)] 
core: use JSON_BUILD_CONST_STRING() where appropriate

6 days agojournal: limit decompress_blob() output to DATA_SIZE_MAX (#41604)
Zbigniew Jędrzejewski-Szmek [Mon, 13 Apr 2026 10:02:11 +0000 (12:02 +0200)] 
journal: limit decompress_blob() output to DATA_SIZE_MAX (#41604)

We already have checks in place during compression that limit the data
we compress, so they shouldn't decompress to anything larger than
DATA_SIZE_MAX unless they've been tampered with. Let's make this
explicit and limit all our decompress_blob() calls in journal-handling
code to that limit.

One possible scenario this should prevent is when one tries to open and
verify a journal file that contains a compression bomb in its payload:

```
$ ls -lh test.journal
-rw-rw-r--+ 1 fsumsal fsumsal 1.2M Apr 12 15:07 test.journal

$ systemd-run --user --wait --pipe -- build-local/journalctl --verify --file=$PWD/test.journal
Running as unit: run-p682422-i4875779.service
000110: Invalid hash (00000000 vs. 11e4948d73bdafdd)
000110: Invalid object contents: Bad message
File corruption detected at /home/fsumsal/repos/@systemd/systemd/test.journal:272 (of 1249896 bytes, 0%).
FAIL: /home/fsumsal/repos/@systemd/systemd/test.journal (Bad message)
          Finished with result: exit-code
Main processes terminated with: code=exited, status=1/FAILURE
               Service runtime: 48.051s
             CPU time consumed: 47.941s
                   Memory peak: 8G (swap: 0B)
```
Same could be, in theory, possible with just `journalctl --file=`, but
the reproducer would be a bit more complicated (haven't tried it, yet).

Lastly, the change in journal-remote is mostly hardening, as the maximum
input size to decompress_blob() there is mandated by MHD's connection
memory limit (set to JOURNAL_SERVER_MEMORY_MAX which is 128 KiB at the
time of writing), so the possible output size there is already quite
limited (e.g. ~800 - 900 MiB for xz-compressed data).

6 days agoudev/scsi-id: hardening against malformed kernel data (#41585)
Zbigniew Jędrzejewski-Szmek [Mon, 13 Apr 2026 09:53:43 +0000 (11:53 +0200)] 
udev/scsi-id: hardening against malformed kernel data (#41585)

7 days agonspawn: Add --restrict-address-families= option
Daan De Meyer [Mon, 22 Dec 2025 10:22:34 +0000 (11:22 +0100)] 
nspawn: Add --restrict-address-families= option

Add a new --restrict-address-families= command line option and
corresponding RestrictAddressFamilies= setting for .nspawn files to
restrict which socket address families may be used inside a container.

Many address families such as AF_VSOCK and AF_NETLINK are not
network-namespaced, so restricting access to them in containers
improves isolation. The option supports allowlist and denylist modes
(via ~ prefix), as well as "none" to block all families, matching the
semantics of RestrictAddressFamilies= in unit files.

The address family parsing logic is extracted into a shared
parse_address_families() helper in parse-helpers.c, which is now also
used by config_parse_address_families() in load-fragment.c.

This is currently opt-in. In a future version, the default will be
changed to restrict address families to AF_INET, AF_INET6 and AF_UNIX.

7 days agomkosi: Drop kexec-tools
Daan De Meyer [Fri, 27 Mar 2026 22:53:43 +0000 (23:53 +0100)] 
mkosi: Drop kexec-tools

Not needed anymore now that we use kexec_file_load().

7 days agosystemctl: replace kexec-tools dependency with direct kexec_file_load() syscall
Daan De Meyer [Fri, 27 Mar 2026 22:03:14 +0000 (22:03 +0000)] 
systemctl: replace kexec-tools dependency with direct kexec_file_load() syscall

Replace the fork+exec of /usr/bin/kexec in load_kexec_kernel() with a
direct kexec_file_load() syscall, removing the runtime dependency on
kexec-tools for systemctl kexec.

The kexec_file_load() syscall (available since Linux 3.17) accepts
kernel and initrd file descriptors directly, letting the kernel handle
image parsing, segment setup, and purgatory internally. This is much
simpler than the older kexec_load() syscall which requires complex
userspace setup of memory segments and boot protocol structures — that
complexity is the raison d'être of kexec-tools.

The implementation follows the established libc wrapper pattern: a
missing_kexec_file_load() fallback in src/libc/kexec.c calls the
syscall directly when glibc doesn't provide a wrapper (which is
currently always the case). The syscall is not available on all
architectures — alpha, i386, ia64, m68k, mips, sh, and sparc lack
__NR_kexec_file_load — so the wrapper and caller are guarded with
HAVE_KEXEC_FILE_LOAD_SYSCALL to compile cleanly everywhere.

When kexec_file_load() rejects the kernel image with ENOEXEC (e.g. the
image is compressed or wrapped in a PE container that the kernel's kexec
handler doesn't understand natively), we attempt to unwrap/decompress
and retry. This is effectively the same decompression and extraction
logic that already lives in src/ukify/ukify.py (maybe_decompress() and
get_zboot_kernel()), now implemented in C so that systemctl can handle
it natively without shelling out to external tools:

 - Compressed kernels (Image.gz, Image.zst, Image.xz, Image.lz4): the
   format is detected by magic bytes (per RFC 1952, RFC 8878,
   tukaani.org xz spec, and lz4 frame format spec) and decompressed to
   a memfd using the existing decompress_stream_*() infrastructure plus
   the new gzip support from the previous commit. This is primarily
   needed on arm64 where kexec_file_load() only accepts raw Image files.
   On x86_64, bzImage is already the native format and works directly.

 - EFI ZBOOT PE images (vmlinuz.efi): detected by "MZ" + "zimg" magic
   at the start of the file. The compressed payload offset, size, and
   compression type are read from the ZBOOT header defined in
   linux/drivers/firmware/efi/libstub/zboot-header.S.

 - Unified Kernel Images (UKI): detected as PE files with a .linux
   section via the existing pe_is_uki() infrastructure. The .linux
   section (kernel) and optionally .initrd section are extracted to
   memfds. When a UKI provides an embedded initrd and the boot entry
   doesn't specify one separately, the embedded initrd is used.

The try-first-then-decompress approach means we never decompress
unnecessarily: on x86_64 the first kexec_file_load() call succeeds
immediately with the raw bzImage, and on architectures where the
kernel's kexec handler natively understands PE (like LoongArch with
kexec_efi_ops), ZBOOT/UKI images work without decompression too.

If kexec_file_load() is unavailable (architectures without the syscall)
or all attempts fail, we fall back to forking+execing the kexec binary.
This preserves compatibility on architectures like i386 and mips where
only the older kexec_load() syscall exists and kexec-tools is needed to
handle the complex userspace setup.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
7 days agolibc: Add kexec_file_load() syscall wrapper
Daan De Meyer [Fri, 10 Apr 2026 10:23:22 +0000 (10:23 +0000)] 
libc: Add kexec_file_load() syscall wrapper

Allow tabs in UAPI headers in .gitattributes since they are copied
verbatim from the kernel.

7 days agocompress: rework decompressor_detect() on top of compression_detect_from_magic()
Daan De Meyer [Fri, 10 Apr 2026 10:18:12 +0000 (10:18 +0000)] 
compress: rework decompressor_detect() on top of compression_detect_from_magic()

Replace the duplicated magic byte signatures in decompressor_detect()
with a call to the new compression_detect_from_magic() helper and use a
switch statement to initialize the appropriate decompression context.

7 days agotime-util: encode our assumption that clock_gettime() never can return 0 or USEC_INFINITY
Lennart Poettering [Sun, 12 Apr 2026 19:44:59 +0000 (21:44 +0200)] 
time-util: encode our assumption that clock_gettime() never can return 0 or USEC_INFINITY

We generally assume that valid times returned by clock_gettime() are > 0
and < USEC_INFINITY. If this wouldn't hold all kinds of things would
break, because we couldn't distuingish our niche values from regular
values anymore.

Let's hence encode our assumptions in C, already to help static
analyzers and LLMs.

Inspired by: https://github.com/systemd/systemd/pull/41601#pullrequestreview-4094645891

7 days agoudev/scsi-id: various typing refactorings 41585/head
Luca Boccassi [Fri, 10 Apr 2026 21:14:45 +0000 (22:14 +0100)] 
udev/scsi-id: various typing refactorings

7 days agoudev/scsi-id: check for invalid header from kernel buffer
Luca Boccassi [Fri, 10 Apr 2026 18:35:59 +0000 (19:35 +0100)] 
udev/scsi-id: check for invalid header from kernel buffer

7 days agoudev/scsi-id: check for invalid chars in various fields received from the kernel
Luca Boccassi [Fri, 10 Apr 2026 18:04:04 +0000 (19:04 +0100)] 
udev/scsi-id: check for invalid chars in various fields received from the kernel

Follow-up for 16325b35fa6ecb25f66534a562583ce3b96d52f3

7 days agonss-systemd: fix off-by-one in nss_pack_group_record_shadow()
Milan Kyselica [Sat, 11 Apr 2026 08:31:16 +0000 (10:31 +0200)] 
nss-systemd: fix off-by-one in nss_pack_group_record_shadow()

nss_count_strv() counts trailing NULL pointers in n. The pointer area
then used (n + 1), reserving one slot more than the size check
accounted for.

Drop the + 1 since n already includes the trailing NULLs, unlike the
non-shadow nss_pack_group_record() where n does not.

Fixes: https://github.com/systemd/systemd/issues/41591
7 days agoMore assorted coverity fixes (#41601)
Luca Boccassi [Sun, 12 Apr 2026 20:19:12 +0000 (21:19 +0100)] 
More assorted coverity fixes (#41601)

One more round, this time with the help of the claudebot, especially for
spelunking in git blame to find the original commit and writing commit
messages from the list of warnings exported from coverity

Co-developed-by: Claude
[claude@anthropic.com](mailto:claude@anthropic.com)

7 days agocore: varlink enum for io.systemd.Unit interface (#40972)
Lennart Poettering [Sun, 12 Apr 2026 19:47:54 +0000 (21:47 +0200)] 
core: varlink enum for io.systemd.Unit interface (#40972)

Convert string fields to varlink enums in io.systemd.Unit

Following
https://github.com/systemd/systemd/pull/39391#discussion_r2489599449,
convert all configuration setting fields in the io.systemd.Unit varlink
interface from bare SD_VARLINK_STRING to proper enum types, adding type
safety to the IDL.

This converts ~30 fields across ExecContext, CGroupContext, and
UnitContext, adding 25 new varlink enum types.

Weak compatibility breakage (per
https://github.com/systemd/systemd/pull/40972#issuecomment-4222294318):
Varlink enum identifiers cannot contain - or +, so affected values are
underscorified on the wire. For example, "tty-force" becomes tty_force,
"kmsg+console" becomes kmsg_console.

The full list of affected values:
```
  - ExecInputType: tty-force, tty-fail
  - ExecOutputType: kmsg+console, journal+console
  - ProtectHome: read-only
  - CGroupController: bpf-firewall, bpf-devices, bpf-foreign, bpf-socket-bind, bpf-restrict-network-interfaces, bpf-bind-network-interface
  - CollectMode: inactive-or-failed
  - EmergencyAction: exit-force, reboot-force, reboot-immediate, poweroff-force, poweroff-immediate, soft-reboot, soft-reboot-force, kexec-force, halt-force, halt-immediate
  - JobMode: replace-irreversibly, ignore-dependencies, ignore-requirements, restart-dependencies
```

7 days agojournal: limit decompress_blob() output to DATA_SIZE_MAX 41604/head
Frantisek Sumsal [Sun, 12 Apr 2026 13:02:11 +0000 (15:02 +0200)] 
journal: limit decompress_blob() output to DATA_SIZE_MAX

We already have checks in place during compression that limit the data
we compress, so they shouldn't decompress to anything larger than
DATA_SIZE_MAX unless they've been tampered with. Let's make this
explicit and limit all our decompress_blob() calls in journal-handling
code to that limit.

One possible scenario this should prevent is when one tries to open and
verify a journal file that contains a compression bomb in its payload:

$ ls -lh test.journal
-rw-rw-r--+ 1 fsumsal fsumsal 1.2M Apr 12 15:07 test.journal

$ systemd-run --user --wait --pipe -- build-local/journalctl --verify --file=$PWD/test.journal
Running as unit: run-p682422-i4875779.service
000110: Invalid hash (00000000 vs. 11e4948d73bdafdd)
000110: Invalid object contents: Bad message
File corruption detected at /home/fsumsal/repos/@systemd/systemd/test.journal:272 (of 1249896 bytes, 0%).
FAIL: /home/fsumsal/repos/@systemd/systemd/test.journal (Bad message)
          Finished with result: exit-code
Main processes terminated with: code=exited, status=1/FAILURE
               Service runtime: 48.051s
             CPU time consumed: 47.941s
                   Memory peak: 8G (swap: 0B)

Same could be, in theory, possible with just `journalctl --file=`, but
the reproducer would be a bit more complicated (haven't tried it, yet).

Lastly, the change in journal-remote is mostly hardening, as the maximum
input size to decompress_blob() there is mandated by MHD's connection
memory limit (set to JOURNAL_SERVER_MEMORY_MAX which is 128 KiB at the
time of writing), so the possible output size there is already quite
limited (e.g. ~800 - 900 MiB for xz-compressed data).

7 days agocompress: limit the output to dst_max bytes with LZ4 if set
Frantisek Sumsal [Sun, 12 Apr 2026 14:24:53 +0000 (16:24 +0200)] 
compress: limit the output to dst_max bytes with LZ4 if set

We already do that with other algorithms, so let's make
decompress_blob_lz4() consistent with the rest.

7 days agojournal: move the {DATA,ENTRY}_SIZE constants to sd-journal
Frantisek Sumsal [Sun, 12 Apr 2026 13:43:35 +0000 (15:43 +0200)] 
journal: move the {DATA,ENTRY}_SIZE constants to sd-journal

So we can access them from the code there as well.

7 days agococcinelle: add SIZEOF() macro to work-around sizeof(*private) 41595/head
Michael Vogt [Sun, 12 Apr 2026 13:47:48 +0000 (15:47 +0200)] 
coccinelle: add SIZEOF() macro to work-around sizeof(*private)

We have code like `size_t max_size = sizeof(*private)` in three
places. This is evaluated at compile time so its safe to use. However
the new pointer-deref checker in coccinelle is not smart enough to know
this and will flag those as errors. To avoid these false positives
we have some options:
1. Reorder so that we do:
```C
size_t max_size = 0;
assert(private);
max_size = sizeof(*private);
```
2. Use something like `size_t max_size = sizeof(*ASSERT_PTR(private));`
3. Place the assert before the declaration
4. Workaround coccinelle via SIZEOF(*private) that we can then hide
   via parsing_hacks.h
5. Fix coccinelle (OCaml, hard)
6. ... somehting I missed?

None of these is very appealing. I went for (4) but happy about
suggestions.

7 days agosd-varlink: make ret optional in sd_varlink_idl_parse()
Michael Vogt [Sat, 11 Apr 2026 17:52:33 +0000 (19:52 +0200)] 
sd-varlink: make ret optional in sd_varlink_idl_parse()

We have a test failure where the testsuite is calling
sd_varlink_idl_parse() with *ret being NULL. This is now an
assert error. So we could either fix the test or fix the code

Given that it seems genuinely useful to run sd_varlink_idl_parse()
without *ret to e.g. just check if the idl is valid I opted to
fix the code.

7 days agomany: fix remaining check-pointer-deref issues
Michael Vogt [Tue, 31 Mar 2026 17:53:24 +0000 (19:53 +0200)] 
many: fix remaining check-pointer-deref issues

The updated parsing_hacks.h file uncovered a bunch of extra
things that the check-pointer-deref coccinelle script flags.

This commit fixes them to make the tree check-pointer-deref clean.

7 days agotest-json: add iszero_safe guards for float division at index 0 and 1 41601/head
Luca Boccassi [Sat, 11 Apr 2026 21:52:47 +0000 (22:52 +0100)] 
test-json: add iszero_safe guards for float division at index 0 and 1

The existing iszero_safe guards at index 9 and 10 were added to
silence Coverity, but the same division-by-float-zero warning also
applies to the divisions at index 0 (DBL_MIN) and 1 (DBL_MAX).

CID#1587762

Follow-up for 7f133c996c8b1ea9219540ec8f966b64b58d30a6

7 days agodebug-generator: assert breakpoint type is valid before bit shift
Luca Boccassi [Sat, 11 Apr 2026 21:50:39 +0000 (22:50 +0100)] 
debug-generator: assert breakpoint type is valid before bit shift

The BreakpointType enum includes _BREAKPOINT_TYPE_INVALID (-EINVAL),
so Coverity flags the bit shift as potentially using a negative shift
amount. Add an assert to verify the type is in valid range, since the
static table only contains valid entries.

CID#1568482

Follow-up for 1929226e7e649b72f3f9acd464eaac771c00945c

7 days agonss-myhostname: add more INC_SAFE for buffer index accumulation
Luca Boccassi [Sat, 11 Apr 2026 21:15:52 +0000 (22:15 +0100)] 
nss-myhostname: add more INC_SAFE for buffer index accumulation

Use overflow-safe INC_SAFE() instead of raw addition for idx
accumulation, so that Coverity can see the addition is checked.

CID#1548028

Follow-up for a05483a921a518fd283e7cb32dc8c8e816b2ab2c

7 days agouid-range: add assert to prevent underflow in coalesce loop
Luca Boccassi [Sat, 11 Apr 2026 21:04:37 +0000 (22:04 +0100)] 
uid-range: add assert to prevent underflow in coalesce loop

Coverity flags range->n_entries - j as a potential underflow
in the memmove size calculation. Add assert(range->n_entries > 0)
before decrementing n_entries, which holds since the loop condition
guarantees j < n_entries.

CID#1548015

Follow-up for 8dcc66cefc8ab489568c737adcba960756d76a3c

7 days agoSome coverity cleanups (#41596)
Zbigniew Jędrzejewski-Szmek [Sun, 12 Apr 2026 12:00:49 +0000 (14:00 +0200)] 
Some coverity cleanups (#41596)

7 days agoAnother batch of option+verb conversions (#41586)
Zbigniew Jędrzejewski-Szmek [Sun, 12 Apr 2026 11:58:38 +0000 (13:58 +0200)] 
Another batch of option+verb conversions (#41586)

7 days agosd-varlink: scale down the limit of connections per UID to 128
Frantisek Sumsal [Fri, 10 Apr 2026 16:32:33 +0000 (18:32 +0200)] 
sd-varlink: scale down the limit of connections per UID to 128

1024 connections per UID is unnecessarily generous, so let's scale this
down a bit. D-Bus defaults to 256 connections per UID, but let's be even
more conservative and go with 128.

8 days agopo: Translated using Weblate (Arabic)
joo es [Sat, 11 Apr 2026 19:58:51 +0000 (19:58 +0000)] 
po: Translated using Weblate (Arabic)

Currently translated at 100.0% (266 of 266 strings)

Co-authored-by: joo es <jonnyse@users.noreply.translate.fedoraproject.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ar/
Translation: systemd/main

8 days agotools: run check-coccinelle.sh with (updated) parsing_hacks.h
Michael Vogt [Tue, 31 Mar 2026 17:01:28 +0000 (19:01 +0200)] 
tools: run check-coccinelle.sh with (updated) parsing_hacks.h

This commit runs the check-coccinelle checker scripts with the
parsing_hacks.h. Because this was missing before there were some
issues that did not get flagged.

While at it it also adds some missing cleanup attributes and
iterators to get better results. Its a bit sad that there is no
(easy/obvious) way to detect when new things are needed for
parsing_hacks.h

8 days agohomed: drop unnecessary cast to double 41596/head
Zbigniew Jędrzejewski-Szmek [Sat, 11 Apr 2026 11:09:16 +0000 (13:09 +0200)] 
homed: drop unnecessary cast to double

Coverity was complaining that we we're doing a integer division and then
casting that to double. This was OK, but it was also a bit pointless.
An operation on a double and unsigned promoted the unsigned to a double,
so it's enough if we have a double somewhere as an argument early enough.
Drop noop casts and parens to make the formulas easier to read.

CID#1466459

8 days agofundamental: add ABS_DIFF macro
Zbigniew Jędrzejewski-Szmek [Sat, 11 Apr 2026 11:06:56 +0000 (13:06 +0200)] 
fundamental: add ABS_DIFF macro

Sometimes we want need to diff two unsigned numbers, which is awkward
because we need to cast them to something with a sign first, if we want
to use abs(). Let's add a helper that avoids the function call
altogether.

Also drop unnecessary parens arounds args which are delimited by commas.

8 days agovarlinkctl: drop bogus variable assignment
Zbigniew Jędrzejewski-Szmek [Sat, 11 Apr 2026 10:44:03 +0000 (12:44 +0200)] 
varlinkctl: drop bogus variable assignment

Coverity complains that r is overridden. In fact it isn't, but
we shouldn't set it like this anyway. exec_with_listen_fds() already
logs, so we only need to call _exit() if it fails.

CID#1646716

8 days agosd-event: replace dead code path with an assert
Zbigniew Jędrzejewski-Szmek [Sat, 11 Apr 2026 10:33:44 +0000 (12:33 +0200)] 
sd-event: replace dead code path with an assert

Coverity complains that the -EOPNOTSUPP can never be returned, because
we always have !watch_fallback==locked.

CID#1654169

8 days agocryptsetup: convert to the new option and verb parsers 41586/head
Zbigniew Jędrzejewski-Szmek [Sat, 11 Apr 2026 09:54:05 +0000 (11:54 +0200)] 
cryptsetup: convert to the new option and verb parsers

The synopisis is moved from the header to the a new section:

  -systemd-cryptsetup attach VOLUME SOURCE-DEVICE [KEY-FILE] [CONFIG]
  -systemd-cryptsetup detach VOLUME
  +systemd-cryptsetup [OPTIONS...] {COMMAND} ...

   Attach or detach an encrypted block device.

  +Commands:
  +  attach VOLUME SOURCE-DEVICE [KEY-FILE] [CONFIG] Attach an encrypted block
  +                                                  device
  +  detach VOLUME                                   Detach an encrypted block
  +                                                  device
  +
  +Options:

I think that's OK… With the autogenerated table that's the natural
thing to do.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
8 days agocryptenroll: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Sat, 11 Apr 2026 09:26:05 +0000 (11:26 +0200)] 
cryptenroll: convert to the new option parser

--help is the same, apart from linewrapping.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>