Commit Graph
85561 Commits
Author SHA1 Message Date
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
Ulrich Ölmann dc3078e3a9 man/systemctl: fix typo 2026-01-03 04:45:30 +09:00
Daan De Meyer 52ecf376fa 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().
2026-01-02 20:08:41 +01:00
Daan De Meyer e6703a9aa4 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.
2026-01-02 19:44:18 +01:00
DaanDeMeyer 8b4278d12e 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.
2026-01-02 15:21:53 +01:00
Lennart Poettering 5fcca42f18 update TODO 2026-01-02 11:20:23 +01:00
Daan De Meyer 7c6e377bc0 clang-tidy: Enable more warnings 2026-01-02 09:39:32 +01:00
Daan De Meyer aa284132bc 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
2026-01-02 09:39:32 +01:00
Daan De Meyer 704f774ff5 ci: Add coverage for -Dcompat-mutable-uid-boundaries=true 2026-01-02 09:39:32 +01:00
Daan De Meyer a7e07aeaac locale: Gate conditional includes behind ifdef
Let's make sure clang-tidy doesn't complain on
distributions without locale-gen.
2026-01-02 09:39:32 +01:00
Daan De Meyer 1dcdb3e439 basic: Gate conditional includes behind ifdef 2026-01-02 09:39:32 +01:00
Daan De Meyer 831a1be45c libudev: Fix declaration argument names
Make sure these match the definition argument names.
2026-01-02 09:39:31 +01:00
Daan De Meyer 8f80b4dc2a 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.
2026-01-02 09:39:31 +01:00
Daan De Meyer 1908e1543a 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.
2026-01-02 09:39:31 +01:00
Daan De Meyer 2262b1c025 systemctl-daemon-reload: Add missing parameter name 2026-01-02 09:39:31 +01:00
Daan De Meyer d5ed05a2ce 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.
2026-01-02 09:23:38 +01:00
Daan De Meyer 18842be4be tree-wide: Various coding style cleanups 2026-01-02 09:22:59 +01:00
Daan De Meyer 143c5c1ad7 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.
2026-01-02 09:22:23 +01:00
Daan De Meyer 17ce971a9c 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.
2026-01-02 09:22:23 +01:00
DaanDeMeyer 46e3fef1a8 tree-wide: Drop NOLINTNEXTLINE comments
Not needed anymore after recent refactoring.
2026-01-02 09:22:23 +01:00
Daan De Meyer 944ae1286b 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.
2026-01-02 09:21:43 +01:00
Yu Watanabe 2553c53730 tools: drop unnecessary sys/capability.h header
After 9b414a38fa (#39425), the header is
not required. And after b295c166f9, the
header is not installed in CI environments.
2026-01-02 08:46:05 +01:00
Yu Watanabe 6d2c9c2203 tools: show each command to make it easier to debug 2026-01-02 08:46:05 +01:00
Yu Watanabe fe3c790f71 tools: allow to run setup-musl-build.sh for already set up directory 2026-01-02 08:46:05 +01:00
Yu Watanabe 508dc4c3fa 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.
2026-01-02 14:32:12 +09:00
Yu Watanabe d0b224f845 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.
2026-01-02 13:06:14 +09:00
Yu Watanabe 8de783a288 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.
2026-01-02 12:55:57 +09:00
Yu Watanabe 5863641bb7 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.
2026-01-02 12:55:53 +09:00
Yu Watanabe 431fc656bc 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.
2026-01-02 12:54:18 +09:00
Yu Watanabe 8608d2e910 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.
2026-01-02 12:54:01 +09:00
Yu Watanabe d5267b2275 libcrypt-util: add missing assertions 2026-01-02 12:54:01 +09:00
Yu Watanabe b26406c9c3 libcrypt-util: drop unused hash_passwrod_full()
It is only used by test cases. Not necessary to keep it.
2026-01-02 12:54:00 +09:00
Yu Watanabe d274748160 libcrypt-util: move looks_like_hashed_password()
No functional change, just preparation for later change.
2026-01-02 12:54:00 +09:00
Yu Watanabe 23c82484e7 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.
2026-01-02 11:15:17 +09:00
Yu Watanabe 9ba0e5674b 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.
2026-01-02 11:12:27 +09:00
Yu Watanabe e4fd21a777 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.
2026-01-02 11:12:05 +09:00
Yu Watanabe 99d0a9fdb0 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.
2026-01-02 11:09:52 +09:00
Yu Watanabe 33340fbe44 man: drop redundant 'and'
Also swap the order of entries, to make it consistent for other unit
types.

Follow-up for 79dd24cf14.
2026-01-02 09:52:31 +09:00
Adam Williamson b671f193e3 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>
2026-01-02 09:31:20 +09:00