Commit Graph
85898 Commits
Author SHA1 Message Date
Yu Watanabe 701cf5b698 ansi-color: follow-ups for $SYSTEMD_COLOR=auto-* (#40442)
Follow-ups for #40303
2026-01-28 16:00:38 +09:00
dependabot[bot] 5169b07226 build(deps): bump meson from 1.10.0 to 1.10.1 in /.github/workflows
Bumps [meson](https://github.com/mesonbuild/meson) from 1.10.0 to 1.10.1.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/1.10.0...1.10.1)

---
updated-dependencies:
- dependency-name: meson
  dependency-version: 1.10.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-28 15:25:50 +09:00
Yu Watanabe 49beafb40a github/dependabot: fix mkosi -> systemd/mkosi 2026-01-28 14:59:58 +09:00
Yu Watanabe 586ae3f29a github: make dependabot not update mkosi reference
The refernce to mkosi is manually updated by using tools/fetch-mkosi.py,
and should not be done automatically, as it may have a bigger impact.

Follow-up for c69c5dd58a.
2026-01-28 14:53:02 +09:00
sd416 c69c5dd58a github: add group configuration for dependabot actions update (#40490)
Add group configuration for dependabot github actions update. This will
ensure that depandabot only creates 1 PR for updating all the new github
actions rather than 1 PR / action update.
2026-01-28 14:23:21 +09:00
Yu Watanabe 5a30581d67 format-table: fix typo
Follow-up for f42dc5ea18.
2026-01-28 14:10:42 +09:00
Yu Watanabe bf6452b62e dissect: fix typo
Follow-up for 688ebd3313.
2026-01-28 14:09:23 +09:00
Yu Watanabe 0340f60ed2 sd-bus: several follow-ups for MSG_CTRUNC handling (#40488)
Follow-ups for #40089.
2026-01-28 14:01:25 +09:00
Mike Yuan c49c8331b9 sd-bus/bus-message: more prudently verify it's SCM_RIGHTS that got truncated
Follow-up for 6c8de404c9

As discussed in
https://github.com/systemd/systemd/pull/40089#issuecomment-3672063388,
if any other control msg got truncated it's a genuine error, and
we should reject the message as a whole.
2026-01-28 03:34:25 +01:00
Mike Yuan f452c324e7 sd-bus/bus-socket: reinstate MSG_TRUNC handling in bus_socket_read_message()
We switched away from recvmsg_safe() in order to gracefully
handle MSG_CTRUNC. But MSG_TRUNC really shouldn't happen.

While at it, do not use RET_NERRNO with ssize_t.
2026-01-28 03:34:25 +01:00
Mike Yuan 43e08aea6e sd-bus/bus-socket: restore recvmsg_safe() during auth
At auth stage we reject any fds, hence either way the connection
would fail. Let's play it safe and check for MSG_(C)TRUNC still.
2026-01-28 03:07:01 +01:00
Yu Watanabe 149a8e6306 Bump required minimum version of glibc to 2.34
Major distributions already have glibc >= 2.34.
Let's bump the required minimum version.

Note, glibc-2.34 was released on 2021-08-01.
2026-01-28 10:56:53 +09:00
Mike Yuan 28fb7e869c storagetm: ensure device lock fd is opened for writing
Follow-up for e582484789

_cleanup_close_ is dropped, as the fd would be immediately
consumed by the nvme_subsystem_add() call below anyways.
2026-01-28 10:56:22 +09:00
Mike Yuan 480003c560 reread-partition-table: fix typo 2026-01-28 10:56:22 +09:00
Mike Yuan cc7fe807c1 ansi-color: $SYSTEMD_COLORS=true should mean generic "auto", not 24bit
Follow-up for af718e0535

The commit changed the documentation, but the actual impl
was apparently not updated. And the documented behavior
feels a bit off. I think generally "auto"/true should
override $NO_COLOR.

Plus, the test for auto-24bit is at odds with the logic
we merged. I guess it was overlooked after applying
https://github.com/systemd/systemd/pull/40303#discussion_r2720450393
2026-01-27 19:20:30 +01:00
Mike Yuan 97be547c6f ansi-color: assert on final result of get_color_mode() being settled 2026-01-27 19:17:42 +01:00
Jörg Behrmann cab4b9defd kernel-install: handle removal unsuccessful UKIs and loader entries separately
When a tries file exists, 90-uki-copy.install removes a previous UKI of the
same kernel version and all it's unbooted variants. This removal is guarded
behind a check for the existence of the already booted UKI, i.e. if uki.efi
already exists, uki.efi and uki+*.efi will be removed.

This leaves the edge case that if uki.efi does not exist, but only an unbooted,
e.g. uki+3.efi, it will not be removed. This is not a problem, if the number of
tries is constant between both builds, since a new uki+3.efi would overwrite
the existing one, but if the number of tries is changed to, e.g. uki+5.efi, we
are left with both uki+3.efi and uki+5.efi.

The same is done for loader entries.
2026-01-27 15:53:48 +01:00
Zbigniew Jędrzejewski-Szmek 69d130aac5 preparations for installer PR (#40446)
As suggested by @keszybz the generic preparatory work split out of
#38764
2026-01-27 15:04:47 +01:00
Daniel Foster 49811c6715 man/custom-html: support dark mode
Use the browser's default style and opt in for dark mode.

Has the bonus of removing some
[deprecated attributes](https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/body#deprecated_attributes).
2026-01-27 13:43:33 +01:00
Peter Oliver bee663e22a NEWS: Remember to mention new option SYSTEMD_COLORS=auto-24bit 2026-01-27 12:27:19 +01:00
Zbigniew Jędrzejewski-Szmek 56b9c3ad40 sd-bus: allow receiving messages with MSG_CTRUNC set (#40089)
In the event that we can't receive all of the fds from the message
(which can happen for a number of reasons including LSM denials or
hitting the fd limit of the process) the kernel will set the MSG_CTRUNC
flag.  Through our use of recvmsg_safe() we've been treating this as a
fatal error, which will result in dropping the connection.

Let's dial that back a bit: we can receive the message, but when the
user attempts to access the missing fds via sd_bus_message_read_basic()
we can return the (existing) error code of -EBADMSG to indicate that the
fd is missing.

We can do this by using recvmsg() directly, and relaxing some of the
checks on message creation: when (and only when) we have received
MSG_CTRUNC we allow a smaller than expected (per the header) number of
fds to be present.  The error check in sd_bus_message_read_basic() was
already there so we don't need to do anything about that.

This puts the receiver of the message into a difficult situation: you
can call sd_bus_message_read_basic() as often as you want but as long as
it keeps returning -EBADMSG it won't progress through the message and
you won't be able to close whatever container you're in.  That means
that the user will probably need to abandon processing the message
anyway.  So why not just drop the message up front?  This approach is
more likely to yield a useful error message, which will be invaluable
for people trying to track down problems caused by LSM denials.

Fixes #34688
2026-01-27 12:07:33 +01:00
Michael Vogt 8c5c04ed27 vmspawn: keep stderr fd connected when running ssh-keygen
When vmspawn executes ssh-keygen it currently hides all std{out,err}.
This is not ideal when errors happen, so this commit tweaks the
code to include stderr in the output.

My use case is that I recently ran into the issue that inside a
`mkosi box` my systemd-homed user was not available so ssh-keygen
errored with `No user exists for uid 1000` [0] but that error was
not visible, only the generic:
`'/usr/bin/ssh-keygen' failed with exit status 255.`
was displayed.

This also adds FORK_REOPEN_LOG to the pidref_safe_fork flags,
thanks to Mike Yuan for the suggestion.

[0] Arguably this is also an issue in ssh-keygen because it does
not need to do the user lookup when `-f /path/` is passed.
2026-01-27 10:35:14 +01:00
Sriman Achanta 50caaf267b hwdb: Add extended SteelSeries Arctis headset device support (#40479)
Add USB device IDs for additional SteelSeries Arctis headset models to
the sound card hardware database. This extends support for the complete
Arctis lineup including newer models.

Newly added device IDs:
- Arctis 7 P (0x12d5)
- Arctis Pro (0x1290)
- Arctis Nova 3 (0x12ec)
- Arctis Nova 3 P (0x2269)
- Arctis Nova 3 X (0x226d)
- Arctis Nova 5 (0x2232)
- Arctis Nova 5 X (0x2253)
- Arctis Nova 7 Rev2 (0x2258)
- Arctis Nova 7 Diablo (0x223a)
- Arctis Nova 7 WoW (0x227a)
- Arctis Nova 7 2 (0x22a1)
- Arctis Nova 7 Gen2 (0x227e)
- Arctis Nova 7 X Gen2 (0x229e)
- Arctis Nova Pro (0x12e0)
- Arctis Nova Pro X (0x12e5)

Also reordered existing entries for better organization.

Note, steelseries [firmware release
103.0.0](https://techblog.steelseries.com/2026/01/21/GG-notes-103.0.0.html)
was a major update for all Nova 7 (Gen 1) Family headsets with new PIDs
being issued for the devices. I only own the Nova 7 which is the only
(previously unknown) PID being added. Additional PIDs will need to be
added for those new identifiers (if any), but this should be basically
every Steelseries Headset which the kernel supports/will eventually
support.
2026-01-27 15:11:35 +09:00
Allison Karlitskaya 744d589632 sd-bus: add test cases for truncated fds
We add some test cases for the previous commits: first (with Claude's
help) we exercise the message creation API internally by passing it
various combinations of incorrect fds with the might_be_truncated flag
set to true or false.

Then we try more of a "real world" test by lowering our fd limit and
sending ourselves a message via the bus and making sure that we
successfully receive a message that has had at least some of its fds
truncated.
2026-01-26 16:07:26 +01:00
Allison Karlitskaya 6c8de404c9 sd-bus: allow receiving messages with MSG_CTRUNC set
In the event that we can't receive all of the fds from the message
(which can happen for a number of reasons including LSM denials or
hitting the fd limit of the process) the kernel will set the MSG_CTRUNC
flag.  Through our use of recvmsg_safe() we've been treating this as a
fatal error, which will result in dropping the connection.

Let's dial that back a bit: we can receive the message, but when the
user attempts to access the missing fds via sd_bus_message_read_basic()
we can return the (existing) error code of -EBADMSG to indicate that the
fd is missing.

We can do this by using recvmsg() directly, and relaxing some of the
checks on message creation: when (and only when) we have received
MSG_CTRUNC we allow a smaller than expected (per the header) number of
fds to be present.  The error check in sd_bus_message_read_basic() was
already there so we don't need to do anything about that.

This puts the receiver of the message into a difficult situation: you
can call sd_bus_message_read_basic() as often as you want but as long as
it keeps returning -EBADMSG it won't progress through the message and
you won't be able to close whatever container you're in.  That means
that the user will probably need to abandon processing the message
anyway.  So why not just drop the message up front?  This approach is
more likely to yield a useful error message, which will be invaluable
for people trying to track down problems caused by LSM denials.

Fixes #34688
2026-01-26 16:07:23 +01:00
Lennart Poettering 2e38c56c73 test: perform /usr/share/ sysext unmount lazily
/usr/share/ is a directory commonly accessed by various tools, hence we
really should make sure we umount it lazily (MNT_DETACH), since
otherwise there's a good chance that the umount might simply fail.

I noticed this there:

https://github.com/systemd/systemd/actions/runs/21321690161/job/61372465563?pr=40446
2026-01-26 11:49:37 +00:00
Mike Yuan 802babf38c exec-invoke: minor tweaks (#40450) 2026-01-25 22:11:32 +01:00
Lennart Poettering 65a6da9c96 conf-files: add flag so that we don't always prefix returned paths with the root dir path used
This is useful in tools such as system-repart where we show the
definition file paths a lot in our output, but if prefixed with the root
path we'd show a temporary mount dir when operating on a image file.
Hence, let's drop the prefix here, and show only the path within the
image.
2026-01-25 20:51:50 +01:00
Lennart Poettering 8a4f856977 conf-files: rename .name field to .filename to make clearer what precisely it is the name of 2026-01-25 20:51:50 +01:00
Lennart Poettering 9b116a0871 boot-entry: plug through XAT_FDROOT 2026-01-25 20:51:50 +01:00
Lennart Poettering 64ef947022 os-util: support XAT_FDROOT everywhere 2026-01-25 20:51:50 +01:00
Lennart Poettering 6ecfa12af0 conf-files: add support for root_fd based operation
Let's make sure we can safely load configuration files based on a root
fd, including XAT_FDROOT.

(While we are at it, always pass path to root fs before fd to root fs,
following our recently updated CODING_STYLE)
2026-01-25 20:51:50 +01:00
Lennart Poettering 17ade5b2af sd-id128-util: allow XAT_FDROOT pass through in id128_get_machine_at() 2026-01-25 20:51:50 +01:00
Lennart Poettering 8d55f319fb exec-invoke: remove one level of indentation 2026-01-25 20:29:05 +01:00
Lennart Poettering c28aeab184 exec-invoke: handle PRIVATE_USERS_SELF cases together
And moving things to a switch/case sttement.
2026-01-25 20:29:05 +01:00
Mike Yuan a8b099d663 sd-event: unpoison memory returned by epoll_pwait2() (#40464)
Fixes #40455

Alternative to #40463
Closes #40463
2026-01-25 00:50:18 +01:00
Lennart Poettering 3775fab341 CODING_STYLE: suggest a clear order for func params that combine fd and path 2026-01-24 20:52:00 +01:00
Lennart Poettering ca088266bc loop-util: when open_flags is unspecified derive it from passed in fd 2026-01-24 20:51:45 +01:00
Mike Yuan cc94dca5bc sd-event: use FOREACH_ARRAY 2026-01-24 18:51:21 +01:00
Mike Yuan 21ebcb5814 sd-event: unpoison memory returned by epoll_pwait2()
Our fuzzer CI recently got bumped to Ubuntu 24.04 with
glibc >= 2.35. Apparently msan is not happy with the new
epoll_pwait2(), hence explicitly mark the memory region
as initialized.

Fixes #40455
Alternative to #40463
2026-01-24 18:36:24 +01:00
Mike Yuan 1b2ad38b2b README: add epoll_pwait2() to the list of kernel APIs 2026-01-24 18:28:24 +01:00
Mike Yuan 5ad66a9b72 units/meson.build: rebreak lines 2026-01-24 18:07:15 +01:00
Luca Boccassi c644e9e6e6 mkosi: fix debian/ubuntu/suse builds
Follow-up for 072e72424b
2026-01-24 16:12:09 +01:00
Luca Boccassi c4fd3043ff mkosi: workaround autovt removal in SUSE spec
Follow-up for 072e72424b
2026-01-24 13:24:58 +00:00
Luca Boccassi acd5fd0a6d mkosi: update debian commit reference to 6f4d90be5cb4075954f0a36653105e586a9a1fa9
* 6f4d90be5c Do not install autovt@ for upstream builds
* 8cc28a6b82 Install new files for upstream build
* 0d15255073 Use deb-systemd-invoke to reexec instead of manual calls
* db04e5fa0b Use dh_installsystemd to handle journald and networkd
* d8756a4c82 Use dh_installsystemd more to manage units
* 40b23b0d5d d/tests: drop tests-in-lxd
* 5821c5a350 d/control: have systemd-boot depend on efibootmgr for amd64 and arm64 only

Follow-up for 072e72424b
2026-01-24 13:19:56 +00:00
Zbigniew Jędrzejewski-Szmek 072e72424b units/getty@.service: use [Install]Alias= instead of static alias
In Fedora, kmsconvt@.service is starting to be used instead of getty@.service
to have nicer font handling. This means that we need the autovt@.service alias
point to the new unit. So far the alias was done through a static symlink
because there was little reason to change it. Let's use [Install] instead so
the decision which implementation to use can be made after installation.

https://bugzilla.redhat.com/show_bug.cgi?id=2429626
https://fedoraproject.org/wiki/Changes/UseKmsconVTConsole
2026-01-24 13:19:08 +01:00
Lennart Poettering a2bf4b5da9 tivial journal fixlets (#40448) 2026-01-24 13:18:31 +01:00
Lennart Poettering c5761f352b mountfsd: improve logging 2026-01-24 13:18:15 +01:00
Mike Yuan 0f22a0918d run: remove unused enum values for getopt_long() 2026-01-24 13:18:00 +01:00
Mike Yuan afc5d175a2 core/exec-invoke: switch PRIVATE_USERS_FULL to direct "0 0 UINT32_MAX" mapping (#40445) 2026-01-24 00:04:30 +01:00