]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
5 days agotest: move several test cases to test-tmpfile-util.c 39708/head
Yu Watanabe [Wed, 12 Nov 2025 22:46:13 +0000 (07:46 +0900)] 
test: move several test cases to test-tmpfile-util.c

5 days agotest: move several test cases to test-env-file.c
Yu Watanabe [Wed, 12 Nov 2025 22:45:08 +0000 (07:45 +0900)] 
test: move several test cases to test-env-file.c

5 days agotest-fileio: migrate to use new ASSER_OK() macro and friends
Yu Watanabe [Wed, 12 Nov 2025 22:29:27 +0000 (07:29 +0900)] 
test-fileio: migrate to use new ASSER_OK() macro and friends

This also replaces fgets() with read_full_file().

5 days agomkosi: update debian commit reference to efdd7a6377c7251011ca2c1a59115d482d25fe61
Luca Boccassi [Wed, 12 Nov 2025 22:19:27 +0000 (22:19 +0000)] 
mkosi: update debian commit reference to efdd7a6377c7251011ca2c1a59115d482d25fe61

efdd7a6377 Install new file for upstream build
9ebdc6099e d/rules: enable 10-systemd-logind-root-ignore-inhibitors.rules.example on Ubuntu
1255cc7663 initramfs-tools: only skip chzdev rules if zdev_early=0
4675b281ee d/t/boot-and-services: skip apparmor test on armhf
214d6e37b2 d/t/boot-and-services: run transient unit to check syslog messages
f4e196aa26 d/t/boot-and-services: tweak test_rsyslog regex
dbd366a43e Install new files for upstream build
bb7f8ef532 Install new files for upstream build
efa7cee8a7 Install new file for upstream build
95aa1d1685 Install new file for upstream build
b770f0f01b kernel-install: skip 55-initrd.install when an initrd generator is configured
af8d1e3134 Update changelog for 258.1-2 release
2d0e73cd14 d/libnss-systemd.postinst: Ensure module is enabled for all four databases

5 days agoman: fedora 43 is the latest stable
Zbigniew Jędrzejewski-Szmek [Wed, 12 Nov 2025 21:58:40 +0000 (22:58 +0100)] 
man: fedora 43 is the latest stable

5 days agodocs/BACKPORTS: update
Zbigniew Jędrzejewski-Szmek [Wed, 12 Nov 2025 22:14:11 +0000 (23:14 +0100)] 
docs/BACKPORTS: update

We now keep stable branches in the main repo. Update the description
to match current practice.

Closes https://github.com/systemd/systemd/issues/35846.

5 days agoboot: coding style cleanups
Luca Boccassi [Tue, 11 Nov 2025 22:21:05 +0000 (22:21 +0000)] 
boot: coding style cleanups

5 days agomusl: avoid conflict between fcntl.h and basic-forward.h
Yu Watanabe [Mon, 21 Jul 2025 18:37:37 +0000 (03:37 +0900)] 
musl: avoid conflict between fcntl.h and basic-forward.h

glibc defines AT_FDCWD as -100, but musl defines it as (-100).
In basic-forward.h, we also define AT_FDCWD as -100, hence musl's fcntl.h
conflicts with forward.h. This is for avoiding the conflict.

