]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 months agocompress: do not call lzma_end_wrapper() when failed to load liblzma
Yu Watanabe [Mon, 5 Jan 2026 07:12:40 +0000 (16:12 +0900)] 
compress: do not call lzma_end_wrapper() when failed to load liblzma

Fixes a bug in 3fc72d54132151c131301fc7954e0b44cdd3c860 (v256).
Fixes #40277.

3 months agoidn: drop support for libidn
Mike Yuan [Sun, 4 Jan 2026 22:21:14 +0000 (23:21 +0100)] 
idn: drop support for libidn

The current tree doesn't even compile with libidn(1) after
2c7bdaf9f144ad339c72628579183fc849f2b794, which included
a non-existent call to check_dlopen_blocked() somehow.
Hence, it feels safe to just nuke legacy support from
our repo.

3 months agotest-time-util: ignore failure on MSK timezone
Yu Watanabe [Mon, 5 Jan 2026 07:01:34 +0000 (16:01 +0900)] 
test-time-util: ignore failure on MSK timezone

Ignore the following failures:
- with glibc
```
TZ=Europe/Volgograd, tzname[0]=MSK, tzname[1]=MSD
@1414277092997572 → Sun 2014-10-26 01:44:52 MSK → @1414273492000000 → Sun 2014-10-26 01:44:52 MSK
src/test/test-time-util.c:448: Assertion failed: Expected "ignore" to be true
```
- with musl
```
TZ=Europe/Kirov, tzname[0]=MSK, tzname[1]=MSK
@1414277092997572 → Sun 2014-10-26 01:44:52 MSK → @1414273492000000 → Sun 2014-10-26 01:44:52 MSK
src/test/test-time-util.c:448: Assertion failed: Expected "ignore" to be true
```

3 months agomeson: remove deprecated meson options
Yu Watanabe [Sun, 4 Jan 2026 20:38:06 +0000 (05:38 +0900)] 
meson: remove deprecated meson options

These options are deprecated since
87541e254f5b0f7e6c2060867bbfe095d206f573 : -Dcryptolib=
710653d3bcc46d6c45d8771e0a74c8d5f6328bc4 : -Dintegration-tests=

3 months agomkosi: update debian commit reference to f05328feafba2156f31e17e0e2c144cfa7c66e72
Yu Watanabe [Sun, 4 Jan 2026 22:28:39 +0000 (07:28 +0900)] 
mkosi: update debian commit reference to f05328feafba2156f31e17e0e2c144cfa7c66e72

f05328feaf Drop use of deprecated options
19ed139d85 Mark sd-userdbd as Multi-Arch: foreign

3 months agoudev: downgrade log level about failure in notification 40275/head
Yu Watanabe [Sun, 4 Jan 2026 22:20:50 +0000 (07:20 +0900)] 
udev: downgrade log level about failure in notification

These may fail on shutdown/reboot, as the notification socket is already
closed.

Closes #39943.

3 months agodaemon-util: introduce notify_remove_fd()
Yu Watanabe [Sun, 4 Jan 2026 22:18:56 +0000 (07:18 +0900)] 
daemon-util: introduce notify_remove_fd()

It is equivalent to notify_remove_fd_warn() but logs in debug level on
failure.

3 months agosysext: Get verity user certs from given --root=
Kai Lueke [Thu, 27 Nov 2025 08:49:15 +0000 (17:49 +0900)] 
sysext: Get verity user certs from given --root=

The verity user certs weren't looked up in the given --root= for
systemd-sysext which made it fail to set up extensions with a strict
image policy.
Look up verity user certs from inside the --root= when we operate on
images in it. The main use case where this matters is when the initrd
sets up the extensions for the final system and thus systemd-sysext
should do the same thing as it would do in the final system.

