]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 hours agohwdb: keyboard: uppercase apple id main
David Santamaría Rogado [Thu, 29 Jan 2026 22:28:21 +0000 (23:28 +0100)] 
hwdb: keyboard: uppercase apple id

4 hours agohwdb: keyboard: fix typo CAPSLOCK to NUMLOCK
David Santamaría Rogado [Thu, 29 Jan 2026 21:03:02 +0000 (22:03 +0100)] 
hwdb: keyboard: fix typo CAPSLOCK to NUMLOCK

13 hours agoRework error propagation in systemctl preset (#40504)
Zbigniew Jędrzejewski-Szmek [Thu, 29 Jan 2026 15:41:31 +0000 (16:41 +0100)] 
Rework error propagation in systemctl preset (#40504)

16 hours agotest: fix test with -Dnetworkd=false
David Tardon [Tue, 27 Jan 2026 13:41:27 +0000 (14:41 +0100)] 
test: fix test with -Dnetworkd=false

User and group systemd-network are created from
sysusers.d/systemd-network.conf, which is only copied into the test
image when building with -Dnetworkd=true. This means that if
-Dnetworkd=false is used, the user and the group don't exist, which
causes the test to fail.

Use a locally created user and group to avoid that.

21 hours agoshared/install: rework error propagation again 40504/head
Zbigniew Jędrzejewski-Szmek [Thu, 29 Jan 2026 07:12:52 +0000 (08:12 +0100)] 
shared/install: rework error propagation again

The immediate impulse for this change is the fedora scriptlet which called:
  /usr/lib/systemd/systemd-update-helper install-system-units cryptsetup-pre.target cryptsetup.target getty@.service ... system-systemd\x2dcryptsetup.slice system-systemd\x2dveritysetup.slice ...
which called
  systemctl preset cryptsetup-pre.target cryptsetup.target getty@.service ... system-systemd\x2dcryptsetup.slice system-systemd\x2dveritysetup.slice ...
which threw an error that system-systemdx2dcryptsetup.slice does not exist
and did nothing at all. (The backslash is consumed by the shell.)
The obvious fix here is to figure out more levels of escaping… But we should
do something more robust in such cases.

If we fail in processing of a single unit, let preset all continue processing
units, report the failure through 'changes'. At the end, return failure. In
general, for operations which operate on a list of units specified by the user,
fail the whole operation if any of the individual operations failed. The only
operation where we don't do this is 'preset-all'.

$ SYSTEMD_LOG_LEVEL=debug build/systemctl --root=/ preset asdf1.servie asdf2.path; echo $?
Cannot find unit asdf1.servie.service.
Cannot find unit asdf2.path.
Failed to preset unit: Unit asdf1.servie.service does not exist
Failed to preset unit: Unit asdf2.path does not exist
1

While at it, fix double logging in the manager: dump_unit_changes() already
logs about errors, so the manager should only log on success.

22 hours agoshared/install: fix bogus error handling
Zbigniew Jędrzejewski-Szmek [Thu, 29 Jan 2026 06:45:55 +0000 (07:45 +0100)] 
shared/install: fix bogus error handling

This partially reverts a4f0e0da3573a10bc5404142be8799418760b1d1. The
intent was good, we gather the errors, but we have no mechanism to
propagate the result, so the gathered result was ignored. In 'changes'
we can only report errors for specific units. If reading of the
directory fails, we might just as well report the error immediately.
This isn't great, but it's better then ignoring the errors. In practice,
failing halfway in this manner is unlikely, since it'd mean that the fs
is corrupted or something like that. We might as well return immediately
on such catastrophic errors.

29 hours agovmspawn: Add image format option to support qcow2
Kai Lüke [Sun, 25 Jan 2026 22:09:16 +0000 (23:09 +0100)] 
vmspawn: Add image format option to support qcow2

A QEMU qcow2 VM image can be internally sparse and compressed.
Support such images in vmspawn for both the main disk and any extra
disks.

35 hours agotar-util: do not error out if archive_read_next_header() returns ARCHIVE_WARN
Antonio Alvarez Feijoo [Wed, 28 Jan 2026 12:42:25 +0000 (13:42 +0100)] 
tar-util: do not error out if archive_read_next_header() returns ARCHIVE_WARN

archive_read_header(3) states that `archive_read_next_header()` returns
`ARCHIVE_WARN` if it succeeds but a non-critical error is found, so issue a
warning instead of stopping the untar process in this case.

37 hours agopidfd/cgroup-util: use fully-sized filehandle buffers
Jeff Layton [Wed, 28 Jan 2026 13:25:10 +0000 (08:25 -0500)] 
pidfd/cgroup-util: use fully-sized filehandle buffers

The current code assumes that FILEID_KERNFS filehandles will never grow
in size. This is not a safe assumption and userland shouldn't be trying
to guess the size of the filehandle it'll get.

We have a macro for that: MAX_HANDLE_SZ.

42 hours agobash-completion/vmspawn: insert missing space between options
Kai Lüke [Wed, 28 Jan 2026 10:48:00 +0000 (19:48 +0900)] 
bash-completion/vmspawn: insert missing space between options

Follow-up for 3b18a8795df525f1e10528f8c056f1e49a1d9bfe.

45 hours agobuild(deps): bump the actions group across 1 directory with 9 updates
dependabot[bot] [Wed, 28 Jan 2026 06:05:49 +0000 (06:05 +0000)] 
build(deps): bump the actions group across 1 directory with 9 updates

Bumps the actions group with 9 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `4.2.2` | `6.0.2` |
| [actions/setup-python](https://github.com/actions/setup-python) | `5.6.0` | `6.2.0` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `4` | `6` |
| [github/codeql-action](https://github.com/github/codeql-action) | `3.29.7` | `4.32.0` |
| [redhat-plumbers-in-action/differential-shellcheck](https://github.com/redhat-plumbers-in-action/differential-shellcheck) | `5.5.3` | `5.5.6` |
| [redhat-plumbers-in-action/gather-pull-request-metadata](https://github.com/redhat-plumbers-in-action/gather-pull-request-metadata) | `1.8.1` | `1.9.0` |
| [redhat-plumbers-in-action/advanced-issue-labeler](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler) | `3.2.3` | `3.2.4` |
| [actions/github-script](https://github.com/actions/github-script) | `7.0.1` | `8.0.0` |
| [super-linter/super-linter](https://github.com/super-linter/super-linter) | `8.3.0` | `8.3.2` |

Updates `actions/checkout` from 4.2.2 to 6.0.2
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/11bd71901bbe5b1630ceea73d27597364c9af683...de0fac2e4500dabe0009e67214ff5f5447ce83dd)

Updates `actions/setup-python` from 5.6.0 to 6.2.0
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/a26af69be951a213d495a4c3e4e4022e16d87065...a309ff8b426b58ec0e2a45f0f869d46889d02405)

Updates `actions/upload-artifact` from 4 to 6
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v6)

Updates `github/codeql-action` from 3.29.7 to 4.32.0
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/51f77329afa6477de8c49fc9c7046c15b9a4e79d...b20883b0cd1f46c72ae0ba6d1090936928f9fa30)

Updates `redhat-plumbers-in-action/differential-shellcheck` from 5.5.3 to 5.5.6
- [Release notes](https://github.com/redhat-plumbers-in-action/differential-shellcheck/releases)
- [Changelog](https://github.com/redhat-plumbers-in-action/differential-shellcheck/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/redhat-plumbers-in-action/differential-shellcheck/compare/dd551ce780d8af741f8cd8bab6982667b906b457...d965e66ec0b3b2f821f75c8eff9b12442d9a7d1e)

Updates `redhat-plumbers-in-action/gather-pull-request-metadata` from 1.8.1 to 1.9.0
- [Release notes](https://github.com/redhat-plumbers-in-action/gather-pull-request-metadata/releases)
- [Commits](https://github.com/redhat-plumbers-in-action/gather-pull-request-metadata/compare/b3dbc3f843e8343dbcb2af5bffba72c974d3a07a...b86d1eaf7038cf88a56b26ba3e504f10e07b0ce5)

Updates `redhat-plumbers-in-action/advanced-issue-labeler` from 3.2.3 to 3.2.4
- [Release notes](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler/releases)
- [Commits](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler/compare/e38e6809c5420d038eed380d49ee9a6ca7c92dbf...b80ae64e3e156e9c111b075bfa04b295d54e8e2e)

Updates `actions/github-script` from 7.0.1 to 8.0.0
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/60a0d83039c74a4aee543508d2ffcb1c3799cdea...ed597411d8f924073f98dfc5c65a23a2325f34cd)

Updates `super-linter/super-linter` from 8.3.0 to 8.3.2
- [Release notes](https://github.com/super-linter/super-linter/releases)
- [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/super-linter/super-linter/compare/502f4fe48a81a392756e173e39a861f8c8efe056...d5b0a2ab116623730dd094f15ddc1b6b25bf7b99)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/setup-python
  dependency-version: 6.2.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: github/codeql-action
  dependency-version: 4.32.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: redhat-plumbers-in-action/differential-shellcheck
  dependency-version: 5.5.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: redhat-plumbers-in-action/gather-pull-request-metadata
  dependency-version: 1.9.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: redhat-plumbers-in-action/advanced-issue-labeler
  dependency-version: 3.2.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: actions/github-script
  dependency-version: 8.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: super-linter/super-linter
  dependency-version: 8.3.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
46 hours agoansi-color: follow-ups for $SYSTEMD_COLOR=auto-* (#40442)
Yu Watanabe [Wed, 28 Jan 2026 07:00:38 +0000 (16:00 +0900)] 
ansi-color: follow-ups for $SYSTEMD_COLOR=auto-* (#40442)

Follow-ups for #40303

46 hours agobuild(deps): bump meson from 1.10.0 to 1.10.1 in /.github/workflows
dependabot[bot] [Wed, 28 Jan 2026 05:24:22 +0000 (05:24 +0000)] 
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>
47 hours agogithub/dependabot: fix mkosi -> systemd/mkosi
Yu Watanabe [Wed, 28 Jan 2026 05:59:58 +0000 (14:59 +0900)] 
github/dependabot: fix mkosi -> systemd/mkosi

47 hours agogithub: make dependabot not update mkosi reference
Yu Watanabe [Wed, 28 Jan 2026 05:43:06 +0000 (14:43 +0900)] 
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 c69c5dd58abae56fd47240a06b60c4c9050154a2.

47 hours agogithub: add group configuration for dependabot actions update (#40490)
sd416 [Wed, 28 Jan 2026 05:23:21 +0000 (10:53 +0530)] 
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.

47 hours agoformat-table: fix typo
Yu Watanabe [Wed, 28 Jan 2026 05:10:39 +0000 (14:10 +0900)] 
format-table: fix typo

Follow-up for f42dc5ea18e920c70a8571309bfd66757f5e01cb.

47 hours agodissect: fix typo
Yu Watanabe [Wed, 28 Jan 2026 05:09:20 +0000 (14:09 +0900)] 
dissect: fix typo

Follow-up for 688ebd3313c481b72f6106f615814fde0ece3827.

2 days agosd-bus: several follow-ups for MSG_CTRUNC handling (#40488)
Yu Watanabe [Wed, 28 Jan 2026 05:01:25 +0000 (14:01 +0900)] 
sd-bus: several follow-ups for MSG_CTRUNC handling (#40488)

Follow-ups for #40089.

2 days agosd-bus/bus-message: more prudently verify it's SCM_RIGHTS that got truncated 40488/head
Mike Yuan [Tue, 27 Jan 2026 18:10:41 +0000 (19:10 +0100)] 
sd-bus/bus-message: more prudently verify it's SCM_RIGHTS that got truncated

Follow-up for 6c8de404c98fb9b965cba68360c2db1e3f55b776

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.

2 days agosd-bus/bus-socket: reinstate MSG_TRUNC handling in bus_socket_read_message()
Mike Yuan [Wed, 28 Jan 2026 02:01:06 +0000 (03:01 +0100)] 
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.

2 days agosd-bus/bus-socket: restore recvmsg_safe() during auth
Mike Yuan [Tue, 27 Jan 2026 18:01:18 +0000 (19:01 +0100)] 
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.

2 days agoBump required minimum version of glibc to 2.34
Yu Watanabe [Fri, 2 Jan 2026 23:23:16 +0000 (08:23 +0900)] 
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.

2 days agostoragetm: ensure device lock fd is opened for writing
Mike Yuan [Sun, 25 Jan 2026 15:50:34 +0000 (16:50 +0100)] 
storagetm: ensure device lock fd is opened for writing

Follow-up for e582484789a6d889d11b97d9c2afa74c3c985130

_cleanup_close_ is dropped, as the fd would be immediately
consumed by the nvme_subsystem_add() call below anyways.

2 days agoreread-partition-table: fix typo
Mike Yuan [Sun, 25 Jan 2026 15:50:00 +0000 (16:50 +0100)] 
reread-partition-table: fix typo

2 days agoansi-color: $SYSTEMD_COLORS=true should mean generic "auto", not 24bit 40442/head
Mike Yuan [Fri, 23 Jan 2026 14:12:58 +0000 (15:12 +0100)] 
ansi-color: $SYSTEMD_COLORS=true should mean generic "auto", not 24bit

Follow-up for af718e05350884c0b6a9fa7248e5d2f2564c93f0

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

2 days agoansi-color: assert on final result of get_color_mode() being settled
Mike Yuan [Fri, 23 Jan 2026 14:03:57 +0000 (15:03 +0100)] 
ansi-color: assert on final result of get_color_mode() being settled

2 days agokernel-install: handle removal unsuccessful UKIs and loader entries separately
Jörg Behrmann [Fri, 23 Jan 2026 12:55:51 +0000 (13:55 +0100)] 
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.

2 days agopreparations for installer PR (#40446)
Zbigniew Jędrzejewski-Szmek [Tue, 27 Jan 2026 14:04:47 +0000 (15:04 +0100)] 
preparations for installer PR (#40446)

As suggested by @keszybz the generic preparatory work split out of
#38764

2 days agoman/custom-html: support dark mode
Daniel Foster [Sun, 25 Jan 2026 05:14:11 +0000 (15:14 +1000)] 
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).

2 days agoNEWS: Remember to mention new option SYSTEMD_COLORS=auto-24bit
Peter Oliver [Sat, 24 Jan 2026 11:56:44 +0000 (11:56 +0000)] 
NEWS: Remember to mention new option SYSTEMD_COLORS=auto-24bit

2 days agosd-bus: allow receiving messages with MSG_CTRUNC set (#40089)
Zbigniew Jędrzejewski-Szmek [Tue, 27 Jan 2026 11:07:33 +0000 (12:07 +0100)] 
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

2 days agovmspawn: keep stderr fd connected when running ssh-keygen
Michael Vogt [Mon, 26 Jan 2026 18:25:50 +0000 (19:25 +0100)] 
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.

2 days agohwdb: Add extended SteelSeries Arctis headset device support (#40479)
Sriman Achanta [Tue, 27 Jan 2026 06:11:35 +0000 (01:11 -0500)] 
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.

3 days agosd-bus: add test cases for truncated fds 40089/head
Allison Karlitskaya [Mon, 15 Dec 2025 09:35:56 +0000 (10:35 +0100)] 
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.

3 days agosd-bus: allow receiving messages with MSG_CTRUNC set
Allison Karlitskaya [Mon, 15 Dec 2025 09:27:04 +0000 (10:27 +0100)] 
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

3 days agotest: perform /usr/share/ sysext unmount lazily
Lennart Poettering [Sun, 25 Jan 2026 19:49:14 +0000 (20:49 +0100)] 
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

4 days agoexec-invoke: minor tweaks (#40450)
Mike Yuan [Sun, 25 Jan 2026 21:11:32 +0000 (22:11 +0100)] 
exec-invoke: minor tweaks (#40450)

4 days agoconf-files: add flag so that we don't always prefix returned paths with the root... 40446/head
Lennart Poettering [Mon, 15 Sep 2025 13:12:40 +0000 (15:12 +0200)] 
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.

4 days agoconf-files: rename .name field to .filename to make clearer what precisely it is...
Lennart Poettering [Mon, 15 Sep 2025 12:45:08 +0000 (14:45 +0200)] 
conf-files: rename .name field to .filename to make clearer what precisely it is the name of

4 days agoboot-entry: plug through XAT_FDROOT
Lennart Poettering [Wed, 3 Sep 2025 08:39:49 +0000 (10:39 +0200)] 
boot-entry: plug through XAT_FDROOT

4 days agoos-util: support XAT_FDROOT everywhere
Lennart Poettering [Fri, 23 Jan 2026 10:24:07 +0000 (11:24 +0100)] 
os-util: support XAT_FDROOT everywhere

4 days agoconf-files: add support for root_fd based operation
Lennart Poettering [Fri, 5 Sep 2025 12:21:53 +0000 (14:21 +0200)] 
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)

4 days agosd-id128-util: allow XAT_FDROOT pass through in id128_get_machine_at()
Lennart Poettering [Tue, 20 Jan 2026 21:34:07 +0000 (22:34 +0100)] 
sd-id128-util: allow XAT_FDROOT pass through in id128_get_machine_at()

4 days agoexec-invoke: remove one level of indentation 40450/head
Lennart Poettering [Thu, 27 Nov 2025 08:43:10 +0000 (09:43 +0100)] 
exec-invoke: remove one level of indentation

4 days agoexec-invoke: handle PRIVATE_USERS_SELF cases together
Lennart Poettering [Thu, 27 Nov 2025 07:59:17 +0000 (08:59 +0100)] 
exec-invoke: handle PRIVATE_USERS_SELF cases together

And moving things to a switch/case sttement.

5 days agosd-event: unpoison memory returned by epoll_pwait2() (#40464)
Mike Yuan [Sat, 24 Jan 2026 23:50:18 +0000 (00:50 +0100)] 
sd-event: unpoison memory returned by epoll_pwait2() (#40464)

Fixes #40455

Alternative to #40463
Closes #40463

5 days agoCODING_STYLE: suggest a clear order for func params that combine fd and path
Lennart Poettering [Tue, 20 Jan 2026 15:56:20 +0000 (16:56 +0100)] 
CODING_STYLE: suggest a clear order for func params that combine fd and path

5 days agoloop-util: when open_flags is unspecified derive it from passed in fd
Lennart Poettering [Wed, 21 Jan 2026 21:29:22 +0000 (22:29 +0100)] 
loop-util: when open_flags is unspecified derive it from passed in fd

5 days agosd-event: use FOREACH_ARRAY 40464/head
Mike Yuan [Sat, 24 Jan 2026 17:51:21 +0000 (18:51 +0100)] 
sd-event: use FOREACH_ARRAY

5 days agosd-event: unpoison memory returned by epoll_pwait2()
Mike Yuan [Sat, 24 Jan 2026 17:33:05 +0000 (18:33 +0100)] 
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

5 days agoREADME: add epoll_pwait2() to the list of kernel APIs
Mike Yuan [Sat, 24 Jan 2026 17:28:24 +0000 (18:28 +0100)] 
README: add epoll_pwait2() to the list of kernel APIs

5 days agounits/meson.build: rebreak lines
Mike Yuan [Sat, 24 Jan 2026 17:07:15 +0000 (18:07 +0100)] 
units/meson.build: rebreak lines

5 days agomkosi: fix debian/ubuntu/suse builds
Luca Boccassi [Sat, 24 Jan 2026 15:12:09 +0000 (16:12 +0100)] 
mkosi: fix debian/ubuntu/suse builds

Follow-up for 072e72424b2e6da1c96489ef6996f49fabd46474

5 days agomkosi: workaround autovt removal in SUSE spec 40460/head
Luca Boccassi [Sat, 24 Jan 2026 13:24:53 +0000 (13:24 +0000)] 
mkosi: workaround autovt removal in SUSE spec

Follow-up for 072e72424b2e6da1c96489ef6996f49fabd46474

5 days agomkosi: update debian commit reference to 6f4d90be5cb4075954f0a36653105e586a9a1fa9
Luca Boccassi [Sat, 24 Jan 2026 13:19:28 +0000 (13:19 +0000)] 
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 072e72424b2e6da1c96489ef6996f49fabd46474

5 days agounits/getty@.service: use [Install]Alias= instead of static alias
Zbigniew Jędrzejewski-Szmek [Fri, 23 Jan 2026 13:18:14 +0000 (14:18 +0100)] 
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

5 days agotivial journal fixlets (#40448)
Lennart Poettering [Sat, 24 Jan 2026 12:18:31 +0000 (13:18 +0100)] 
tivial journal fixlets (#40448)

5 days agomountfsd: improve logging
Lennart Poettering [Fri, 28 Nov 2025 15:22:21 +0000 (16:22 +0100)] 
mountfsd: improve logging

5 days agorun: remove unused enum values for getopt_long()
Mike Yuan [Sat, 24 Jan 2026 00:11:16 +0000 (01:11 +0100)] 
run: remove unused enum values for getopt_long()

6 days agocore/exec-invoke: switch PRIVATE_USERS_FULL to direct "0 0 UINT32_MAX" mapping (...
Mike Yuan [Fri, 23 Jan 2026 23:04:30 +0000 (00:04 +0100)] 
core/exec-invoke: switch PRIVATE_USERS_FULL to direct "0 0 UINT32_MAX" mapping (#40445)

6 days agojournal: do not use typecasts for range checks 40448/head
Lennart Poettering [Wed, 21 Jan 2026 22:48:29 +0000 (23:48 +0100)] 
journal: do not use typecasts for range checks

6 days agojournal: some whitespace fixes
Lennart Poettering [Wed, 21 Jan 2026 22:48:14 +0000 (23:48 +0100)] 
journal: some whitespace fixes

6 days agoupdate TODO
Lennart Poettering [Fri, 23 Jan 2026 21:19:18 +0000 (22:19 +0100)] 
update TODO

6 days agocore/exec-invoke: switch PRIVATE_USERS_FULL to direct "0 0 UINT32_MAX" mapping 40445/head
Mike Yuan [Fri, 23 Jan 2026 17:51:28 +0000 (18:51 +0100)] 
core/exec-invoke: switch PRIVATE_USERS_FULL to direct "0 0 UINT32_MAX" mapping

This was intended for v259. Let's get it done now, in v260.

6 days agocore/exec-invoke: group setup_private_users*() together
Mike Yuan [Fri, 28 Nov 2025 18:44:17 +0000 (19:44 +0100)] 
core/exec-invoke: group setup_private_users*() together

6 days agopam_systemd: remove handling of obsolete "existing" attr from CreateSession() call...
Mike Yuan [Fri, 23 Jan 2026 16:50:44 +0000 (17:50 +0100)] 
pam_systemd: remove handling of obsolete "existing" attr from CreateSession() call (#40432)

6 days agohwdb: Update Lenovo Legion Go Models
Derek J. Clark [Thu, 22 Jan 2026 20:52:03 +0000 (12:52 -0800)] 
hwdb: Update Lenovo Legion Go Models
- Different BIOS versions of the Legion Go 2 can init the keyboard
  device as set 1 (appears as raw set 2) or as set 2 (appears as
  translated set 2). Add the Legion Go 2 to the Translated list.
- While at it, specify the models in a more verbose manner for
  posterity.

Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
6 days agoansi-color: new option SYSTEMD_COLORS=auto-16/auto-256/auto-24bit (#40303)
Peter Oliver [Fri, 23 Jan 2026 12:54:31 +0000 (12:54 +0000)] 
ansi-color: new option SYSTEMD_COLORS=auto-16/auto-256/auto-24bit (#40303)

Setting SYSTEMD_COLORS=auto-16 is like SYSTEMD_COLORS=16 if output is to
a non-dumb TTY, and like SYSTEMD_COLORS=no otherwise.

Relates to
https://github.com/systemd/systemd/issues/15498#issuecomment-1682025186

6 days agohostnamed: after unescaping fancy name, validate it's valid UTF-8
Lennart Poettering [Thu, 22 Jan 2026 21:50:43 +0000 (22:50 +0100)] 
hostnamed: after unescaping fancy name, validate it's valid UTF-8

The fancy name could contain arbitrary bytes, in escaped fashion. Before
using it, let's validate that this contains only valid UTF-8.

(Note that D-Bus might kick us off the bus if we don't ensure everything
we send around is UTF-8).

(While we are at it, do the same in PID 1, even though it's not that
important there)

Addresses this issue found by @YHNdnzj:

https://github.com/systemd/systemd/pull/40367#discussion_r2714614301

Follow-up for: #40367

6 days agoman/fstab-generator: correct root= options
Antonio Alvarez Feijoo [Fri, 23 Jan 2026 11:19:41 +0000 (12:19 +0100)] 
man/fstab-generator: correct root= options

Remove duplicate "fstab" option, and add missing "tmpfs" and "bind:" options.

7 days agopam_systemd: remove handling of obsolete "existing" attr from CreateSession() call 40432/head
Mike Yuan [Thu, 22 Jan 2026 19:41:24 +0000 (20:41 +0100)] 
pam_systemd: remove handling of obsolete "existing" attr from CreateSession() call

Follow-up for b80120c4cba7d134b5437a58437a23fdf7ab2084

After the mentioned commit, logind returns an error if the process
already lives in a session, and register_session() short-circuits
without setting systemd.existing flag. Hence systemd.existing
is either false or unset for pam_sm_close_session(), making
the whole logic effectively NOP. Kill it with fire.

7 days agohostnamed: use INDEXES_TO_MASK where appropriate
Mike Yuan [Thu, 22 Jan 2026 18:25:53 +0000 (19:25 +0100)] 
hostnamed: use INDEXES_TO_MASK where appropriate

Addresses https://github.com/systemd/systemd/pull/40367#discussion_r2714368627

7 days agopam_systemd: fix regression introduced in v258 by preserving the FIFO fd
Franck Bui [Mon, 19 Jan 2026 17:24:12 +0000 (18:24 +0100)] 
pam_systemd: fix regression introduced in v258 by preserving the FIFO fd

Upstream commit 3180c4d introduced a version incompatibility between
pam_systemd.so v258 and logind v257. This is problematic because such version
mismatches can occur in practice: logind still cannot be restarted during a
systemd package upgrade (it's a long-standing limitation, see
https://github.com/systemd/systemd/issues/17308).

When pam_systemd requests a new session, logind v257 returns a FIFO
fd. pam_systemd.so v258 ignores this fd and closes it. logind interprets the
closure as the session leader exiting and immediately terminates the session.

This patch partially reverts commit 3180c4d and restores the handling of the
FIFO fd in pam_systemd. The change is limited to the D-Bus APIs, since the
varlink API was only introduced in logind v258.

Follow-up for 3180c4d46151673a9c985e60f205d4c76a81573f.

8 days agomeson: Drop minimum meson version required for clang-tidy
Daan De Meyer [Wed, 21 Jan 2026 14:54:58 +0000 (15:54 +0100)] 
meson: Drop minimum meson version required for clang-tidy

8 days agoos-release: add a new FANCY_NAME= field to /etc/os-release, similar to PRETTY_NAME...
Lennart Poettering [Wed, 21 Jan 2026 22:57:39 +0000 (23:57 +0100)] 
os-release: add a new FANCY_NAME= field to /etc/os-release, similar to PRETTY_NAME, that may carry ansi sequences + more unicode chars (#40367)

It's sometimes useful include non-ascii unicode chars in an os name, and
give it some ansi coloring. Since we usualy don't want to show that,
introduce a new field for it, and show it at boot and in thostnamectl
only, with safe fallbacks if colors/emojis are not available.

8 days agounits/systemd-portabled: enable NoNewPrivileges=
Mike Yuan [Wed, 21 Jan 2026 19:26:31 +0000 (20:26 +0100)] 
units/systemd-portabled: enable NoNewPrivileges=

As with all other daemons we ship.

8 days agomountfsd: Make singleFileSystem non-nullable
Daan De Meyer [Wed, 21 Jan 2026 18:39:33 +0000 (19:39 +0100)] 
mountfsd: Make singleFileSystem non-nullable

It's always set, so no need to be nullable.

8 days agohostnamectl: show fancy name if available 40367/head
Lennart Poettering [Wed, 14 Jan 2026 17:23:03 +0000 (18:23 +0100)] 
hostnamectl: show fancy name if available

8 days agohostnamed: expose fancy OS name as a field
Lennart Poettering [Mon, 12 Jan 2026 12:46:47 +0000 (13:46 +0100)] 
hostnamed: expose fancy OS name as a field

8 days agopid1: show fancy name field at boot, if specified
Lennart Poettering [Mon, 12 Jan 2026 12:44:54 +0000 (13:44 +0100)] 
pid1: show fancy name field at boot, if specified

8 days agoman: introduce FANCY_NAME field
Lennart Poettering [Mon, 12 Jan 2026 12:40:27 +0000 (13:40 +0100)] 
man: introduce FANCY_NAME field

8 days agoformat-table: add new string cell type that accepts ANSI sequences
Lennart Poettering [Thu, 15 Jan 2026 07:51:05 +0000 (08:51 +0100)] 
format-table: add new string cell type that accepts ANSI sequences

For various usecases it's useful that we can embed ANSI sequences in
cells of tables. For example, I hope we can eventually switch "systemctl
status" output to use the table formatter, and multiple of its fields
contain ANSI sequences (since they pack multiple different pieces
information into the same field, and highlight parts of it to
communicate relevance of distinct parts).

Add a distinct cell type for this, which gets special processing when we
output to a terminal that doesn't support ANSI sequences, and to JSON:
we strip the sequences.

8 days agoTrivial follow-ups for recently merged PRs (#40417)
Mike Yuan [Wed, 21 Jan 2026 18:54:32 +0000 (19:54 +0100)] 
Trivial follow-ups for recently merged PRs (#40417)

8 days agoportable: Enable unpriv operation (#40091)
Daan De Meyer [Wed, 21 Jan 2026 15:46:53 +0000 (16:46 +0100)] 
portable: Enable unpriv operation (#40091)

This does not yet support directory images properly
as systemd itself does not support unpriv directory
images properly yet.

8 days agofdset: do not call fd_get_path() if debug logging is off 40417/head
Mike Yuan [Wed, 21 Jan 2026 14:39:22 +0000 (15:39 +0100)] 
fdset: do not call fd_get_path() if debug logging is off

Follow-up for 89065ada83af55ed9e2350c2df7e315e2e6ad043

8 days agonetwork/dhcp4: send release message before stopping the client
Yu Watanabe [Tue, 20 Jan 2026 09:04:33 +0000 (18:04 +0900)] 
network/dhcp4: send release message before stopping the client

Otherwise, the socket is already closed and sending release will be
anyway skipped.

With this patch, release message is sent before stopping the client.
```
Jan 20 18:29:41 systemd[1]: Stopping systemd-networkd.service - Network Management...
Jan 20 18:29:41 systemd-networkd[3821255]: wlp59s0: DHCPv4 client: RELEASE
Jan 20 18:29:41 systemd-networkd[3821255]: wlp59s0: DHCPv4 client: STOPPED
Jan 20 18:29:41 systemd-networkd[3821255]: wlp59s0: DHCP lease lost
```

Fixes #39299.

8 days agofdset: sort includes
Mike Yuan [Wed, 21 Jan 2026 14:49:47 +0000 (15:49 +0100)] 
fdset: sort includes

8 days agosysupdate-resource: on hash mismatch the best before marker is not ignored
Mike Yuan [Wed, 21 Jan 2026 14:35:39 +0000 (15:35 +0100)] 
sysupdate-resource: on hash mismatch the best before marker is not ignored

Hence use a less ambiguous wording.

Follow-up for d0badc0a619e15c67d38f65730ac210316ece84c
Addresses https://github.com/systemd/systemd/pull/40393#discussion_r2709953179

8 days agoportable: Enable unpriv operation 40091/head
Daan De Meyer [Tue, 2 Dec 2025 10:17:13 +0000 (11:17 +0100)] 
portable: Enable unpriv operation

This does not yet support directory images properly
as systemd itself does not support unpriv directory
images properly yet.

The user profiles are a copy of the system profiles but without
DynamicUser=yes (can't be used by user managers) and without
ProtectHome=yes (this masks /home which breaks StateDirectory= which
is lcoated inside /home)

8 days agopam_systemd_home: Use PAM_TEXT_INFO for token prompts
Vunny Sodhi [Wed, 21 Jan 2026 10:27:55 +0000 (12:27 +0200)] 
pam_systemd_home: Use PAM_TEXT_INFO for token prompts

The prompts asking the user to physically authenticate
or confirm presence on a security token are informational
requests for action, not error conditions.

This commit changes the message type to PAM_TEXT_INFO,
which is more appropriate for guiding the user through
the authentication process.

8 days agoshared/fdset: add detailed debug logging to fdset_new_fill()
AshishKumar Mishra [Wed, 21 Jan 2026 08:43:29 +0000 (14:13 +0530)] 
shared/fdset: add detailed debug logging to fdset_new_fill()

Currently, when fdset_new_fill() fails to open /proc/self/fd or
encounters an error while processing individual file descriptors
(such as fcntl or fstat failures), it returns a silent error code.

For debugging rarely reproducible failures it becomes difficult to
know the exact cause of failure
This commit updates the function to use log_debug_errno() for all
error paths and hence  provides better visibility into why FD collection
failed, including the path of the problematic FD (via fd_get_path)
and its inode type.

8 days agoportable: Split out receive_portable_metadata()
Daan De Meyer [Tue, 2 Dec 2025 08:29:26 +0000 (09:29 +0100)] 
portable: Split out receive_portable_metadata()

8 days agoportable: Make extract_now() operate on a dirfd
Daan De Meyer [Mon, 1 Dec 2025 22:52:29 +0000 (23:52 +0100)] 
portable: Make extract_now() operate on a dirfd

Preparation for making portabled support unpriv
operation.

8 days agoportable: Use report_errno_and_exit()
Daan De Meyer [Tue, 2 Dec 2025 08:39:13 +0000 (09:39 +0100)] 
portable: Use report_errno_and_exit()

8 days agomountfsd: Communicate whether the image is a single filesystem
Daan De Meyer [Tue, 20 Jan 2026 21:43:08 +0000 (22:43 +0100)] 
mountfsd: Communicate whether the image is a single filesystem

Various parts of the image dissection logic make use of whether the
thing is a single file system or not, so communicate this info back
from mountfsd.

8 days agomountfsd: Add relaxExtensionReleaseChecks
Daan De Meyer [Tue, 20 Jan 2026 21:41:40 +0000 (22:41 +0100)] 
mountfsd: Add relaxExtensionReleaseChecks

We currently pass this around as a mount option in pid1, which means
privileges are required by mountfsd to mount images that make use of it.
Add an explicit argument for it in varlink instead and remove it client
side from the mount options to remove the need for privileges.

8 days agopath-lookup: Add config_directory_generic()
Daan De Meyer [Tue, 2 Dec 2025 09:28:28 +0000 (10:28 +0100)] 
path-lookup: Add config_directory_generic()

8 days agodissect-image: Add more debug logging
DaanDeMeyer [Tue, 23 Dec 2025 11:44:12 +0000 (12:44 +0100)] 
dissect-image: Add more debug logging

8 days agodissect-image: Make make_image_name() public
DaanDeMeyer [Tue, 23 Dec 2025 11:43:51 +0000 (12:43 +0100)] 
dissect-image: Make make_image_name() public