Commit Graph
91823 Commits
Author SHA1 Message Date
Cathal Mullan 1f66b52452 nspawn: align config PrivateUsersOwnership default with CLI
The `systemd-nspawn` manpage says:

    The `--private-users-ownership=auto` option is implied if
    `--private-users=pick` is used.

This is true for the CLI, but not when set in a `.nspawn` file.
Assuming these defaults should be the same across both.

This default was also not updated when `managed` was added by #35685.

As a result, this is a change in behavior for users who didn't set an
explicit `PrivateUsersOwnership=` value in their `.nspawn` file.
2026-09-14 08:10:27 +01:00
Chris Down d04aa853bc parse-util: fix ineffective overflow guards in store_loadavg_fixed_point() (#43753)
`store_loadavg_fixed_point()` guarded both of its `<<
LOADAVG_PRECISION_BITS` shifts against overflow, but neither guard was
effective:

- The integer part was rejected with `i >= (~0UL <<
LOADAVG_PRECISION_BITS)`. The shift direction is inverted: that bound is
`0xFFFFFFFFFFFFF800`, so it only rejects the topmost 2048 values of the
range, while the smallest value that actually overflows `i << 11` is
`2^53`. Everything from `2^53` up shifted out of the word and was
accepted.

- The fractional part was shifted first and range-checked afterwards, so
a large `f` wrapped to a small value and then passed the `f >=
LOADAVG_FIXED_POINT_1_0` test.

Concretely, on 64 bit:

```
parse_loadavg_fixed_point("9007199254740992.00", &fp)  ->  0, fp == 0     (load reported as 0.00)
parse_loadavg_fixed_point("1.9007199254740992",  &fp)  ->  0, fp == 1.00
```

Both should be `-ERANGE`. The existing
`ASSERT_ERROR(..."18446744073709551615.5"..., ERANGE)` passes only
because `~0UL` happens to fall inside the narrow band the broken guard
does catch.

Validate both parts before shifting instead. Rejecting `f >= 100` is
exactly equivalent to the old post-shift comparison for every input that
previously succeeded, since `DIV_ROUND_UP(99 << 11, 100) == 2028` and
`DIV_ROUND_UP(100 << 11, 100) == 2048`, so there is no behaviour change
for valid input; only the values that used to wrap are now rejected.

Note this is a latent bug rather than a live one: the only caller of
`parse_loadavg_fixed_point()` is `read_resource_pressure()`, which
parses kernel-generated `/proc/pressure/*` and cgroup `memory.pressure`
files where values are capped at `100.00`, and every direct
`store_loadavg_fixed_point()` caller passes permyriad-derived values
already clamped to 0...10000. Fixing the guards keeps the helper correct
for future callers.

Covered by new cases in `test-parse-util`, including the largest integer
part that must still be accepted (`2^53-1`).
2026-09-14 13:12:39 +08:00
Armaan Sandhu efdc4b0cc7 parse-util: fix ineffective overflow guards in store_loadavg_fixed_point() 2026-09-13 20:27:13 -04:00
Lokesh Patel 5698092294 hwdb: add fuzz override for ASUS ROG Strix SCAR 16 touchpad 2026-09-13 19:11:46 +01:00
Ettore Atalan 0ea1bcb7a9 po: Translated using Weblate (German)
Currently translated at 99.3% (284 of 286 strings)

Co-authored-by: Ettore Atalan <atalanttore@googlemail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/de/
Translation: systemd/main
2026-09-13 12:35:54 +01:00
Edvard Jaegtnes 9efeb4b1d4 hwdb: add fuzz override for Dell Precision 7510 ALPS DualPoint TouchPad (#43747)
Recently switched to Linux on my Dell Precision 7510 and noticed a
jittery/shaking effect when scrolling slowly with the touchpad, across
multiple applications.

libinput measure fuzz reported no fuzz value set for the touchpad's
axes, which explains the jitter (sensor noise being read as real
motion). Used libinput measure fuzz --fuzz=28 to generate and apply a
hwdb override, then confirmed scrolling was smooth afterward.

Added a new entry to hwdb/60-evdev.hwdb for this device:

evdev:name:AlpsPS/2 ALPS DualPoint
TouchPad:dmi:*:svnDellInc.*:pnPrecision7510*:

This is the same touchpad family as #34133 (Dell Latitude E7440), which
hit the same symptom and fix — this PR extends the coverage to the
Precision 7510.
2026-09-13 12:32:33 +01:00
Kevin Charpentier b504aa05fd hwdb: ignore duplicate mic mute key on Lenovo ThinkBook 14 G7 ARP
On the ThinkBook 14 G7 ARP (21MV), ideapad-laptop is bound to both the ACPI
device (VPC2004:00) and the WMI device
(8FC0DE0C-B4E4-43FD-B0F3-8871711C1294) at the same time, and both report the
mic mute key into the same input device ("Ideapad extra buttons") a few
milliseconds apart, with different scan codes: 0x8 from the ACPI path and
0x13e from the WMI path.

Userspace applies the toggle twice, so the microphone returns to its previous
state and the key appears not to work at all. Unmapping the WMI scan code
leaves a single event per keypress, and the key then toggles the microphone
reliably, mic mute LED included.

Note this differs from the ThinkBook 16p G5 IRX entry above, where the
duplicate comes from the AT keyboard; here both events originate from
"Ideapad extra buttons" itself.

This was discussed on platform-driver-x86, where the hwdb approach was
suggested in preference to unbinding the WMI driver.
2026-09-12 04:24:53 +09:00
Méven Car ba50cd0583 hwdb: mark Logitech PRO X 2 LIGHTSPEED as headset
The PRO X 2 LIGHTSPEED wireless dongle (046d:0af7) exposes a sound card
that is not detected as a headset, since the model name provides no
usable hint and the device has no usb.ids entry either. UPower then
reports its battery as an audio-device rather than a headset. Add a
quirk so the form factor is reported correctly.
2026-09-12 00:27:08 +09:00
Daan De Meyer 4e4532dd2d core/automount: tear down autofs when the unit vanished across reload (#43705) 2026-09-11 13:36:10 +02:00
Kai Wohlfahrt e8807add48 Fall back to checking sysext backing device
Add a unit test for gpt-auto-generator, that mimics a sysext setup.
2026-09-11 12:24:50 +02:00
KingPointer 52a7574625 docs: clarify ConditionPathExists= semantics (#43724)
## Summary

Clarify `ConditionPathExists=` in `systemd.unit(5)`:

- It checks for any filesystem object (regular file, directory, device
node, FIFO, socket), not only regular files.
- Symbolic links are followed, so a broken symbolic link is not
considered to exist.

Fixes #41900
2026-09-11 12:15:59 +02:00
Martin Pitt bdb302ffe6 core/automount: fail unread queued requests when giving up
When an automount goes away, the tokens we answer are only those we have
read from the pipe. Requests the kernel queued after our last read stayed
blocked: closing the pipe does not wake them, the kernel only notices the
closed pipe and turns the autofs catatonic when yet another request fails
to reach us, and after the lazy unmount no request reaches it anymore. In
the normal stop path that window is one event loop iteration; for an
automount torn down at coldplug it spans the whole reload.

Set the autofs to catatonic state before letting go of it, which fails
everything still queued with ENOENT. Answer the known tokens first:
closing our end of the pipe before that made a racing request flip the
kernel into catatonic mode on its own, which discards the queue and
turns our answers into "token not found" errors.

Signed-off-by: Martin Pitt <martin@amutable.com>
2026-09-11 08:18:43 +02:00
Martin Pitt f65e67ff0f core/automount: tear down autofs when the unit vanished across reload
When an automount unit ceases to exist across daemon-reload (observed:
because a generator no longer emits it), its deserialized state still
makes `automount_coldplug()` pick up the autofs pipe and resume the unit
as waiting/running. But nothing can serve that mount point anymore. The
kernel keeps blocking every process that touches the mount point until
PID 1 answers (which it won't), forever.

To fix this, fail pending requests and unmount the autofs when
coldplugging an automount unit that is not loaded anymore.

Fixes #43700

Signed-off-by: Martin Pitt <martin@amutable.com>
2026-09-11 08:18:43 +02:00
Martin Pitt 4558062cad core/automount: log when pending requests cannot be released
When an automount goes away, answering the requests the kernel already
queued is the only thing that unblocks the processes waiting on them, and
nothing retries it later. If the `EHOSTDOWN` calls fail, it leaves the
requesting processes hung with no trace in the journal.

Log the failures to make this easier to debug. Also move that teardown into
a helper function, the next commit needs it as well.

Signed-off-by: Martin Pitt <martin@amutable.com>
2026-09-11 08:18:43 +02:00
Martin Pitt e2e536224d core/automount: do not abort when there is no autofs to talk to
Releasing the requests the kernel queued goes through `open_ioctl_fd()`, which
asserts on the manager fd for /dev/autofs. That fd stays unset when
`open_dev_autofs()` fails while coldplugging an automount, while the
deserialized pipe and its tokens outlive it.

Report the failure to the caller instead of asserting/crashing PID 1.

Signed-off-by: Martin Pitt <martin@amutable.com>
2026-09-11 08:18:20 +02:00
Kai Wohlfahrt 31584c62d3 get_sysext_overlay_block -> extension_overlay_block
For re-use in systemd-gpt-auto-generator. This also makes it generic
across sysext/confext - no planned use for this, but to avoid confusion
later when someone tries to use it on a confext.
2026-09-10 13:47:22 +02:00
Lennart Poettering aaab1f107c tree-wide: reference UAPI.20 spec that has been published for Varlink now
This updates a couple of links talking about Varlink:

1. anything that refers to specific Varlink concepts now point to the
   UAPI.20 spec

2. More general references to Varlink as a whole point to both the
   varlink.org domain and the spec.
2026-09-10 12:07:06 +01:00
quanyeyang 5199e9618d sd-ndisc: stop solicitations only after an RS and non-zero-lifetime RA
RFC 4861 section 6.3.7 states that a host should send at least one Router
Solicitation even if it receives an unsolicited Router Advertisement
before sending its first solicitation, and should stop soliciting only
after receiving a valid Router Advertisement with a non-zero Router Lifetime.

Keep the RS timer active until both conditions are met, and add a
regression test for a zero-lifetime RA arriving before the initial RS.

Fixes #43205.
2026-09-10 11:53:44 +09:00
Chris Down 2ff84cf0a1 journalctl: Restore listing the whole catalog when no ID is given
The conversion to the OPTION macros in c3f4c1b8d6 ("journalctl:
convert to OPTION macros") replaced strv_copy_unless_empty() with
strv_copy().

This is problematic because the positional arguments are now an empty
strv rather than NULL when none are given, but `--{list,dump}-catalog`
rely on that.

Instead let's hand NULL back to them when there is nothing on the
command line.
2026-09-10 03:32:51 +09:00
Siteshwar Vashisht cef0631a8d btrfs-util: validate that sh.len is large enough
... to contain the `struct btrfs_chunk` header and all declared stripes
before using `num_stripes` as a loop bound.
2026-09-10 03:31:16 +09:00
Siteshwar Vashisht cdead3747f network/netdev: add a NULL check
... for `netdev->ifname`.
2026-09-10 01:00:04 +09:00
Muhammed Yakup Özlük 439e6d331d hwdb: add Dell Latitude 5320 accelerometer (#43710)
Add the Dell Latitude 5320 accelerometer modalias to 60-sensor.hwdb and
mark it as a base sensor, enabling correct screen rotation handling for
this convertible model.

Closes #43547
2026-09-10 00:57:46 +09:00
Totoro 951cfae10b creds: decode Base64 when reading encrypted credentials
Encrypted credentials produced by systemd-creds are stored as Base64.
Decode them before decrypting in read_credential_with_decryption(), while
leaving plaintext credentials unchanged and retaining their precedence.

Bound the decoded encrypted input and report oversized credentials
explicitly. Match the plaintext reader's string semantics by rejecting
embedded NUL bytes when no size output is requested, while preserving
binary payloads for callers that request their size.

Add regression coverage for missing and malformed credentials, plaintext
precedence, decoded size boundaries, single-line and wrapped Base64,
empty strings, and binary data. Keep test outputs and host secrets scoped
to private fixtures.

Fixes #43621
2026-09-10 00:20:09 +09:00
Yu Watanabe 6a68191199 compress: avoid shifting null pointer
Otherwise, UBSAN complains when src is NULL even though the shift is zero:

../src/basic/compress.c:2074:29: runtime error: applying zero offset to null pointer
2026-09-10 00:11:29 +09:00
Luca Boccassi 8615027695 docs: list AGENTS.md in LICENSES/README.md
It doesn't use the default project license anymore so it needs to be listed

Follow-up for 75344c7829
2026-09-09 10:53:31 +01:00
Umut Tezduyar Lindskog 6175b6cb89 Align UEFI terminology
Also fix below:
“authenticode” → “Authenticode”
“implementend” → “implemented”
“next stage” → “next-stage” when used adjectivally.
2026-09-09 11:53:17 +02:00
Totoro c99616f2a3 json-stream: preserve split CRLF delimiters across reads
When a multi-byte delimiter straddles two reads, json_stream_parse()
only scans the bytes from the latest read. As a result, a QMP reply
whose "\r\n" terminator is split between reads is not recognized.

Include up to delimiter_size - 1 trailing bytes from the existing buffer
in the next scan, so delimiters spanning reads can be matched.

Add regression coverage for a split CRLF delimiter followed by another
message in the same read. Check that both objects are parsed correctly
and that no buffered input remains afterwards.
2026-09-09 10:53:25 +02:00
Zbigniew Jędrzejewski-Szmek 71024c2c43 NEWS: fix typo and reword description of tags
"arbitrary strings" is not very meaningful or even true.
2026-09-09 10:46:10 +02:00
Daan De Meyer 75344c7829 License AGENTS.md as MIT-0 2026-09-09 10:28:25 +02:00
Lennart Poettering 59117e6a34 core: fix two cases where we pass incorrect errors to logging 2026-09-09 17:24:09 +09:00
Lennart Poettering d7c3467fd9 NEWS: fix field name 2026-09-09 17:24:09 +09:00
Luca Boccassi 3b2900f050 meson: bump version to v262~rc2 2026-09-08 20:47:54 +01:00
Luca Boccassi baf4eae065 NEWS: finalize date 2026-09-08 20:47:54 +01:00
Luca Boccassi 406ef29870 NEWS: update contributors 2026-09-08 20:47:54 +01:00
Luca Boccassi 4407ba3a55 hwdb: update autosuspend rules 2026-09-08 20:47:54 +01:00
Luca Boccassi 904ce6ab38 hwdb: update rules 2026-09-08 20:47:54 +01:00
Luca Boccassi 816d1e48cc include: update syscalls lists 2026-09-08 20:47:54 +01:00
Yu Watanabe e0577192d0 tar-util: fix error code on failure (#43688) 2026-09-09 04:27:38 +09:00
Zbigniew Jędrzejewski-Szmek bf3860292e udevadm: restore noop behaviour when udevd is not running
This partially reverts 17e911ffc8.
Previously 'udevadm settle' would silently succeed if udevd was not
reachable. Restore this behaviour.

C.f. https://forge.fedoraproject.org/releng/compose-tracker-issues/issues/9573.
2026-09-09 04:26:48 +09:00
Yu Watanabe 2170ce77f2 acl-util: make acl_set_perm() helper return negative errno
All callers expect it returns negative errno on failure.
2026-09-09 00:45:17 +09:00
Yu Watanabe f3a9444896 tar-util: fix error cause passed to logger 2026-09-09 00:45:17 +09:00
Zbigniew Jędrzejewski-Szmek ce04f8a331 updatectl: fix feature JSON parsing (#43617)
## Summary

`updatectl features` failed because it expected the old feature JSON
fields,
while `systemd-sysupdate` now returns `id`, `isEnabled`, and
`documentation`
as an array.

This change:

- Aligns `updatectl` with the current feature JSON schema.
- Unifies JSON output between `systemd-sysupdate`, D-Bus, and Varlink.
- Adds support for multiple `Documentation=` entries for Features and
  Components.
- Exposes and parses `appstream` and `suggested` metadata.
- Propagates condition-evaluation errors through `condition_test_list()`
and
  `feature_is_suggested()`.
- Reports suggestion-evaluation failures instead of silently treating
them as
  `false`.
- Improves JSON dump error handling.
- Expands `TEST-72-SYSUPDATE` coverage and fixes its unknown-field
assertion.
- Documents the `DescribeFeature()` JSON field transition in `NEWS`.
- Keeps the existing Component name list for `sysupdated` compatibility.

The `name`/`enabled` to `id`/`isEnabled` transition is intentional and
documented as a v262 payload change.

Fixes #43603
2026-09-08 16:08:11 +02:00
dongshengyuan e1ae3a43d3 sysupdate: display all component documentation URLs in table output
Component definitions may contain multiple Documentation= URLs, but the
components command previously displayed only the first URL in text output.

Use TABLE_STRV_WRAPPED to display all component documentation URLs in the
table, making the full documentation list visible to users.
Add integration test coverage for multiple Documentation= assignments.
2026-09-08 16:05:39 +02:00
dongshengyuan a6f7ded859 updatectl: fix feature JSON parsing
The feature JSON payload switched to `id`, `isEnabled`, and `appstream`,
and made `documentation` an array of URLs.
`updatectl` still parsed legacy table-derived names and a single URL.
This broke feature JSON parsing and made output inconsistent.
Features without documentation could also cause a null dereference.

Align `updatectl` with the current schema and preserve all
documentation URLs across sysupdate, D-Bus, and Varlink payloads.
Propagate condition evaluation errors through `condition_test_list()`
and `feature_is_suggested()`, with consistent JSON error handling and
tests.
The `suggested` field is now optional and always a boolean when
present; it is omitted rather than set to an error string when
SuggestOn*= conditions cannot be evaluated.
Add `suggested` metadata and document the field transition.

Follow-up for 3e34ccf6df.
Follow-up for 75a247d4de.
Follow-up for 40e727c93b.

Fixes #43603
2026-09-08 16:05:36 +02:00
tunaichao 85599996a1 man: fix cgtop --recursive= and --cpu= documentation
--recursive=no is not silently ignored when all tasks are counted,
as claimed: cgtop rejects it with an error unless -P or -k is used,
since task counting is always recursive. Also document that --cpu
without an argument is equivalent to --cpu=time.
2026-09-08 15:34:58 +02:00
dongshengyuan 8839a9810e condition: propagate errors from condition_test_list()
Make condition_test_list() return negative errno on condition
evaluation errors instead of coercing them to false. This allows
callers to distinguish between a condition that evaluated to false
and a condition that failed to evaluate.

Callers that only need a boolean result explicitly check for a
positive return value, preserving their current behavior.

Add comprehensive unit tests covering error propagation with trigger
and non-trigger conditions. Tests use uname_architecture() to get the
runtime architecture instead of native_architecture(), ensuring they
work correctly in environments where binaries run under architecture
emulation.
2026-09-08 17:34:06 +08:00
Michael Vogt 1162e03e5d NEWS: move "systemd-sysext status --json=" change to right place
Originally https://github.com/systemd/systemd/pull/43595 was
targeted for v263 and the NEWS entry was for v263 too.

However it got merged now for v262 (for the right reasons) so
this commit updates the NEWS file.
2026-09-08 15:23:01 +09:00
Siteshwar Vashisht 6df59b0753 tar-util: fix an off by one read
Standard Linux POSIX ACL tag values are 0x00, 0x01, 0x02, 0x04, 0x08,
0x10 and 0x20. ELEMENTSOF(tag_map) evaluates to 33, which is one past
the last valid index 32.
2026-09-08 14:34:47 +09:00
Zbigniew Jędrzejewski-Szmek 9c665ee7aa units: allow disabling systemd-coredumpd.service
The new unit is nice, but it might not be appropriate in all scenarios. It
requires a new kernel, which might be known to not be available, and also
changes sysctl kernel.core_pattern at runtime, which might not be desired.
Replace static enablement by a normal [Install] section and add the unit
to presets to enable it by default.

The awkward instructions in the man page are simplified and adjusted.
2026-09-08 14:31:45 +09:00
Zbigniew Jędrzejewski-Szmek 89bf9a9fb4 TODO: add items about set-property 2026-09-08 14:31:45 +09:00