3 months agoTweak setting of boot timeout variables (#40125)
Yu Watanabe [Sun, 4 Jan 2026 21:50:49 +0000 (06:50 +0900)] 
Tweak setting of boot timeout variables (#40125)

3 months agocore: several follow-ups (#40140)
Yu Watanabe [Sun, 4 Jan 2026 21:31:48 +0000 (06:31 +0900)] 
core: several follow-ups (#40140)

Replaces #39925
Closes #39925

3 months agocore: move several checks from _start() to _test_startable() where appropriate
Mike Yuan [Wed, 17 Dec 2025 13:40:48 +0000 (14:40 +0100)] 
core: move several checks from _start() to _test_startable() where appropriate

If these basic sanity checks fail, there's no point in
bumping ratelimit.

3 months agoman/systemd.socket: Document JoinsNamespaceOf= support
Lucas Werkmeister [Sun, 4 Jan 2026 13:19:14 +0000 (14:19 +0100)] 
man/systemd.socket: Document JoinsNamespaceOf= support

This has been supported since systemd v242 (specifically commit
7619cb32f0 if I’m not mistaken; added to NEWS in commit 4107452e51), but
the man page still claimed otherwise.

3 months agonss-systemd: always fill sg_adm and sg_mem in shadow groups (#40218)
Yu Watanabe [Sun, 4 Jan 2026 18:12:26 +0000 (03:12 +0900)] 
nss-systemd: always fill sg_adm and sg_mem in shadow groups (#40218)

The `sg_adm` and `sg_mem` fields are not always set in shadow groups,
which can lead to issues with foreign tools like shadow's `sg` command.
Since other NSS implementations properly set these fields and it would
otherwise be impossible to access `administrators` and `members`
information from JSON files, it's bets to always fill these fields.

Even though `sg` is a nice example which should be already installed,
the issue itself can be reproduced with this simple program as well. It
relies on filled `sg_adm` and `sg_mem` fields just like `sg` does:

```
#include <err.h>
#include <gshadow.h>
#include <stdio.h>

int
main(int argc, char *argv[])
{
        struct sgrp *s;
        char **p;

        if (argc != 2)
                errx(1, "usage: poc group");

        s = getsgnam(argv[1]);
        printf("name: %s\n", s->sg_namp);
        printf("admins:\n");
        p = s->sg_adm;
        while (*p != NULL) {
                printf("- %s\n", *p);
                p++;
        }
        printf("members:\n");
        p = s->sg_mem;
        while (*p != NULL) {
                printf("- %s\n", *p);
                p++;
        }
}
```

Run it like this: `./poc root`

Proof of Concept (Arch Linux, which uses systemd with systemd-userdbd
and shadow's sg):

```
$ grep systemd /etc/nsswitch.conf
passwd: files systemd
group: files [SUCCESS=merge] systemd
shadow: files systemd
gshadow: files systemd
```

Issue with intrinsic groups:

Run as unprivileged user, who has no access to `/etc/gshadow` to trigger
nss-systemd (strace disables setuid of sg)
```
$ strace sg root
write(2, "sg: list.c:169: is_on_list: Asse"..., 61sg: list.c:169: is_on_list: Assertion `NULL != list' failed.
) = 61
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa7e9c0c000
gettid()                                = 1882
getpid()                                = 1882
tgkill(1882, 1882, SIGABRT)             = 0
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=1882, si_uid=1000} ---
+++ killed by SIGABRT (core dumped) +++
Aborted                    (core dumped) strace sg root
```

Issue with groups through systemd-userdbd:

1. Create a custom group (as root)
```
cat > /etc/userdb/sg-poc.group << EOF
{
  "groupName": "sg-poc",
  "gid": 6123,
  "administrators": [
    "root"
  ],
  "members": [
    "bin"
  ]
}
EOF
ln -s sg-poc.group /etc/userdb/6123.group
```

2. Verify that group actually exists
```
$ userdbctl group sg-poc
  Group name: sg-poc
 Disposition: regular
         GID: 6123
      Admins: root
     Service: io.systemd.NameServiceSwitch
```

3. Run `sg` to switch into group `sg-poc` as regular user, this time
with setuid, i.e. no strace as before
```
$ sg sg-poc
sg: list.c:169: is_on_list: Assertion `NULL != list' failed.
Aborted                    (core dumped) sg sg-poc
```

3 months agoshared/install: ignore aliasing failure when doing presets
Zbigniew Jędrzejewski-Szmek [Sun, 4 Jan 2026 14:10:42 +0000 (15:10 +0100)] 
shared/install: ignore aliasing failure when doing presets

In recent Fedora, preset-all fails:
[  155s] Failed to preset unit: File '/buildroot/etc/systemd/user/dbus.service'
         already exists and is a symlink to /usr/lib/systemd/user/dbus-broker.service
[  155s] ‣ "systemctl --root=/buildroot --global preset-all" returned non-zero exit code 1.

Strictly speaking, this is an error in configuration. The presets specify that
both dbus-broker.service and dbus-daemon.service shall be enabled and they both
claim the 'dbus.service' alias. But this kind of error is very easy to make.
Failing the preset operation is too harsh, since in most cases the system will
work fine without an alias and changes in unrelated components can cause the
conflict.

Let's reuse the same logic that was added in
ad5fdd391248432e0c105003a8a13f821bde0b8e: when enabling the unit through
'preset' or 'preset-all', print the message, but suppress the error. When
enabling through 'enable', fail the operation.

3 months agoLogging cleanups (#40271)
Yu Watanabe [Sun, 4 Jan 2026 18:06:09 +0000 (03:06 +0900)] 
Logging cleanups (#40271)

3 months agonss-systemd: add unit test for sg_adm/sg_mem 40218/head
Tobias Stoeckmann [Sun, 4 Jan 2026 11:19:22 +0000 (12:19 +0100)] 
nss-systemd: add unit test for sg_adm/sg_mem

Add a test for getsgnam_r to verify that sg_adm and sg_mem always point
to a NULL-terminated string vector.

Extend the gr_mem check of struct group for non-NULL values as well.

3 months agonss-systemd: set sg_adm/sg_mem for all groups
Tobias Stoeckmann [Sat, 27 Dec 2025 14:27:05 +0000 (15:27 +0100)] 
nss-systemd: set sg_adm/sg_mem for all groups

Fill sg_adm and sg_mem in nss_pack_group_record_shadow to stay
compatible with other NSS getsgnam implementations which set these
members to NULL terminated string arrays.

Tools like shadow's sg would trigger a NULL pointer dereference with
groups only found through nss-systemd otherwise.

3 months agonss-systemd: set sg_adm/sg_mem in intrinsic groups
Tobias Stoeckmann [Sat, 27 Dec 2025 14:24:45 +0000 (15:24 +0100)] 
nss-systemd: set sg_adm/sg_mem in intrinsic groups

The sg_adm and sg_mem fields are supposed to point to a NULL terminated
string array. If these are NULL, some foreign tools like shadow's sg
trigger NULL pointer dereferences (or fortunately their asset() calls).

3 months agoTEST-46-HOMED: fix 2 minute timeout in cleanup
Zbigniew Jędrzejewski-Szmek [Tue, 16 Dec 2025 13:45:40 +0000 (14:45 +0100)] 
TEST-46-HOMED: fix 2 minute timeout in cleanup

The test passes but for two minutes the cleanup function just logs:
Failed to inspect home: No home for user homedsshtest known
Failed to inspect home: No home for user homedsshtest known
Failed to inspect home: No home for user homedsshtest known
...

Do not wait for the user to become inactive or remove the user if 'homectl
inspect' doesn't find the user. This brings a successfull run from 176 s
to 58 s here.

3 months agoinhibit: fix borked double logging on error 40271/head
Zbigniew Jędrzejewski-Szmek [Sun, 4 Jan 2026 11:25:32 +0000 (12:25 +0100)] 
inhibit: fix borked double logging on error

Previously, if execution failed, we'd log at error level both from the
child and the parent, and we were using a bogus variable for the argument
name:
$ build/systemd-inhibit list
Failed to execute : No such file or directory
list failed with exit status 1.

In general, we can and should assume that the program the user is calling
is well behaved, so it'll log the error on its own if appropriate. So we
shouldn't log on "normal errors", but only if the child is terminated by
a signal.

And since the program name is controlled by the user, use quotes everywhere
to avoid ambiguity.

Now:
$ build/systemd-inhibit false
(nothing)
$ build/systemd-inhibit bash -c 'kill -SEGV $$'
src/basic/process-util.c:895: 'bash' terminated by signal SEGV.

3 months agobasic/process-util: reduce scope of variables
Zbigniew Jędrzejewski-Szmek [Sun, 4 Jan 2026 11:21:52 +0000 (12:21 +0100)] 
basic/process-util: reduce scope of variables

3 months agobasic/process-util: use synthetic errno in two more places
Zbigniew Jędrzejewski-Szmek [Sun, 4 Jan 2026 11:18:38 +0000 (12:18 +0100)] 
basic/process-util: use synthetic errno in two more places

3 months agossh-generator: reword error message
Zbigniew Jędrzejewski-Szmek [Wed, 17 Dec 2025 21:51:26 +0000 (22:51 +0100)] 
ssh-generator: reword error message

We have two error messages with exactly the same message.
Let's change one so that it is possible to distinguish them
in logs.

3 months agobootctl: round the timeout up 40125/head
Zbigniew Jędrzejewski-Szmek [Fri, 21 Nov 2025 11:53:20 +0000 (12:53 +0100)] 
bootctl: round the timeout up

I think this is better: if I specify 0.5s, I'd be suprised if the
menu didn't show up at all.

3 months agobootctl: rework setting of menu timeout variables
Zbigniew Jędrzejewski-Szmek [Fri, 21 Nov 2025 11:32:18 +0000 (12:32 +0100)] 
bootctl: rework setting of menu timeout variables

menu-force and menu-hidden were added in 97f077df052c75224dcc73375bfaaa69af6a1c26,
menu-disable was added in 6efdd7fec5106205240332bd3b7fd2f93d4d9d4c, a year later.
So we can assume that if the feature flag is set, the other string values are
supported too. The comment that there's no way check that was added later in
5b45fad4fcfa2dd81f25b13fe8d7717f62fa5843, but it was incorrect even at that
time.

Fixes https://github.com/systemd/systemd/issues/39167. As described in the
issue, we documented various string values in the BLI, but bootctl didn't use
the string values. At the time menu-force and menu-hidden were added, using
numerical values for compatibility made sense. But that stopped being needed
when a string value that didn't have a strictly equivalent numerical value and
a feature flag were added.

When converting a large number to menu-force, message is downgraded to debug,
since the severity of the issue is very minor. Debug messages are added in
other places when the requested setting is modified too.

3 months agocalendarspec: day of month also needs to be reset when year is changed
Yu Watanabe [Sun, 4 Jan 2026 00:37:46 +0000 (09:37 +0900)] 
calendarspec: day of month also needs to be reset when year is changed

Fixes #40260.

3 months agoswitch-root: don't do rm_rf() of old superblock on switch root if pivot_root() worked
Lennart Poettering [Fri, 2 Jan 2026 15:30:58 +0000 (16:30 +0100)] 
switch-root: don't do rm_rf() of old superblock on switch root if pivot_root() worked

We do the rm_rf_children() call only because in some cases we cannot
pivot_root() and hence the orginal root superblock stays pinned, and we
thus have to empty it to minimize its memory use. But if pivot_root()
worked (and the umount() for the old root), then there's really no need
to do this work.

Dropping this codepath is useful in context of Christian's recent work
to make the original initrd tmpfs unmountable, which means pivot_root()
will work, and thus there's no need to empty the tmpfs anymore, and we
can speed up boot a bit.

Fixes: #40250
3 months agoanalyze: properly handle nvpcrs that have not been initialized yet
Lennart Poettering [Wed, 24 Dec 2025 07:37:22 +0000 (08:37 +0100)] 
analyze: properly handle nvpcrs that have not been initialized yet

Let's explicitly check if NvPCRs are fully set up (allocated, anchored)
before we try to show them.

Alternative to: #40184

3 months agocore/dynamic-user: two trivial modernizations (#40264)
Yu Watanabe [Sat, 3 Jan 2026 22:26:19 +0000 (07:26 +0900)] 
core/dynamic-user: two trivial modernizations (#40264)

3 months agoquirks: touchpad: Set Duet 3 bt touchpad internal
David Santamaría Rogado [Sat, 3 Jan 2026 20:52:38 +0000 (21:52 +0100)] 
quirks: touchpad: Set Duet 3 bt touchpad internal

The touchpad is in a keyboard and touchpad combo that can be attached and
detached in a convertible device.

3 months agocore/dynamic-user: use fd_verify_linked() 40264/head
Mike Yuan [Sat, 3 Jan 2026 19:25:53 +0000 (20:25 +0100)] 
core/dynamic-user: use fd_verify_linked()

3 months agorepart: Don't silence mkfs.erofs if on a tty
DaanDeMeyer [Sat, 3 Jan 2026 12:11:38 +0000 (13:11 +0100)] 
repart: Don't silence mkfs.erofs if on a tty

mkfs.erofs is only sometimes verbose when not on a TTY, so let's not
silence it if we're on a TTY.

3 months agomkfs-util: Add one more log message
DaanDeMeyer [Sat, 3 Jan 2026 12:00:43 +0000 (13:00 +0100)] 
mkfs-util: Add one more log message

Formatting a filesystem might take a long time, so let's also log a
message when we start formatting it.

3 months agocore/dynamic-user: flock() does not return EBUSY
Mike Yuan [Sat, 3 Jan 2026 19:26:27 +0000 (20:26 +0100)] 
core/dynamic-user: flock() does not return EBUSY

3 months agoelf-util: fix alignment
Mike Yuan [Sat, 3 Jan 2026 19:08:12 +0000 (20:08 +0100)] 
elf-util: fix alignment

3 months agocore: do not provide non-dynamic user through DBus/Varlink
Yu Watanabe [Sat, 3 Jan 2026 03:46:56 +0000 (12:46 +0900)] 
core: do not provide non-dynamic user through DBus/Varlink

With a service with DynamicUser= with static user or group, e.g.,
```
$ systemd-run -p DynamicUser=yes -p Group=disk sleep infinity
```
previously the lookup by name and ID through DBus/Varlink are inconsistent:
```
$ busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager LookupDynamicUserByUID "u" 6
Call failed: Dynamic user ID 6 does not exist.

$ busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager LookupDynamicUserByName "s" disk
u 6

$ userdbctl group 6
  Group name: disk
 Disposition: system
         GID: 6
   Passwords: 1
     Service: io.systemd.NameServiceSwitch

$ userdbctl group disk
  Group name: disk
 Disposition: dynamic
         GID: 6
 Description: Dynamic Group
     Service: io.systemd.DynamicUser
```

With this change, the results of these methods are consistent.

Fixes #40228.

3 months agoclang-tidy: Enable more warnings (#39910)
Yu Watanabe [Fri, 2 Jan 2026 21:00:30 +0000 (06:00 +0900)] 
clang-tidy: Enable more warnings (#39910)

3 months agotree-wide: Migrate to pidref_safe_fork() (#40170)
Daan De Meyer [Fri, 2 Jan 2026 20:12:31 +0000 (21:12 +0100)] 
tree-wide: Migrate to pidref_safe_fork() (#40170)

3 months agosystemctl-preset-all: do not return 0 if unit_file_preset_all() fails
Antonio Alvarez Feijoo [Fri, 2 Jan 2026 14:20:20 +0000 (15:20 +0100)] 
systemctl-preset-all: do not return 0 if unit_file_preset_all() fails

Follow-up for ae9ff778cd141f9d24dd4743489b7e1000f22347

3 months agoman/systemctl: fix typo
Ulrich Ölmann [Fri, 2 Jan 2026 14:50:19 +0000 (15:50 +0100)] 
man/systemctl: fix typo

3 months agotree-wide: Migrate to pidref_safe_fork() 40170/head
Daan De Meyer [Sat, 20 Dec 2025 13:33:35 +0000 (14:33 +0100)] 
tree-wide: Migrate to pidref_safe_fork()

Let's migrate all remaining callers of safe_fork()
to pidref_safe_fork() and get rid of safe_fork().

3 months agoprocess-util: Use ret as output parameter name
Daan De Meyer [Sat, 20 Dec 2025 09:48:41 +0000 (10:48 +0100)] 
process-util: Use ret as output parameter name

There's only one output parameter for all these
functions, so let's just name it ret following the
coding style.

3 months agopull-tar: Insist on foreign UID when copying
DaanDeMeyer [Fri, 26 Dec 2025 20:58:04 +0000 (21:58 +0100)] 
pull-tar: Insist on foreign UID when copying

If we're doing foreign UID range copying, we're going to be joining
a private user namespace before doing the copy. copy_tree() insists
on keeping all UIDs/GIDs the same when copying. Hence, all the
UIDs/GIDs of the files we're copying should be in the private UID
range, which means they need to be owned by the foreign UID range
and we always need to call mountfsd_mount_directory_fd(). So there's
no point in having a fallback path if the source directory is not
foreign UID range owned, we'd simply fail to copy it later. Hence,
insist on the source directory being foreign UID range owned.

3 months agoupdate TODO
Lennart Poettering [Fri, 2 Jan 2026 10:20:12 +0000 (11:20 +0100)] 
update TODO

3 months agoclang-tidy: Enable more warnings 39910/head
Daan De Meyer [Fri, 21 Nov 2025 08:26:32 +0000 (09:26 +0100)] 
clang-tidy: Enable more warnings

3 months agolinter: Remove unneeded meson options
Daan De Meyer [Sun, 14 Dec 2025 15:48:25 +0000 (16:48 +0100)] 
linter: Remove unneeded meson options

Now that clang-tidy passes regardless of whether
these options are enabled or not, let's stop
configuring them explicitly

3 months agoci: Add coverage for -Dcompat-mutable-uid-boundaries=true
Daan De Meyer [Mon, 15 Dec 2025 08:30:44 +0000 (09:30 +0100)] 
ci: Add coverage for -Dcompat-mutable-uid-boundaries=true

3 months agolocale: Gate conditional includes behind ifdef
Daan De Meyer [Sun, 14 Dec 2025 15:46:09 +0000 (16:46 +0100)] 
locale: Gate conditional includes behind ifdef

Let's make sure clang-tidy doesn't complain on
distributions without locale-gen.

3 months agobasic: Gate conditional includes behind ifdef
Daan De Meyer [Sun, 14 Dec 2025 15:44:48 +0000 (16:44 +0100)] 
basic: Gate conditional includes behind ifdef

3 months agolibudev: Fix declaration argument names
Daan De Meyer [Sun, 14 Dec 2025 15:39:49 +0000 (16:39 +0100)] 
libudev: Fix declaration argument names

Make sure these match the definition argument names.

3 months agosd-netlink: Use same argument name for rtnl definitions
Daan De Meyer [Sun, 14 Dec 2025 15:07:58 +0000 (16:07 +0100)] 
sd-netlink: Use same argument name for rtnl definitions

We already have the same argument name as used in the
declarations available, let's use it so the declarations
and definitions match.

3 months agosd-json: Fix sd_json_variant_type_to_string parameter name
Daan De Meyer [Sun, 14 Dec 2025 15:04:57 +0000 (16:04 +0100)] 
sd-json: Fix sd_json_variant_type_to_string parameter name

The definition will use i because of the macro, so
let's use i in the declaration as well. We can't
use DECLARE_STRING_TABLE_LOOKUP_TO_STRING() because
sd-json.h is a libsystemd public header.

3 months agosystemctl-daemon-reload: Add missing parameter name
Daan De Meyer [Sun, 14 Dec 2025 14:48:18 +0000 (15:48 +0100)] 
systemctl-daemon-reload: Add missing parameter name

3 months agoclang-tidy: Block system headers with errors
Daan De Meyer [Wed, 26 Nov 2025 14:52:46 +0000 (15:52 +0100)] 
clang-tidy: Block system headers with errors

blkid.h and gmessages.h both use const for arguments that are passed
by value, which is pointless and triggers clang-tidy warnings, so exclude
them from processing.

3 months agotree-wide: Various coding style cleanups
Daan De Meyer [Wed, 26 Nov 2025 14:21:09 +0000 (15:21 +0100)] 
tree-wide: Various coding style cleanups

3 months agosd-journal: Fix return value coding style
Daan De Meyer [Wed, 26 Nov 2025 10:56:11 +0000 (11:56 +0100)] 
sd-journal: Fix return value coding style

Let's always use ret, ret_data and ret_size for output arguments.

size is better than length in this case because we're dealing with
arbitrary, possibly binary, data and not strings.

3 months agosd-journal: Remove const from function parameter
Daan De Meyer [Mon, 15 Dec 2025 08:08:00 +0000 (09:08 +0100)] 
sd-journal: Remove const from function parameter

boot_id is already passed by value, and hence copied.
Since we don't apply const to function parameters
that are copied anywhere else, let's drop the const
here as well for consistency.

3 months agotree-wide: Drop NOLINTNEXTLINE comments
DaanDeMeyer [Thu, 1 Jan 2026 20:01:39 +0000 (21:01 +0100)] 
tree-wide: Drop NOLINTNEXTLINE comments

Not needed anymore after recent refactoring.

3 months agotree-wide: Use pamh as pam_handle_t parameter name
Daan De Meyer [Fri, 19 Dec 2025 18:43:21 +0000 (19:43 +0100)] 
tree-wide: Use pamh as pam_handle_t parameter name

libpam uses pamh in its function declarations for
the plugin API so let's use the same name in our
tree as well.

Making sure the plugin function definitions match
the plugin function declarations is required to
enable clang-tidy's
readability-inconsistent-declaration-parameter-name
check, but to keep things consistent everywhere we
opt to use pamh tree-wide.

3 months agotools: drop unnecessary sys/capability.h header
Yu Watanabe [Thu, 1 Jan 2026 21:20:17 +0000 (06:20 +0900)] 
tools: drop unnecessary sys/capability.h header

After 9b414a38fadb41c9ea056ed5d284ab5098251a37 (#39425), the header is
not required. And after b295c166f94526aae830893612a1584840f2f087, the
header is not installed in CI environments.

3 months agotools: show each command to make it easier to debug
Yu Watanabe [Thu, 1 Jan 2026 21:09:39 +0000 (06:09 +0900)] 
tools: show each command to make it easier to debug

3 months agotools: allow to run setup-musl-build.sh for already set up directory
Yu Watanabe [Thu, 1 Jan 2026 21:03:27 +0000 (06:03 +0900)] 
tools: allow to run setup-musl-build.sh for already set up directory

3 months agoRequire libxcrypt >= 4.4.0 and drop libcrypt support (#38974)
Yu Watanabe [Fri, 2 Jan 2026 05:32:12 +0000 (14:32 +0900)] 
Require libxcrypt >= 4.4.0 and drop libcrypt support (#38974)

This drops support of libcrypt provided by glibc, and always use
libxcrypt.
This also makes libxcrypt dlopen() dependency.

3 months agolibcrypt-util: turn into dlopen() dependency 38974/head
Yu Watanabe [Sat, 25 Oct 2025 04:41:33 +0000 (13:41 +0900)] 
libcrypt-util: turn into dlopen() dependency

Note, this drops logging only test case for crypt_preferred_method(),
as that requires explicitly dlopen() the library. But, we should test
that make_salt() and friends automatically dlopen() it.

3 months agolibcrypt: allow to build systemd without libcrypt/libxcrypt
Yu Watanabe [Sat, 25 Oct 2025 05:59:54 +0000 (14:59 +0900)] 
libcrypt: allow to build systemd without libcrypt/libxcrypt

libcrypt is only used by firstboot, homed, and sysusers, which can be
disabled by meson option.
Let's not require the library unconditionally.

3 months agoRequire libxcrypt-4.4.0 or newer and drop support of libcrypt
Yu Watanabe [Sun, 17 Aug 2025 14:03:44 +0000 (23:03 +0900)] 
Require libxcrypt-4.4.0 or newer and drop support of libcrypt

libcrypt was no longer built by default since glibc-2.38, and it has been
completely removed since glibc-2.39.

Let's always use libxcrypt, unless when building with musl. As already
major distribution already have libxcrypt-4.4.x, hence let's also bump
the required minimum version to 4.4.0.

libxcrypt cannot be built with musl, hence the previous fallback logic
in libcrypt-util.c are moved to musl/crypt.c.

Note, libxcrypt-4.4.0 was released on 2018-11-20.
See also #38608.

3 months agoBump required minimum version of libseccomp to 2.4.0
Yu Watanabe [Sun, 17 Aug 2025 15:58:56 +0000 (00:58 +0900)] 
Bump required minimum version of libseccomp to 2.4.0

Major distributions already have libseccomp 2.5.x or newer.
Let's bump to the required minimum version to 2.4.0, which provides
SCMP_ACT_KILL_PROCESS, SCMP_ACT_LOG, SCMP_ARCH_PARISC, and
SCMP_ARCH_PARISC64.

Note, libseccomp 2.4.0 was released on 2019-03-15.

See also #38608.

3 months agotest-libcrypt-util: use DEFINE_TEST_MAIN() and ASSERT_XYZ()
Yu Watanabe [Sun, 17 Aug 2025 15:13:27 +0000 (00:13 +0900)] 
test-libcrypt-util: use DEFINE_TEST_MAIN() and ASSERT_XYZ()

Also, tests for make_salt() in test-user-util.c are moved to
test-libcrypt-util.c.

3 months agolibcrypt-util: add missing assertions
Yu Watanabe [Tue, 18 Nov 2025 01:28:50 +0000 (10:28 +0900)] 
libcrypt-util: add missing assertions

3 months agolibcrypt-util: drop unused hash_passwrod_full()
Yu Watanabe [Tue, 18 Nov 2025 00:52:37 +0000 (09:52 +0900)] 
libcrypt-util: drop unused hash_passwrod_full()

It is only used by test cases. Not necessary to keep it.

3 months agolibcrypt-util: move looks_like_hashed_password()
Yu Watanabe [Tue, 18 Nov 2025 00:27:14 +0000 (09:27 +0900)] 
libcrypt-util: move looks_like_hashed_password()

No functional change, just preparation for later change.

3 months agoBump required minimum version of cryptsetup to 2.4.0
Yu Watanabe [Sun, 17 Aug 2025 12:22:16 +0000 (21:22 +0900)] 
Bump required minimum version of cryptsetup to 2.4.0

Major distributions already have cryptsetup newer than 2.4.0.
Let's bump the minimal required version.

Note, cryptsetup 2.4.0 was released on 2021-08-18.

See also #38608.

3 months agoBump required minimum version of elfutils to 0.177
Yu Watanabe [Sun, 17 Aug 2025 13:19:50 +0000 (22:19 +0900)] 
Bump required minimum version of elfutils to 0.177

Major distributions already have elfutils >= 0.190.
Let's bump the required minimum version.

Note, elfutils 0.177 was released on 2019-08-14.

See also #38608.

3 months agoBump required minimum version of blkid to 2.37
Yu Watanabe [Sun, 17 Aug 2025 13:05:53 +0000 (22:05 +0900)] 
Bump required minimum version of blkid to 2.37

Major distributions already have blkid >= 2.37.
Let's bump the minimal required version.

Note, util-linux (which provides blkid) 2.37 was released on 2021-06-01.

See also #38608.

3 months agoBump required minimum version of OpenSSL to 3.0.0
Yu Watanabe [Sun, 17 Aug 2025 12:41:22 +0000 (21:41 +0900)] 
Bump required minimum version of OpenSSL to 3.0.0

All major distributions have switched to OpenSSL version 3.x.
Let's drop support of OpenSSL version 1.x.

Note, OpenSSL 3.0 was released on 2021-09-07 (and will be EOL on 2026-09-07).

See also #38608.

3 months agoman: drop redundant 'and'
Yu Watanabe [Fri, 2 Jan 2026 00:52:28 +0000 (09:52 +0900)] 
man: drop redundant 'and'

Also swap the order of entries, to make it consistent for other unit
types.

Follow-up for 79dd24cf14adc809620479d45a7b469cf3e82892.

3 months agoEnable systemd-coredump for offline updates
Adam Williamson [Mon, 17 Nov 2025 22:35:11 +0000 (14:35 -0800)] 
Enable systemd-coredump for offline updates

If a crash occurs during an offline update, we do not get a
coredump, because systemd-coredump is not enabled. This of course
complicates debugging.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
3 months agonetwork: Support interface-bound ECMP routes in MultiPathRoute= (#39742)
Yu Watanabe [Fri, 2 Jan 2026 00:25:43 +0000 (09:25 +0900)] 
network: Support interface-bound ECMP routes in MultiPathRoute= (#39742)

MultiPathRoute= can now specify device-only nexthops without a gateway
address, e.g. MultiPathRoute=@wg0. This enables ECMP configurations over
interfaces that don't use gateway addresses, such as WireGuard tunnels.

The syntax is extended from "address[@device] [weight]" to
"[address]@device [weight]". The address is now optional, but at least
one of gateway or device must be specified. The @ symbol must still be
present for device-only routes, making the syntax unambiguous: @wg0
specifies a device, while a bare IP address specifies a gateway.

Device-only nexthops are only available for IPv4 routes. Device-only
multipath routes for IPv6 are not supported by the kernel's netlink
interface and will be rejected with a warning.

This change is fully backwards compatible. All existing configurations
continue to work unchanged, as they always included a gateway address.

Closes #39699.

3 months agovmspawn: Add --user/--system and support user session machined registration
Daan De Meyer [Mon, 22 Dec 2025 14:11:18 +0000 (15:11 +0100)] 
vmspawn: Add --user/--system and support user session machined registration

The UX of registering with the user session machined
instance is much better as there won't be an authorization
prompt. To make that available for users, let's add --user
and --system switches for vmspawn. For backwards compat, we'll
still try to register with the system machined instance if the
user machined instance is not available.

3 months agodocs: update password agent document (#40235)
Yu Watanabe [Thu, 1 Jan 2026 23:03:37 +0000 (08:03 +0900)] 
docs: update password agent document (#40235)

Adding some missing information from the code to the docs.

3 months agoudev,sysupdated: fix pidfd leak
Mike Yuan [Thu, 1 Jan 2026 19:10:45 +0000 (20:10 +0100)] 
udev,sysupdated: fix pidfd leak

Follow-up for 179dcf924f7d0ac9398f54baeb39b47abd23aeaf

After the mentioned commit, event_add_child_pidref() duplicates
the pidfd internally, hence the original pidfd would be leaked
with TAKE_PIDREF.

3 months agounit-def: Clean up whitespace
DaanDeMeyer [Thu, 1 Jan 2026 19:38:25 +0000 (20:38 +0100)] 
unit-def: Clean up whitespace

3 months agoopenssl-util: Make ret_user_interface required output argument
DaanDeMeyer [Thu, 25 Dec 2025 18:24:17 +0000 (19:24 +0100)] 
openssl-util: Make ret_user_interface required output argument

To avoid the argument accidentally not getting passed anymore during
refactoring, let's make it a required output argument so that callers
are required to provide it.

See 11f47cb70014894a9f09c730ee7aedcac89cf73e and
875b568f56e3a8a23edd9f20463c9019ec098900.

3 months agodissect-image: fix typo
Yu Watanabe [Thu, 1 Jan 2026 19:32:44 +0000 (04:32 +0900)] 
dissect-image: fix typo

Follow-up for 771085291dab707b2c7502420b81f7890aa61213.

3 months agossh-proxy: fix typo
Yu Watanabe [Thu, 1 Jan 2026 19:30:55 +0000 (04:30 +0900)] 
ssh-proxy: fix typo

Follow-up for dc3e544104218052664e2c6b08d1ae397e9a4faf.

3 months agocore/dynamic-user: drop unused /run/systemd/dynamic-uid/direct: kludge
Mike Yuan [Wed, 31 Dec 2025 20:22:46 +0000 (21:22 +0100)] 
core/dynamic-user: drop unused /run/systemd/dynamic-uid/direct: kludge

Follow-up for 1684c56f40f020e685e70b3d1785d596ff16f892
This effectively reverts fd63e712b2025d235ce4bfbb512fada10e2690b5

This was originally introduced to resolve deadlock caused by
dbus broker calling into nss-systemd which in turn goes via
dbus for user lookup. This is now handled differently and
the interface has been sitting unused for half a decade now.
Kill it.

3 months agostring-table: Introduce DECLARE_STRING_TABLE_LOOKUP() and friends
Daan De Meyer [Fri, 12 Dec 2025 16:06:38 +0000 (17:06 +0100)] 
string-table: Introduce DECLARE_STRING_TABLE_LOOKUP() and friends

Let's introduce these for the following two reasons:
- Using them makes sure the parameter names match between declaration
  and definition (if both use the corresponding macros).
- They make sure developers can't forget the _const_ and _pure_
  attributes for the declarations.

This commit also includes some include sorting fixes

3 months agotree-wide: Introduce DECLARE_TRIVIAL_REF_UNREF_FUNC() and friends
Daan De Meyer [Sun, 14 Dec 2025 15:40:20 +0000 (16:40 +0100)] 
tree-wide: Introduce DECLARE_TRIVIAL_REF_UNREF_FUNC() and friends

3 months agoquirks: Re-add D330 accel_matrix as identity one (#40226)
David Santamaría Rogado [Thu, 1 Jan 2026 18:52:56 +0000 (19:52 +0100)] 
quirks: Re-add D330 accel_matrix as identity one (#40226)

When testing to correct accelerometer values I set locally the identity
matrix to override the quirk. The values were fine but removing all the
matrices give incorrect values.

The mistake was thinking that identity matrix is the default one when no
quirks are set. It is, but only when the ACPI doesn't have another one.

Set identity matrix for this device to correct accelerometer values.

Follow-up for a07b184e8ccbecafc1fce5a0cfffe87c6a497134.

3 months agoquirks: sensor: add info about ACPI accel_matrix
David Santamaría Rogado [Tue, 30 Dec 2025 00:24:38 +0000 (01:24 +0100)] 
quirks: sensor: add info about ACPI accel_matrix

Just inform about if an ACPI accel matrix exists, is the default one instead
the indentity matrix.

3 months agoudev/scsi_id: increase MAX_SERIAL_LEN from 256 to 512
tuhaowen [Wed, 31 Dec 2025 02:46:30 +0000 (10:46 +0800)] 
udev/scsi_id: increase MAX_SERIAL_LEN from 256 to 512

The current MAX_SERIAL_LEN value of 256 is insufficient for some SCSI
devices with non-standard serial number lengths. In do_scsi_page80_inquiry(),
the required buffer length is calculated as:

    len = 1 + VENDOR_LENGTH + MODEL_LENGTH + buf[3]
        = 1 + 8 + 16 + buf[3]
        = 25 + buf[3]

where buf[3] contains the serial number length reported by the device.
According to the SCSI specification, this field is an unsigned 8-bit
value, meaning it can theoretically be up to 255 bytes. This results
in a maximum required length of 280 bytes, exceeding the current limit
of 256 bytes.

When this occurs, scsi_id fails with an error message like:
    "length 256 too short - need 280"

This has been observed with certain vendor devices that report unusually
long serial numbers in VPD page 0x80.

Increase MAX_SERIAL_LEN to 512 to accommodate the maximum possible
serial number length plus all required prefixes (vendor, model, and
type identifiers), providing sufficient headroom for non-compliant
devices while maintaining reasonable memory usage.

Signed-off-by: tuhaowen <tuhaowen@uniontech.com>
3 months agobuild(deps): bump meson from 1.9.1 to 1.10.0 in /.github/workflows
dependabot[bot] [Thu, 1 Jan 2026 09:01:21 +0000 (09:01 +0000)] 
build(deps): bump meson from 1.9.1 to 1.10.0 in /.github/workflows

Bumps [meson](https://github.com/mesonbuild/meson) from 1.9.1 to 1.10.0.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/1.9.1...1.10.0)

---
updated-dependencies:
- dependency-name: meson
  dependency-version: 1.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
3 months agobuild(deps): bump actions/labeler from 5.0.0 to 6.0.1
dependabot[bot] [Thu, 1 Jan 2026 09:01:00 +0000 (09:01 +0000)] 
build(deps): bump actions/labeler from 5.0.0 to 6.0.1

Bumps [actions/labeler](https://github.com/actions/labeler) from 5.0.0 to 6.0.1.
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/8558fd74291d67161a8a78ce36a881fa63b766a9...634933edcd8ababfe52f92936142cc22ac488b1b)

---
updated-dependencies:
- dependency-name: actions/labeler
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
3 months agobuild(deps): bump redhat-plumbers-in-action/gather-pull-request-metadata
dependabot[bot] [Thu, 1 Jan 2026 09:01:04 +0000 (09:01 +0000)] 
build(deps): bump redhat-plumbers-in-action/gather-pull-request-metadata

Bumps [redhat-plumbers-in-action/gather-pull-request-metadata](https://github.com/redhat-plumbers-in-action/gather-pull-request-metadata) from 1.8.0 to 1.8.1.
- [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/5da2967931dd7c4b9ccd22f49b045e2c1f05165b...b3dbc3f843e8343dbcb2af5bffba72c974d3a07a)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/gather-pull-request-metadata
  dependency-version: 1.8.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 months agocore/transaction: when isolating, keep triggered units only if their triggers are... 40140/head
Franck Bui [Wed, 26 Nov 2025 10:38:34 +0000 (11:38 +0100)] 
core/transaction: when isolating, keep triggered units only if their triggers are actually active

Follow-up for 32d6707dd1692d41e12f5469dfdcbc10f14d6619.

Co-authored-by: Mike Yuan <me@yhndnzj.com>
3 months agocore/unit: do not check for unreachable job type
Mike Yuan [Thu, 18 Dec 2025 19:12:16 +0000 (20:12 +0100)] 
core/unit: do not check for unreachable job type

Refer to 7cb0030f6cec6c0a83c7c11ecc4adfb55aaf0e0b for the rationale.

3 months agocore/exec-invoke: use RET_NERRNO to avoid clobbering errno
Mike Yuan [Wed, 31 Dec 2025 18:21:13 +0000 (19:21 +0100)] 
core/exec-invoke: use RET_NERRNO to avoid clobbering errno

Follow-up for 72ce1046e8aa872af8edcfba407e6f0489662fda

string_table_lookup_to_string_fallback() might interfere
with errno, hence store it in r first.

3 months agodocs/PASSWORD_AGENTS: document the `AcceptCached=` field 40235/head
Ben Boeckel [Wed, 31 Dec 2025 15:59:41 +0000 (10:59 -0500)] 
docs/PASSWORD_AGENTS: document the `AcceptCached=` field

3 months agodocs/PASSWORD_AGENTS: document the `Silent=` field
Ben Boeckel [Wed, 31 Dec 2025 15:59:25 +0000 (10:59 -0500)] 
docs/PASSWORD_AGENTS: document the `Silent=` field

3 months agodocs/PASSWORD_AGENTS: clarify that `Echo=0` may obscure
Ben Boeckel [Wed, 31 Dec 2025 15:58:53 +0000 (10:58 -0500)] 
docs/PASSWORD_AGENTS: clarify that `Echo=0` may obscure