5 days agotime-util: several fixlets/workarounds for supporting musl (#39688)
Yu Watanabe [Wed, 12 Nov 2025 20:18:25 +0000 (05:18 +0900)] 
time-util: several fixlets/workarounds for supporting musl (#39688)

5 days agosd-journal: fix relative path handling (#38681)
Yu Watanabe [Wed, 12 Nov 2025 20:12:00 +0000 (05:12 +0900)] 
sd-journal: fix relative path handling (#38681)

Fixes #38667.

5 days agocore/dbus-service: validate type of received ExecContext fds (#39680)
Yu Watanabe [Wed, 12 Nov 2025 20:11:07 +0000 (05:11 +0900)] 
core/dbus-service: validate type of received ExecContext fds (#39680)

5 days agomeson: add musl support (#39686)
Yu Watanabe [Wed, 12 Nov 2025 20:10:22 +0000 (05:10 +0900)] 
meson: add musl support (#39686)

5 days agomusl: meson: gracefully disable gshadow, nss, and idn support 39686/head
Yu Watanabe [Sat, 21 Jun 2025 17:16:25 +0000 (02:16 +0900)] 
musl: meson: gracefully disable gshadow, nss, and idn support

- musl does not support gshadow, and does not provide gshadow.h,
- musl does not support nss, and does not provide nss.h which is necessary
  for each nss modules,
- musl does not provide NI_IDN.

5 days agomusl: meson: check existence of renameat2()
Yu Watanabe [Mon, 9 Jun 2025 04:00:37 +0000 (13:00 +0900)] 
musl: meson: check existence of renameat2()

musl-1.2.5 does not provide renameat2(). Note, it is added by
https://github.com/kraj/musl/commit/05ce67fea99ca09cd4b6625cff7aec9cc222dd5a,
hence hopefully it will be provided by musl-1.2.6 or newer.

5 days agomusl: meson: make musl not define wchar_t in their header
Yu Watanabe [Mon, 9 Jun 2025 04:37:38 +0000 (13:37 +0900)] 
musl: meson: make musl not define wchar_t in their header

Otherwise, musl defines wchar_t as int, which conflicts with the
assumption by sd-boot, i.e. wchar_t is 2 bytes.

Fixes the following build error:
```
In file included from ../src/boot/efi-log.h:4,
                 from ../src/boot/linux_x86.c:13:
../src/boot/efi.h:19:24: error: conflicting types for 'wchar_t'; have 'short unsigned int'
   19 | typedef __WCHAR_TYPE__ wchar_t;
      |                        ^~~~~~~
In file included from /usr/include/stddef.h:19,
                 from ../src/boot/efi.h:9:
/usr/include/bits/alltypes.h:10:13: note: previous declaration of 'wchar_t' with type 'wchar_t' {aka 'int'}
   10 | typedef int wchar_t;
      |             ^~~~~~~
```

5 days agomusl: meson: explicitly set _LARGEFILE64_SOURCE
Yu Watanabe [Mon, 9 Jun 2025 15:29:46 +0000 (00:29 +0900)] 
musl: meson: explicitly set _LARGEFILE64_SOURCE

glibc sets it when _GNU_SOURCE is defined, however, musl does not.
Let's explicitly define it to make getdents64() and struct dirent64
available even when building with musl.

5 days agomusl: meson: explicitly link with libintl when necessary
Yu Watanabe [Sat, 6 Sep 2025 07:25:41 +0000 (16:25 +0900)] 
musl: meson: explicitly link with libintl when necessary

On some musl based distributions dgettext() may be provided by libintl.so.
Hence, we need to add dependency in that case.

5 days agomusl: meson: allow to choose libc implementation
Yu Watanabe [Mon, 7 Jul 2025 05:11:19 +0000 (14:11 +0900)] 
musl: meson: allow to choose libc implementation

This also introduces skeleton directories for storing musl specific code.

5 days agotest-varlink: Migrate to new assertion macros
Daan De Meyer [Thu, 6 Nov 2025 21:31:11 +0000 (22:31 +0100)] 
test-varlink: Migrate to new assertion macros

5 days agorun0: Never ask --empower sessions for polkit auth
Daan De Meyer [Wed, 12 Nov 2025 13:05:54 +0000 (14:05 +0100)] 
run0: Never ask --empower sessions for polkit auth

A --empower session is effectively root without being UID 0, so it
doesn't make sense to enforce polkit authentication in those. Let's
add the empower group, add --empower sessions to that group and ship
a polkit rule to skip authentication for all users in the empower
group.

(As a side-effect this will also allow users to add themselves to this
group outside of 'run0 --empower' to mimick NOPASSWD from sudo)

5 days agomusl: test-time-util: skip parsing back when currently unused timezone is set 39688/head
Yu Watanabe [Wed, 12 Nov 2025 02:40:22 +0000 (11:40 +0900)] 
musl: test-time-util: skip parsing back when currently unused timezone is set

5 days agomusl: time-util: skip tm.tm_wday check
Yu Watanabe [Mon, 8 Sep 2025 06:08:49 +0000 (15:08 +0900)] 
musl: time-util: skip tm.tm_wday check

musl does not set tm_wday when it is explicitly requested.
The check is not necessary at all, it is just for safety.
Let's skip it when built with musl.

5 days agomusl: time-util: introduce get_tzname() helper function
Yu Watanabe [Tue, 11 Nov 2025 18:35:45 +0000 (03:35 +0900)] 
musl: time-util: introduce get_tzname() helper function

musl leaves the DST timezone name unset if there is no DST.
The helper function maps that back to no DST.

5 days agomusl: time-util: make parse_gmtoff() accept extended timezone offset format
Yu Watanabe [Mon, 8 Sep 2025 23:31:22 +0000 (08:31 +0900)] 
musl: time-util: make parse_gmtoff() accept extended timezone offset format

musl v1.2.5 does not support %z specifier in strptime(). Since
https://github.com/kraj/musl/commit/fced99e93daeefb0192fd16304f978d4401d1d77
%z is supported, but it only supports strict RFC-822/ISO 8601 format,
that is, 4 digits with sign (e.g. +0900 or -1400), but does not support
extended format: 2 digits or colon separated 4 digits (e.g. +09 or -14:00).
Let's add fallback logic to make it support the extended timezone spec.

6 days agoMigrate various tests to new assertion macros (#39691)
Daan De Meyer [Wed, 12 Nov 2025 15:17:38 +0000 (16:17 +0100)] 
Migrate various tests to new assertion macros (#39691)

Split out of #39608

6 days agocore/dbus-service: validate type of received ExecContext fds 39680/head
Mike Yuan [Tue, 11 Nov 2025 18:13:01 +0000 (19:13 +0100)] 
core/dbus-service: validate type of received ExecContext fds

6 days agologind-session-dbus: use fd_vet_accmode() where appropriate
Mike Yuan [Tue, 11 Nov 2025 18:41:11 +0000 (19:41 +0100)] 
logind-session-dbus: use fd_vet_accmode() where appropriate

6 days agotest-fd-util: add unit test for fd_vet_accmode()
Mike Yuan [Wed, 12 Nov 2025 00:47:01 +0000 (01:47 +0100)] 
test-fd-util: add unit test for fd_vet_accmode()

Co-authored-by: Chris Down <chris@chrisdown.name>
6 days agofd-util: introduce fd_vet_accmode()
Mike Yuan [Tue, 11 Nov 2025 18:04:38 +0000 (19:04 +0100)] 
fd-util: introduce fd_vet_accmode()

Inspired by #39674

6 days agosd-journal: resolve paths passed to sd_journal_open_files() and friends 38681/head
Yu Watanabe [Thu, 21 Aug 2025 20:26:44 +0000 (05:26 +0900)] 
sd-journal: resolve paths passed to sd_journal_open_files() and friends

Fixes #38667.

6 days agosd-journal: use -EBADF for invalidated file descriptor
Yu Watanabe [Thu, 21 Aug 2025 20:02:52 +0000 (05:02 +0900)] 
sd-journal: use -EBADF for invalidated file descriptor

6 days agotest-rm-rf: Migrate to new assertion macros 39691/head
Daan De Meyer [Thu, 6 Nov 2025 19:14:25 +0000 (20:14 +0100)] 
test-rm-rf: Migrate to new assertion macros

6 days agotest-bus-chat: Migrate to TEST() and new assertion macros
Daan De Meyer [Tue, 11 Nov 2025 18:39:25 +0000 (19:39 +0100)] 
test-bus-chat: Migrate to TEST() and new assertion macros

- Also contains various other small cleanups

6 days agotest-bus-watch-bind: Migrate to new assertion macros
Daan De Meyer [Fri, 7 Nov 2025 11:02:15 +0000 (12:02 +0100)] 
test-bus-watch-bind: Migrate to new assertion macros

6 days agotest-bus-server: Migrate to new assertion macros
Daan De Meyer [Thu, 6 Nov 2025 17:48:16 +0000 (18:48 +0100)] 
test-bus-server: Migrate to new assertion macros

6 days agotest-bus-peersockaddr: Migrate to new assertion macros
Daan De Meyer [Thu, 6 Nov 2025 17:40:08 +0000 (18:40 +0100)] 
test-bus-peersockaddr: Migrate to new assertion macros

6 days agotest-bus-objects: Migrate to new assertion macros
Daan De Meyer [Thu, 6 Nov 2025 17:09:05 +0000 (18:09 +0100)] 
test-bus-objects: Migrate to new assertion macros

6 days agotest-event: Migrate to new assertion macros
Daan De Meyer [Thu, 6 Nov 2025 20:36:39 +0000 (21:36 +0100)] 
test-event: Migrate to new assertion macros

6 days agotests: Return result from some ASSERT() macros
Daan De Meyer [Thu, 6 Nov 2025 18:13:39 +0000 (19:13 +0100)] 
tests: Return result from some ASSERT() macros

6 days agolocale-util: two fixlets for supporting musl (#39689)
Zbigniew Jędrzejewski-Szmek [Wed, 12 Nov 2025 09:38:29 +0000 (10:38 +0100)] 
locale-util: two fixlets for supporting musl (#39689)

6 days agotest-bus-error: use STRERROR() at several more places
Yu Watanabe [Wed, 12 Nov 2025 01:43:49 +0000 (10:43 +0900)] 
test-bus-error: use STRERROR() at several more places

6 days agotree-wide: drop redundant inclusion of linux/prctl.h
Yu Watanabe [Tue, 11 Nov 2025 17:29:34 +0000 (02:29 +0900)] 
tree-wide: drop redundant inclusion of linux/prctl.h

sys/prctl.h anyway includes linux/prctl.h and actually these .c files
includes sys/prctl.h. Hence, it is not necessary to explicitly include
linux/prctl.h.

6 days agolibc: drop unnecessary __THROW attribute
Yu Watanabe [Tue, 11 Nov 2025 17:17:12 +0000 (02:17 +0900)] 
libc: drop unnecessary __THROW attribute

It is for C++, not necessary for us.

6 days agomusl: locale-util: explicitly check existence of locale file 39689/head
Yu Watanabe [Tue, 11 Nov 2025 22:30:01 +0000 (07:30 +0900)] 
musl: locale-util: explicitly check existence of locale file

musl's newlocale() always provides a locale object even the requested
locale does not exist. Let's explicitly check the existence of the
requested locale file.

6 days agomusl: locale-util: introduce musl specific locale enumerator
Yu Watanabe [Tue, 11 Nov 2025 22:27:50 +0000 (07:27 +0900)] 
musl: locale-util: introduce musl specific locale enumerator

Both add_locales_from_archive() and add_locales_from_libdir() are glibc
specific, and the logic cannot be applied when built with musl.

6 days agocore/exec-credentials: port to new mount API, ensure atomicity for creds installation...
Yu Watanabe [Wed, 12 Nov 2025 00:00:23 +0000 (09:00 +0900)] 
core/exec-credentials: port to new mount API, ensure atomicity for creds installation (#39637)

6 days agosystemctl: fix edit and cat verbs with --global flag (#39606)
Yu Watanabe [Tue, 11 Nov 2025 23:59:06 +0000 (08:59 +0900)] 
systemctl: fix edit and cat verbs with --global flag (#39606)

The --global flag has been broken since commit
d77d42ed3ae95ee035dce4707777b077d1a9bf8b, which added a
blanket restriction on acquiring D-Bus connections when
arg_runtime_scope is RUNTIME_SCOPE_GLOBAL. This was done to prevent
crashes, but inadvertently broke legitimate use cases like 'systemctl
edit --global' and 'systemctl cat --global'.

The issue is that verb_edit() and verb_cat() were unconditionally
calling acquire_bus(), which triggers the restriction and fails with
"--global is not supported for this operation."

This commit fixes the issue by making bus acquisition conditional,
following the same pattern used in verb_enable():

- Only acquire the bus when install_client_side() returns NO (i.e., for
system and user scopes)
- For client-side operations (--global, --root, etc.), skip bus
acquisition and use mangle_names() instead of expand_unit_names()
- Update find_paths_to_edit() and verb_cat() to handle NULL bus by
forcing client-side path lookups
- Skip bus-dependent checks (unit_is_masked, need_daemon_reload) when
bus is NULL

This allows both 'systemctl edit --global' and 'systemctl cat --global'
to work correctly by performing all operations client-side without
requiring a connection to the system or user manager.

Fixes #31272

6 days agosd-path: add new type SD_PATH_SEARCH_SYSCTL (#38680)
Yu Watanabe [Tue, 11 Nov 2025 23:54:09 +0000 (08:54 +0900)] 
sd-path: add new type SD_PATH_SEARCH_SYSCTL (#38680)

Aim of this patches set, is to add a new type SD_PATH_SEARCH_SYSCTL for
sd_path_lookup() and sd_path_lookup_strv(). This new type is used to get the
directories list used by systemd-sysctl:

-  /etc/sysctl.d/
-  /run/sysctl.d/
-  /usr/local/lib/sysctl.d/
-  /usr/lib/sysctl.d/

This implements the change in libsystemd, systemd-path, and systemd-sysctl.

6 days agosystemd-sysctl: add SD_PATH_SEARCH_SYSCTL 38680/head
Goffredo Baroncelli [Mon, 10 Nov 2025 21:56:04 +0000 (22:56 +0100)] 
systemd-sysctl: add SD_PATH_SEARCH_SYSCTL

Update systemd-sysctl to use libsystemd with the new type
SD_PATH_SEARCH_SYSCTL to get the directories list from which
load the .conf files.

6 days agobootctl: calculate secureboot state taking MokSBStateRT into account (#39298)
Dimitri John Ledkov [Tue, 11 Nov 2025 23:47:44 +0000 (23:47 +0000)] 
bootctl: calculate secureboot state taking MokSBStateRT into account (#39298)

shim is often used as part of the EFI boot chain with Linux kernels.

shim has an option to disable all verification of binaries it loads.
This can be performed by end-user using mokutil / mokmanager EFI app,
which set BootServices only variable MokSBState. shim honors that, and
mirrors it as readonly MokSBStateRT for the post-ExitBootService access.

Thus presense of MokSBStateRT is an indicator that shim was used during
boot chain.

Some OEM vendors are known to set MokSBState variable, without user
having done so.

When verification is disabled, one should assume secureboot is insecure,
because any EFI binary was allowed to run, including but not limited to
unsigned or revoked:
- grub
- systemd-boot
- UKI
- linux kernel

Linux kernel also has code to check this variable, and correctly report
that Secure Boot is disabled, see:
-
https://github.com/torvalds/linux/blob/3a8660878839faadb4f1a6dd72c3179c1df56787/drivers/firmware/efi/libstub/secureboot.c#L57

With this change bootctl output changes like this:
```diff
 System:
       Firmware: n/a (n/a)
  Firmware Arch: x64
-   Secure Boot: enabled (user)
+   Secure Boot: disabled (insecure)
   TPM2 Support: yes
   Measured UKI: no
   Boot into FW: supported
```

This implementation is trying to mimic mokutil behaviour like this one:
```
$ mokutil --sb-state
SecureBoot enabled
SecureBoot validation is disabled in shim
```

As well as the linux kernel behavior of:
```
$ journalctl -b | grep 'Secure boot disabled'
kernel: Secure boot disabled
```

Note that MokSBState is extended into PCR7 as well as also into PCR14.
For more details see https://github.com/rhboot/shim/blob/main/README.tpm

6 days agosystemd-logind: Add signal section in man systemd-logind
Masanari Iida [Tue, 11 Nov 2025 14:20:15 +0000 (23:20 +0900)] 
systemd-logind: Add signal section in man systemd-logind

This patch adds signal setion in man systemd-logind

6 days agocore/exec-invoke: do not check array being non-NULL
Mike Yuan [Tue, 11 Nov 2025 18:51:01 +0000 (19:51 +0100)] 
core/exec-invoke: do not check array being non-NULL

Addresses
https://download.copr.fedorainfracloud.org/results/packit/systemd-systemd-39680/fedora-rawhide-i386/09787959-systemd/builder-live.log.gz

6 days agosystemd-path: add new type SD_PATH_SEARCH_SYSCTL
Goffredo Baroncelli [Mon, 10 Nov 2025 21:56:04 +0000 (22:56 +0100)] 
systemd-path: add new type SD_PATH_SEARCH_SYSCTL

Add new type SD_PATH_SEARCH_SYSCTL to the ones that systemd-path already
know.

Before the change:
$ systemd-path | egrep sysctl
sysctl: /usr/lib/sysctl.d

After the change:
$ ./systemd-path | egrep sysctl
search-sysctl: /etc/sysctl.d:/run/sysctl.d:/usr/local/lib/sysctl.d:/usr/lib/sysctl.d
sysctl: /usr/lib/sysctl.d

6 days agodissect: check that roothash in signature matches before selecting partition
Luca Boccassi [Mon, 10 Nov 2025 02:01:57 +0000 (02:01 +0000)] 
dissect: check that roothash in signature matches before selecting partition

If there are multiple verity sig partitions (e.g.: sysupdate and A/B
scheme), dissection will simply pick the last sig partition it encounters,
as no checks are done on the content (like for the usr/root and verity data).

Check that the JSON content matches the requested roothash, if any.

Before:

sda: /usr/lib/udev/rules.d/90-image-dissect.rules:34 IMPORT{builtin}="dissect_image probe": Importing properties from results of builtin command "dissect_image probe".
Dissecting esp partition with label esp and UUID b80070bd-ea4f-49ea-94ab-41a4e4125f80.
Dissecting usr-verity-sig partition with label ParticleOS_27.178_verity_sig and UUID a6d47959-39f7-4686-99b0-660b301d1488.
Dissecting usr-verity partition with label ParticleOS_27.178_verity and UUID d7acad57-995d-297d-bf6c-a58821dcd28a.
Dissecting usr partition with label ParticleOS_27.178 and UUID f5b6aff5-945d-946e-faf4-d482c07f9968.
Dissecting usr-verity-sig partition with label ParticleOS_118.26_verity_sig and UUID c9151ec9-3264-434a-8f42-7b125432d676.
Dissecting usr-verity partition with label ParticleOS_118.26_verity and UUID 88fa8c85-8161-ea32-bf4a-fc8df18d27ae.
Partition UUID '88fa8c85-8161-ea32-bf4a-fc8df18d27ae' does not match expected UUID 'f5b6aff5-945d-946e-faf4-d482c07f9968' derived from usr verity hash, ignoring.
Dissecting usr partition with label ParticleOS_118.26 and UUID 52df1859-e144-348d-2cb1-8d6440254719.
Partition UUID '52df1859-e144-348d-2cb1-8d6440254719' does not match expected UUID 'f5b6aff5-945d-946e-faf4-d482c07f9968' derived from usr verity hash, ignoring.
Dissecting swap partition with label ParticleOS-swap and UUID 7fe77f77-32fb-4957-8c1e-6c04bd2e435f.
Dissecting root partition with label ParticleOS-root and UUID a5c89fc4-e92c-4e83-913f-8c866b94592e.
Dissecting home partition with label ParticleOS-home and UUID 25885d07-baa2-4992-b6aa-56813aa70cef.
Found for designator root: encrypted+unprotected+unused.
Found for designator usr: verity+signed+encrypted+unprotected+unused.
Found for designator home: encrypted+unprotected+unused.
Found for designator srv: absent.
Found for designator esp: encrypted+unprotected+unused.
Found for designator xbootldr: absent.
Found for designator swap: encrypted+unprotected+unused.
Found for designator root-verity: absent.
Found for designator usr-verity: encrypted+unprotected+unused.
Found for designator root-verity-sig: absent.
Found for designator usr-verity-sig: encrypted+unprotected+unused.
Found for designator tmp: absent.
Found for designator var: absent.
Probed fstype 'btrfs' on partition /dev/sda9.
Probed fstype 'erofs' on partition /dev/sda4.
Probed fstype 'btrfs' on partition /dev/sda10.
Probed fstype 'swap' on partition /dev/sda8.
Root hash in signature JSON data (52df1859e144348d2cb18d644025471988fa8c858161ea32bf4afc8df18d27ae) doesn't match configured hash (f5b6aff5945d946efaf4d482c07f9968d7acad57995d297dbf6ca58821dcd28a).
sda: Failed to load verity signature data from image: Invalid argument

After:

Dissecting usr-verity-sig partition with label ParticleOS_27.178_verity_sig and UUID a6d47959-39f7-4686-99b0-660b301d1488.
Dissecting usr-verity partition with label ParticleOS_27.178_verity and UUID d7acad57-995d-297d-bf6c-a58821dcd28a.
Dissecting usr partition with label ParticleOS_27.178 and UUID f5b6aff5-945d-946e-faf4-d482c07f9968.
Dissecting usr-verity-sig partition with label ParticleOS_118.26_verity_sig and UUID c9151ec9-3264-434a-8f42-7b125432d676.
Root hash in signature JSON data (52df1859e144348d2cb18d644025471988fa8c858161ea32bf4afc8df18d27ae) doesn't match configured hash (f5b6aff5945d946efaf4d482c07f9968d7acad57995d297dbf6ca58821dcd28a).
Dissecting usr-verity partition with label ParticleOS_118.26_verity and UUID 88fa8c85-8161-ea32-bf4a-fc8df18d27ae.
Partition UUID '88fa8c85-8161-ea32-bf4a-fc8df18d27ae' does not match expected UUID 'f5b6aff5-945d-946e-faf4-d482c07f9968' derived from usr verity hash, ignoring.
Dissecting usr partition with label ParticleOS_118.26 and UUID 52df1859-e144-348d-2cb1-8d6440254719.
Partition UUID '52df1859-e144-348d-2cb1-8d6440254719' does not match expected UUID 'f5b6aff5-945d-946e-faf4-d482c07f9968' derived from usr verity hash, ignoring.
<...>
  ID_DISSECT_PART2_DESIGNATOR=usr-verity-sig
  ID_DISSECT_PART3_ARCHITECTURE=x86-64
  ID_DISSECT_PART3_DESIGNATOR=usr-verity
  ID_DISSECT_PART4_ARCHITECTURE=x86-64
  ID_DISSECT_PART4_DESIGNATOR=usr
  ID_DISSECT_PART4_HAS_VERITY=1
  ID_DISSECT_PART4_HAS_VERITY_SIG=1
  ID_DISSECT_PART4_ROOTHASH=f5b6aff5945d946efaf4d482c07f9968d7acad57995d297dbf6ca58821dcd28a
  ID_DISSECT_PART4_ROOTHASH_SIG=<...>
  ID_DISSECT_PART4_VERITY_DEVICE=/dev/disk/by-diskseq/9-part3
  ID_DISSECT_PART4_VERITY_SIG_DEVICE=/dev/disk/by-diskseq/9-part2

Fixes https://github.com/systemd/systemd/issues/39655

6 days agosystemctl: support --global and --root in edit and cat 39606/head
gvenugo3 [Tue, 11 Nov 2025 17:00:29 +0000 (10:00 -0700)] 
systemctl: support --global and --root in edit and cat

Make bus acquisition conditional in verb_edit() and verb_cat(), following
the same pattern used in verb_enable(). When install_client_side() returns
non-zero (indicating --global, --root, offline, or similar scenarios), skip
acquiring a D-Bus connection and perform all operations client-side.

Changes:
- Only acquire bus when install_client_side() returns NO
- Use mangle_names() instead of expand_unit_names() in client-side mode
- Pass force_client_side flag based on bus availability
- Skip bus-dependent operations (need_daemon_reload, etc.) when bus is NULL

This allows 'systemctl edit --global' and 'systemctl cat --global' to work
correctly, fixing the regression introduced by commit d77d42ed3a.

Test cases added to verify:
- Creating and editing global user units with --runtime
- Reading global units with cat --global
- Proper detection and rejection of masked units in client-side mode
- Tests use /run/ instead of /etc/ for safer temporary testing

Fixes https://github.com/systemd/systemd/issues/31272

6 days agosystemctl: check if unit is masked in unit_find_paths()
gvenugo3 [Tue, 11 Nov 2025 16:55:59 +0000 (09:55 -0700)] 
systemctl: check if unit is masked in unit_find_paths()

When operating in client-side mode (force_client_side=true), unit_find_paths()
now checks if the unit file is masked (symlinked to /dev/null or empty) and
returns -ERFKILL, matching the behavior of the server-side path.

This centralizes masked unit detection in one place, making it consistent
across both client-side and server-side operations.

6 days agosystemctl: drop unnecessary unit_is_masked() check in edit
gvenugo3 [Tue, 11 Nov 2025 16:54:49 +0000 (09:54 -0700)] 
systemctl: drop unnecessary unit_is_masked() check in edit

The unit_is_masked() check will be performed later by unit_find_paths(),
making this early check redundant.

7 days agopo: Translated using Weblate (German)
Marcel Leismann [Tue, 11 Nov 2025 11:42:06 +0000 (11:42 +0000)] 
po: Translated using Weblate (German)

Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Marcel Leismann <tiixrigjekfv@use.startmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/de/
Translation: systemd/main

7 days agopo: Translated using Weblate (German)
Weblate Translation Memory [Tue, 11 Nov 2025 11:42:06 +0000 (11:42 +0000)] 
po: Translated using Weblate (German)

Currently translated at 100.0% (264 of 264 strings)

po: Translated using Weblate (German)

Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Weblate Translation Memory <noreply-mt-weblate-translation-memory@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/de/
Translation: systemd/main

7 days agoacl-util: fall back to fchmod() if libacl is not around, too 39637/head
Mike Yuan [Sat, 8 Nov 2025 05:01:57 +0000 (06:01 +0100)] 
acl-util: fall back to fchmod() if libacl is not around, too

7 days agoacl-util: drop now unused fd_acl_make_writable()
Mike Yuan [Sat, 8 Nov 2025 03:27:17 +0000 (04:27 +0100)] 
acl-util: drop now unused fd_acl_make_writable()

7 days agocore/exec-credential: remove no longer needed per-cred atomic update logic
Mike Yuan [Sat, 8 Nov 2025 02:20:13 +0000 (03:20 +0100)] 
core/exec-credential: remove no longer needed per-cred atomic update logic

Now that we guarantee at higher level that we work on unique
credential dir, this becomes unnecessary.

7 days agocore/exec-credential: work around tmpfs reconfigure bug
Mike Yuan [Sat, 8 Nov 2025 19:26:31 +0000 (20:26 +0100)] 
core/exec-credential: work around tmpfs reconfigure bug

7 days agocore/exec-credential: port to new mount API, ensure atomicity for creds installation
Mike Yuan [Fri, 7 Nov 2025 20:53:02 +0000 (21:53 +0100)] 
core/exec-credential: port to new mount API, ensure atomicity for creds installation

This allows us to kill a great deal of complexity imposed
by the mountns and workspace reuse.

7 days agolibsystemd: add new type SD_PATH_SEARCH_SYSCTL for sd_path_lookup*
Goffredo Baroncelli [Mon, 10 Nov 2025 21:58:25 +0000 (22:58 +0100)] 
libsystemd: add new type SD_PATH_SEARCH_SYSCTL for sd_path_lookup*

Add the new type SD_PATH_SEARCH_SYSCTL to libsystemd.
With this new type sd_path_lookup() and sd_path_lookup_strv() will
return the paths used by systemd-sysctl(1) to search the .conf files:

           /etc/sysctl.d/
           /run/sysctl.d/
           /usr/local/lib/sysctl.d/
           /usr/lib/sysctl.d/

Refer to sysctl.d(5) man page.

Note: the old type SD_PATH_SYSCTL is still available, and returns the
last path (/usr/lib/sysctl.d/).

7 days agomount-util: introduce fsmount_credentials_fs()
Mike Yuan [Fri, 7 Nov 2025 22:06:03 +0000 (23:06 +0100)] 
mount-util: introduce fsmount_credentials_fs()

While at it, remove effectively unused size and ro params.

7 days agocreds-util: use U64_* macros where appropriate
Mike Yuan [Sat, 8 Nov 2025 05:39:43 +0000 (06:39 +0100)] 
creds-util: use U64_* macros where appropriate

7 days agocore/exec-credential: do not pass CGroupContext deep down the stack
Mike Yuan [Fri, 7 Nov 2025 20:49:38 +0000 (21:49 +0100)] 
core/exec-credential: do not pass CGroupContext deep down the stack

The repetitive re-evaluation of device_nodes_restricted() is wasteful.
Just pre-determine whether we need to always go by IPC and store it
in a bool.

7 days agotest: ignore EC from the second `systemctl status -a` as well
Frantisek Sumsal [Mon, 10 Nov 2025 18:26:43 +0000 (19:26 +0100)] 
test: ignore EC from the second `systemctl status -a` as well

There is a TOCTOU in the `systemctl status` where a unit might change
its state during the initial ListUnitsByPatterns call and the subsequent
individual GetAll calls, which then makes the systemctl call fail even
if the unit that was originally pulled in was active/running:

[ 1922.040463] TEST-26-SYSTEMCTL.sh[117]: + systemctl status -a --state active,running,plugged
[ 1922.051423] systemd[1]: Got message type=method_call sender=n/a destination=org.freedesktop.systemd1 path=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=ListUnitsByPatterns  cookie=1 reply_cookie=0 signature=asas error-name=n/a error-message=n/a
[ 1922.052501] systemd[1]: Sent message type=method_return sender=org.freedesktop.systemd1 destination=n/a path=n/a interface=n/a member=n/a cookie=1 reply_cookie=1 signature=a(ssssssouso) error-name=n/a error-message=n/a
[ 1922.052650] systemd[1]: Got message type=method_call sender=n/a destination=org.freedesktop.systemd1 path=/org/freedesktop/systemd1/unit/_2d_2emount interface=org.freedesktop.DBus.Properties member=GetAll  cookie=2 reply_cookie=0 signature=s error-name=n/a error-message=n/a
...
[ 1922.222061] systemd-hostnamed[424]: Idle for 30s, exiting.
...
[ 1922.224961] systemd[1]: systemd-hostnamed.service: Got notification message from PID 424: STOPPING=1, STATUS=Shutting down...
[ 1922.224983] systemd[1]: systemd-hostnamed.service: Changed running ->stop-sigterm
...
[ 1922.228984] systemd[1]: Got message type=method_call sender=n/a destination=org.freedesktop.systemd1 path=/org/freedesktop/systemd1/unit/systemd_2dhostnamed_2eservice interface=org.freedesktop.DBus.Properties member=GetAll  cookie=41 reply_cookie=0 signature=s error-name=n/a error-message=n/a
[ 1922.234402] systemd[1]: Sent message type=method_return sender=org.freedesktop.systemd1 destination=n/a path=n/a interface=n/a member=n/a cookie=43 reply_cookie=41 signature=a{sv} error-name=n/a error-message=n/a

Since in this case we care mostly about the code paths the command
triggers, ignore its exit code as we do for the previous one.

Resolves: #39612

7 days agosystemd-analyze shell completion improvements (#39673)
Luca Boccassi [Mon, 10 Nov 2025 20:06:09 +0000 (20:06 +0000)] 
systemd-analyze shell completion improvements (#39673)

7 days agoshell-completion: zsh: add completion for systemd-analyze inspect-elf 39673/head
Jelle van der Waa [Mon, 10 Nov 2025 18:34:46 +0000 (19:34 +0100)] 
shell-completion: zsh: add completion for systemd-analyze inspect-elf

7 days agoshell-completion: bash: add systemd-analyze image-policy completion
Jelle van der Waa [Mon, 10 Nov 2025 18:23:21 +0000 (19:23 +0100)] 
shell-completion: bash: add systemd-analyze image-policy completion

7 days agoshell-completion: zsh: add missing completions for systemd-analyze
Jelle van der Waa [Mon, 10 Nov 2025 16:21:11 +0000 (17:21 +0100)] 
shell-completion: zsh: add missing completions for systemd-analyze

Adds missing simple verbs which already exist in bash completion.

7 days agoshell-completion: zsh: add systemd-analyze architectures completion
Jelle van der Waa [Mon, 10 Nov 2025 16:05:31 +0000 (17:05 +0100)] 
shell-completion: zsh: add systemd-analyze architectures completion

7 days agotest: don't register short-living containers with machined
Frantisek Sumsal [Mon, 10 Nov 2025 16:42:06 +0000 (17:42 +0100)] 
test: don't register short-living containers with machined

As registering the container creates a scope which might not be cleaned
up completely before we run a next command in the same container,
causing intermittent test fails:

[   63.424739] TEST-13-NSPAWN.sh[4231]: + systemd-nspawn --directory=/var/lib/machines/TEST-13-NSPAWN.sanity.zH2 bash -xec '[[ $USER == root ]]'
[   63.427504] systemd-nspawn[4381]: ░ Spawning container TEST-13-NSPAWN.sanity.zH2 on /var/lib/machines/TEST-13-NSPAWN.sanity.zH2.
[   63.437154] systemd[1]: Started TEST-13-NSPAWN.sanity.zH2.scope - Container TEST-13-NSPAWN.sanity.zH2.
[   63.437765] systemd-machined[1164]: New machine TEST-13-NSPAWN.sanity.zH2.
[   63.440311] TEST-13-NSPAWN.sh[4381]: + [[ root == root ]]
[   63.442046] systemd[1]: TEST-13-NSPAWN.sanity.zH2.scope: Killed unit cgroup '/machine.slice/TEST-13-NSPAWN.sanity.zH2.scope' with SIGKILL on client request.
[   63.442583] systemd-nspawn[4381]: Container TEST-13-NSPAWN.sanity.zH2 exited successfully.
[   63.443073] systemd-machined[1164]: Machine TEST-13-NSPAWN.sanity.zH2 terminated.
[   63.448728] TEST-13-NSPAWN.sh[4231]: + systemd-nspawn --directory=/var/lib/machines/TEST-13-NSPAWN.sanity.zH2 --user=testuser bash -xec '[[ $USER == testuser ]]'
[   63.451209] systemd-nspawn[4385]: ░ Spawning container TEST-13-NSPAWN.sanity.zH2 on /var/lib/machines/TEST-13-NSPAWN.sanity.zH2.
[   63.455295] systemd-nspawn[4385]: Failed to allocate scope: Unit TEST-13-NSPAWN.sanity.zH2.scope was already loaded or has a fragment file.
[   63.456139] systemd[1]: TEST-13-NSPAWN.sanity.zH2.scope: Deactivated successfully.
[   63.461292] TEST-13-NSPAWN.sh[2839]: + at_exit

Since even systemd-nspawn's man page suggests not to register containers
with systemd-machined if they don't run a service manager, let's do just
that to mitigate the race.

Resolves: #39629

8 days agorules: add rule to generate unique symlinks for gpio devices
Gero Schwäricke [Fri, 7 Nov 2025 15:09:17 +0000 (16:09 +0100)] 
rules: add rule to generate unique symlinks for gpio devices

Regular generated paths make it hard to identify individual GPIO
devices. This is a challenge when using multiple USB-to-GPIO adapters
like Diolan DLN2.

The unique symlinks from this rule can be used, e.g., with gpiod tools.

8 days agoresolve: several follow-ups for json output (#39605)
Yu Watanabe [Mon, 10 Nov 2025 13:32:28 +0000 (22:32 +0900)] 
resolve: several follow-ups for json output (#39605)

Follow-ups for #38960.

8 days agotest-ndisc-rs: drop unused verbose flag and log in the debug level
Yu Watanabe [Mon, 10 Nov 2025 10:18:00 +0000 (19:18 +0900)] 
test-ndisc-rs: drop unused verbose flag and log in the debug level

8 days agotest: avoid service name collision
Yu Watanabe [Mon, 10 Nov 2025 10:01:32 +0000 (19:01 +0900)] 
test: avoid service name collision

The same service name was accidentally used for two invocations:
```
[ 1801.197993] H TEST-04-JOURNAL.sh[20563]: + assert_rc 0 journalctl -q -D /run/log/journal/e30adae55e664d328af442bf5df694c8/ -u test-23833.service --grep service=test-23833.service
[ 1801.198527] H TEST-04-JOURNAL.sh[20685]: + set +ex
[ 1801.222676] H TEST-04-JOURNAL.sh[20686]: Nov 10 03:18:51 H systemd[1]: test-23833.service: About to execute: /usr/bin/bash -c "echo service=test-23833.service invocation=\$INVOCATION_ID; journalctl --sync"
[ 1801.222676] H TEST-04-JOURNAL.sh[20686]: Nov 10 03:18:51 H systemd[1]: Started test-23833.service - [systemd-run] /usr/bin/bash -c "echo service=test-23833.service invocation=\$INVOCATION_ID; journalctl --sync".
[ 1801.222676] H TEST-04-JOURNAL.sh[20686]: Nov 10 03:18:51 H (bash)[20681]: test-23833.service: Executing: /usr/bin/bash -c "echo service=test-23833.service invocation=\$INVOCATION_ID; journalctl --sync"
[ 1801.222676] H TEST-04-JOURNAL.sh[20686]: Nov 10 03:18:51 H bash[20681]: service=test-23833.service invocation=1866f15e95924a688dcecde72bf345f6
[ 1801.227878] H TEST-04-JOURNAL.sh[20563]: + assert_rc 1 journalctl -q -D /var/log/journal/e30adae55e664d328af442bf5df694c8/ -u test-23833.service --grep service=test-23833.service
[ 1801.228265] H TEST-04-JOURNAL.sh[20689]: + set +ex
[ 1801.253412] H TEST-04-JOURNAL.sh[20690]: Nov 10 03:18:49 H systemd[1]: test-23833.service: About to execute: /usr/bin/bash -c "echo service=test-23833.service invocation=\$INVOCATION_ID; journalctl --sync"
[ 1801.253412] H TEST-04-JOURNAL.sh[20690]: Nov 10 03:18:49 H systemd[1]: Started test-23833.service - [systemd-run] /usr/bin/bash -c "echo service=test-23833.service invocation=\$INVOCATION_ID; journalctl --sync".
[ 1801.253412] H TEST-04-JOURNAL.sh[20690]: Nov 10 03:18:49 H (bash)[20581]: test-23833.service: Executing: /usr/bin/bash -c "echo service=test-23833.service invocation=\$INVOCATION_ID; journalctl --sync"
[ 1801.253412] H TEST-04-JOURNAL.sh[20690]: Nov 10 03:18:49 H bash[20581]: service=test-23833.service invocation=a3089a62b5624d21bac0a75a3995d8b5
[ 1801.258158] H TEST-04-JOURNAL.sh[20692]: FAIL: expected: '1' actual: '0'
```

8 days agovarious: assorted cleanups for safe_fork (#39661)
Yu Watanabe [Mon, 10 Nov 2025 09:40:16 +0000 (18:40 +0900)] 
various: assorted cleanups for safe_fork (#39661)

8 days agodissect: getenv_fstype() is unused when LIBBLKID support is disabled
Yu Watanabe [Mon, 10 Nov 2025 02:16:13 +0000 (11:16 +0900)] 
dissect: getenv_fstype() is unused when LIBBLKID support is disabled

Follow-up for aad0d11e7c6f1f7dcc7b00173140c74b8abf88cc.

8 days agoresolvectl: drop an empty line between function call and error handling 39605/head
Yu Watanabe [Thu, 6 Nov 2025 18:11:38 +0000 (03:11 +0900)] 
resolvectl: drop an empty line between function call and error handling

Follow-up for 0536b37629c163af268975fcc3017cad823b1e9b.

8 days agoresolvectl: use string table
Yu Watanabe [Thu, 6 Nov 2025 18:07:28 +0000 (03:07 +0900)] 
resolvectl: use string table

Follow-up for 0536b37629c163af268975fcc3017cad823b1e9b.

8 days agoresolvectl: rename STATUS_PRIVATE -> STATUS_DNS_OVER_TLS
Yu Watanabe [Thu, 6 Nov 2025 18:05:15 +0000 (03:05 +0900)] 
resolvectl: rename STATUS_PRIVATE -> STATUS_DNS_OVER_TLS

8 days agoresolve: do not dump cache entries when not necessary
Yu Watanabe [Thu, 6 Nov 2025 17:56:13 +0000 (02:56 +0900)] 
resolve: do not dump cache entries when not necessary

Follow-up for 306375c36804c5c85cd9b77b353f40edf116521d.

8 days agonotify: raise log level for safe_fork() 39661/head
Mike Yuan [Mon, 10 Nov 2025 02:02:47 +0000 (03:02 +0100)] 
notify: raise log level for safe_fork()

8 days agoresolve: use enum for several fields
Yu Watanabe [Thu, 6 Nov 2025 17:31:14 +0000 (02:31 +0900)] 
resolve: use enum for several fields

Unfortunately, we have already exposed dnssec with hyphen, so we cannot
change it as enum.

8 days agoresolve: drop unnecessary preparation of empty arrays
Yu Watanabe [Thu, 6 Nov 2025 16:27:48 +0000 (01:27 +0900)] 
resolve: drop unnecessary preparation of empty arrays

8 days agoresolve: use JSON_BUILD_PAIR_TRISTATE_NON_NULL for default_route
Yu Watanabe [Thu, 6 Nov 2025 16:21:56 +0000 (01:21 +0900)] 
resolve: use JSON_BUILD_PAIR_TRISTATE_NON_NULL for default_route

8 days agocore/namespace: hide the correct credentials tree when running in user scope (#39651) 39665/head
Yu Watanabe [Mon, 10 Nov 2025 02:01:16 +0000 (11:01 +0900)] 
core/namespace: hide the correct credentials tree when running in user scope (#39651)

8 days agopo: Update translation files
Hosted Weblate [Mon, 10 Nov 2025 01:31:00 +0000 (01:31 +0000)] 
po: Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/
Translation: systemd/main

8 days agonetwork: Typo fix configur*a*d
Dr. David Alan Gilbert [Sat, 8 Nov 2025 01:49:10 +0000 (01:49 +0000)] 
network: Typo fix configur*a*d

configurad->configured

8 days agohostname-setup: prefix helper process name with "sd-"
Mike Yuan [Mon, 10 Nov 2025 01:55:40 +0000 (02:55 +0100)] 
hostname-setup: prefix helper process name with "sd-"

8 days agooss-fuzz: install libcrypt-dev in i386 image
Yu Watanabe [Sun, 9 Nov 2025 21:40:20 +0000 (06:40 +0900)] 
oss-fuzz: install libcrypt-dev in i386 image

This is preparation for bumping base image of oss-fuzz to Ubuntu 24.04.

Closes #39395.

Co-authored-by: Evgeny Vereshchagin <evvers@ya.ru>
8 days agoprocess-util: prefix FORK_PID_ONLY with _ to signify it is internal
Mike Yuan [Mon, 10 Nov 2025 01:44:13 +0000 (02:44 +0100)] 
process-util: prefix FORK_PID_ONLY with _ to signify it is internal

8 days agotree-wide: add several missing includes
Yu Watanabe [Sun, 9 Nov 2025 21:21:59 +0000 (06:21 +0900)] 
tree-wide: add several missing includes

- test-reread-partition-table.c: sys/file.h for LOCK_EX
- coredump: unistd.h for STDIN_FILENO

8 days agoTEST-54-CREDS: add test case for credential dir masking 39651/head
Mike Yuan [Sun, 9 Nov 2025 17:22:26 +0000 (18:22 +0100)] 
TEST-54-CREDS: add test case for credential dir masking

8 days agorun: make sure we send out READY=1 when --wait
Mike Yuan [Sun, 9 Nov 2025 19:14:01 +0000 (20:14 +0100)] 
run: make sure we send out READY=1 when --wait

Let's skip bus_wait_for_jobs_one() when --wait as well,
as it surpasses the start job and allows for
run_context_check_started() to fire.

8 days agocore/namespace: hide the correct credentials tree when running in user scope
Mike Yuan [Sat, 8 Nov 2025 00:59:01 +0000 (01:59 +0100)] 
core/namespace: hide the correct credentials tree when running in user scope

8 days agoprofile: skip setting PS0 when PROMPT_COMMAND= is cleared
Yu Watanabe [Sun, 9 Nov 2025 18:31:32 +0000 (03:31 +0900)] 
profile: skip setting PS0 when PROMPT_COMMAND= is cleared

Fixes #39639.