Commit Graph
85602 Commits
Author SHA1 Message Date
francescoza6 fcc6b29921 hwdb: add matrix for ASUS 2-in-1 T101HA
The matrix tested working in monitor-sensor (06 gen 2026),
corrects accel values and not just display output.
2026-01-07 01:10:42 +09:00
Derek J. Clark 9573ad4e76 hwdb: Add missing vendor names for older AYANEO devices
Adds AYADEVICE and AYA NEO vendor names. Early founders editon and 2021 models used these DMI values instead of AYANEO
2026-01-06 13:49:40 +09:00
Derek J. Clark 8ea31c2307 hwdb: Add missing scancodes for Lenovo Legion devices
Adds missing scancodes for Lenovo Legion Go, Go S, and Go 2. When long
pressing the power button the device should issue a LEFTMETA + F16
combo. The LEFTMETA code fires properly, but the F16 is not mapped.

Go and Go S devices detect as AT Translated Set 2 Keyboard, while Go 2
detects as AT Raw Set 2 Keyboard, hence the multiple entries.

Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
2026-01-06 12:33:28 +09:00
Alexis-Emmanuel Haeringer adfa4b6b74 man/kernel-install: /proc/cmdline is not used as a fallback in container 2026-01-06 08:49:32 +09:00
Yu Watanabe 9bad7610f8 man: fix typo 2026-01-06 08:48:05 +09:00
Yu Watanabe 423ba555ac pstore: fix typo 2026-01-06 08:45:22 +09:00
Yu Watanabe 776c3d7f90 import: update comment: implementor -> implementer
Both implementor and implementer are correct, but we use implementer at
other places.
2026-01-06 08:43:05 +09:00
Tobias Stoeckmann a6ef858850 sysusers: document u! version support
Document at which version the exclamation mark suffix is supported.
Version 215 at the end of the list item is a bit misleading.
2026-01-06 07:21:37 +09:00
Zbigniew Jędrzejewski-Szmek 4a74a48c23 NEWS: fix typo 2026-01-05 22:15:29 +01:00
Yu Watanabe fc48bf0c6b TEST-13-NSPAWN: remove pulled image on exit
Otherwise, if the VM is unexpectedly rebooted, then `importctl --user pull-tar`
may fail as the file may already exist.
```
[  123.351751] TEST-13-NSPAWN.sh[3946]: + run0 -u testuser importctl --user pull-tar file:///var/tmp/image-tar/kurps.tar.gz nurps --verify=checksum -m
[  123.541603] TEST-13-NSPAWN.sh[4311]: Enqueued transfer job 3. Press C-c to continue download in background.
[  123.552456] TEST-13-NSPAWN.sh[4311]: Pulling 'file:///var/tmp/image-tar/kurps.tar.gz', saving as 'nurps'.
[  123.552788] TEST-13-NSPAWN.sh[4311]: Operating on image directory '/home/testuser/.local/state/machines'.
[  123.819942] TEST-13-NSPAWN.sh[4311]: Got 1% of file:///var/tmp/image-tar/kurps.tar.gz.
[  124.156557] TEST-13-NSPAWN.sh[4311]: * shutting down connection #0
[  124.156896] TEST-13-NSPAWN.sh[4311]: * Could not open file /var/tmp/image-tar/kurps.tar.gz.sha256
[  124.157223] TEST-13-NSPAWN.sh[4311]: * closing connection #-1
[  124.159198] TEST-13-NSPAWN.sh[4311]: * Could not open file /var/tmp/image-tar/kurps.nspawn
[  124.159493] TEST-13-NSPAWN.sh[4311]: * closing connection #-1
[  124.159818] TEST-13-NSPAWN.sh[4311]: Acquired 68.5M.
[  124.160395] TEST-13-NSPAWN.sh[4311]: Download of file:///var/tmp/image-tar/kurps.tar.gz complete.
[  124.160664] TEST-13-NSPAWN.sh[4311]: Transfer failed: Could not read a file:// file
[  124.160923] TEST-13-NSPAWN.sh[4311]: Settings file could not be retrieved, proceeding without.
[  124.404733] TEST-13-NSPAWN.sh[4311]: * shutting down connection #1
[  124.405162] TEST-13-NSPAWN.sh[4311]: Acquired 79B.
[  124.406170] TEST-13-NSPAWN.sh[4311]: Download of file:///var/tmp/image-tar/SHA256SUMS complete.
[  124.406734] TEST-13-NSPAWN.sh[4311]: SHA256 checksum of file:///var/tmp/image-tar/kurps.tar.gz is valid.
[  124.455446] TEST-13-NSPAWN.sh[4311]: Failed to rename to final image name to /home/testuser/.local/state/machines/.tar-file:\x2f\x2f\x2fvar\x2ftmp\x2fimage-tar\x2fkurps\x2etar\x2egz: File exists
[  124.457251] TEST-13-NSPAWN.sh[4311]: Exiting.
```
Workaround for issue #38240.
2026-01-06 04:54:48 +09:00
Nick Rosbrook 0eaddf8c82 mkosi: stop using noble-proposed for qemu
The qemu update migrated to noble-updates a couple weeks ago, so it is
no longer necessary to enable noble-proposed (or add the associated apt
pinning config).
2026-01-06 04:47:27 +09:00
Cathy Hu 57202fd181 journal-remote test: add -Z in mkdir for journal-{remote,upload}.conf.d
Otherwise on SELinux enabled systems with the "targeted" policy
the type is not set correctly when run via unconfined user and
the test fails.
2026-01-06 04:46:34 +09:00
Nick Rosbrook 75890d949f ukify: omit .osrel section when --os-release= is empty
The primary motivation for this is to allow users of ukify to build
UKI-like objects, without having them later be detected as a UKI by
tools like kernel-install and bootctl.

The common code used by these tools to determine if a PE binary is a UKI
checks that both .osrel and .linux sections are present. Hence, adding
a mechansim to skip .osrel provides a way to avoid being labeled a UKI.
2026-01-06 04:44:43 +09:00
Pablo Fraile Alonso fd8d4026d4 shared/edit-util: ignore ENOTDIR when trying editors 2026-01-05 22:22:11 +09:00
Yu Watanabe 76ed202b7f compress: do not call lzma_end_wrapper() when failed to load liblzma
Fixes a bug in 3fc72d5413 (v256).
Fixes #40277.
2026-01-05 21:30:27 +09:00
Mike Yuan 429cbac508 idn: drop support for libidn
The current tree doesn't even compile with libidn(1) after
2c7bdaf9f1, which included
a non-existent call to check_dlopen_blocked() somehow.
Hence, it feels safe to just nuke legacy support from
our repo.
2026-01-05 21:29:52 +09:00
Yu Watanabe 47d70d3a1b 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
```
2026-01-05 17:48:36 +09:00
Yu Watanabe f056560da7 meson: remove deprecated meson options
These options are deprecated since
- 87541e254f : -Dcryptolib=
- 710653d3bc : -Dintegration-tests=
2026-01-05 08:26:07 +09:00
Yu Watanabe 615dfad334 mkosi: update debian commit reference to f05328feafba2156f31e17e0e2c144cfa7c66e72
* f05328feaf Drop use of deprecated options
* 19ed139d85 Mark sd-userdbd as Multi-Arch: foreign
2026-01-05 08:26:07 +09:00
Kai Lueke fd8a1deb0b 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.
2026-01-05 06:53:50 +09:00
Yu Watanabe 2c751f3420 Tweak setting of boot timeout variables (#40125) 2026-01-05 06:50:49 +09:00
Yu Watanabe 3a1231f4c7 core: several follow-ups (#40140)
Replaces #39925
Closes #39925
2026-01-05 06:31:48 +09:00
Mike Yuan 75f04abf16 core: move several checks from _start() to _test_startable() where appropriate
If these basic sanity checks fail, there's no point in
bumping ratelimit.
2026-01-05 06:11:26 +09:00
Lucas Werkmeister f8e1a7a66e 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.
2026-01-05 03:20:26 +09:00
Yu Watanabe 4b23f4f4c2 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
```
2026-01-05 03:12:26 +09:00
Zbigniew Jędrzejewski-Szmek 8a27100d06 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
ad5fdd3912: when enabling the unit through
'preset' or 'preset-all', print the message, but suppress the error. When
enabling through 'enable', fail the operation.
2026-01-05 03:06:37 +09:00
Yu Watanabe c1f873b4f4 Logging cleanups (#40271) 2026-01-05 03:06:09 +09:00
Tobias Stoeckmann 2eaca3ea5f 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.
2026-01-04 18:01:36 +01:00
Tobias Stoeckmann 57682793da 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.
2026-01-04 18:01:36 +01:00
Tobias Stoeckmann 239903d44c 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).
2026-01-04 18:01:13 +01:00
Zbigniew Jędrzejewski-Szmek 4a4be1015b 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.
2026-01-04 14:07:57 +01:00
Zbigniew Jędrzejewski-Szmek 22aa8c4879 basic/process-util: reduce scope of variables 2026-01-04 14:07:57 +01:00
Zbigniew Jędrzejewski-Szmek 1ee73c884e basic/process-util: use synthetic errno in two more places 2026-01-04 14:07:57 +01:00
Zbigniew Jędrzejewski-Szmek b30f77cd12 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.
2026-01-04 14:07:57 +01:00
Zbigniew Jędrzejewski-Szmek 1d26e7c1d5 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.
2026-01-04 13:58:37 +01:00
Zbigniew Jędrzejewski-Szmek abd17aa3f4 bootctl: rework setting of menu timeout variables
menu-force and menu-hidden were added in 97f077df05,
menu-disable was added in 6efdd7fec5, 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
5b45fad4fc, 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.
2026-01-04 13:55:44 +01:00
Yu Watanabe cf79f61238 calendarspec: day of month also needs to be reset when year is changed
Fixes #40260.
2026-01-04 20:05:43 +09:00
Lennart Poettering 82dea1c925 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
2026-01-04 19:41:24 +09:00
Lennart Poettering 855b4cd731 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
2026-01-04 18:57:50 +09:00
Yu Watanabe e67ad3e586 core/dynamic-user: two trivial modernizations (#40264) 2026-01-04 07:26:19 +09:00
David Santamaría Rogado 3ae637c42a 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.
2026-01-04 06:10:45 +09:00
Mike Yuan 252b40c449 core/dynamic-user: use fd_verify_linked() 2026-01-03 21:25:02 +01:00
DaanDeMeyer 4d6274a6f4 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.
2026-01-04 05:17:19 +09:00
DaanDeMeyer c8911b745c 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.
2026-01-04 05:17:19 +09:00
Mike Yuan 776dc1b9d5 core/dynamic-user: flock() does not return EBUSY 2026-01-03 21:14:32 +01:00
Mike Yuan 08c3010399 elf-util: fix alignment 2026-01-03 20:08:12 +01:00
Yu Watanabe cb39d66ec8 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.
2026-01-03 19:57:44 +01:00
Yu Watanabe 30b9fa495c clang-tidy: Enable more warnings (#39910) 2026-01-03 06:00:30 +09:00
Daan De Meyer ce2c72daa1 tree-wide: Migrate to pidref_safe_fork() (#40170) 2026-01-02 21:12:31 +01:00
Antonio Alvarez Feijoo 5b603f4d06 systemctl-preset-all: do not return 0 if unit_file_preset_all() fails
Follow-up for ae9ff778cd
2026-01-03 04:53:44 +09:00