]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
5 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

5 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

5 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>
5 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

5 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)

5 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

5 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.

5 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.

6 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

6 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

7 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.

7 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.

7 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

7 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'
```

7 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)

7 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.

8 days agoservice: setup credentials for ExecCondition
Maximilian Bosch [Sat, 8 Nov 2025 18:16:50 +0000 (19:16 +0100)] 
service: setup credentials for ExecCondition

Closes #35788

This gives access to credentials within ExecCondition=. As described in
ticket #35788, I do have a use-case for this and as noted in the
commit that dropped this[1], this is OK to be revisited if there are
use-cases.

[1] a145623bc403e410f41808a8e5cb31d29a52567c

8 days agocore/import-creds: trivial modernizations (#39652)
Yu Watanabe [Sun, 9 Nov 2025 20:26:37 +0000 (05:26 +0900)] 
core/import-creds: trivial modernizations (#39652)

8 days agolabeler: catch up with recent changes (#39653)
Mike Yuan [Sun, 9 Nov 2025 19:25:45 +0000 (20:25 +0100)] 
labeler: catch up with recent changes (#39653)

8 days agolabaler: add "shell profile" 39653/head
Mike Yuan [Sun, 9 Nov 2025 17:57:20 +0000 (18:57 +0100)] 
labaler: add "shell profile"

8 days agolabeler: match per-user machined units too
Mike Yuan [Sun, 9 Nov 2025 17:57:01 +0000 (18:57 +0100)] 
labeler: match per-user machined units too

8 days agolabeler: be more specific when matching for "import"
Mike Yuan [Sun, 9 Nov 2025 17:56:15 +0000 (18:56 +0100)] 
labeler: be more specific when matching for "import"

8 days agocore/import-creds: use RET_GATHER 39652/head
Mike Yuan [Wed, 11 Sep 2024 15:21:30 +0000 (17:21 +0200)] 
core/import-creds: use RET_GATHER

8 days agocore/import-creds: use FOREACH_ARRAY at one more place
Mike Yuan [Wed, 11 Sep 2024 15:20:50 +0000 (17:20 +0200)] 
core/import-creds: use FOREACH_ARRAY at one more place

8 days agocore/import-creds: rename import_credentials_context_free() to _done()
Mike Yuan [Wed, 11 Sep 2024 15:15:19 +0000 (17:15 +0200)] 
core/import-creds: rename import_credentials_context_free() to _done()

This is allocated on stack, hence rename as per our coding style.
While at it, make sure the struct name is consistent with funcs.

8 days agorepart: Correctly handle btrfs compression (#39597)
Yu Watanabe [Sun, 9 Nov 2025 16:52:19 +0000 (01:52 +0900)] 
repart: Correctly handle btrfs compression (#39597)

systemd-repart is incorrectly choosing the loop-mount
code path to copy files after formatting, instead of using the --rootdir
path, which is required by mkfs.btrfs to apply compression (since it's
on files, not the fs).

So two fixes (and an integ test):

1. If Btrfs compression is requested without a root directory (e.g.,
Compression= without CopyFiles=), we now log a warning and skip the
--compress flag. This prevents the mkfs.btrfs failure, and it's
meaningless anyway without any files.
2. The logic in repart now uses the --rootdir code path whenever the
partition is btrfs and compression is requested. Otherwise it still
won't work even in the legitimate case because use the loop mounting
code, which is too late to use --compress.

Fixes: https://github.com/systemd/systemd/issues/39584
8 days agotest: Add integration test for btrfs compression in repart 39597/head
Chris Down [Thu, 6 Nov 2025 15:36:19 +0000 (23:36 +0800)] 
test: Add integration test for btrfs compression in repart

Add testcase_btrfs_compression() to verify that btrfs partitions with
Compression= and CopyFiles= directives work correctly.

The test verifies the fix for issue #39584, where mkfs.btrfs would fail
with "ERROR: --compression must be used with --rootdir" when repart
tried to create compressed btrfs filesystems.

The test creates a partition definition with Format=btrfs,
Compression=zstd, and CopyFiles=, then validates:

1. systemd-repart output shows "Rootdir from:" and "Compress:",
   confirming that the --rootdir code path is used
2. mkfs.btrfs is invoked with both --compress and --rootdir options
3. The file is successfully copied to the filesystem
4. Compression is actually applied (verified via compsize output
   containing "zstd")

8 days agobpf-compat: coding style cleanups
Yu Watanabe [Sun, 9 Nov 2025 01:22:23 +0000 (10:22 +0900)] 
bpf-compat: coding style cleanups

8 days agoreread-partition-table: fix error code check
Yu Watanabe [Sun, 9 Nov 2025 01:14:11 +0000 (10:14 +0900)] 
reread-partition-table: fix error code check

flock() sets EAGAIN rather than EBUSY when a node is already locked.

Follow-up for d8e38d4aaac23cb27cc7e0f410449c3a6034db4f.
Fixes #39544.

8 days agolibarchive-util: several cleanups
Yu Watanabe [Sat, 8 Nov 2025 23:44:25 +0000 (08:44 +0900)] 
libarchive-util: several cleanups

- use loop for checking existence of functions,
- rename HAVE_LIBARCHIVE_XYZ -> HAVE_ARCHIVE_XYZ to make them match with
  the function name,
- do not conditionally include user-util.h in libarchive-util.h,
- sort library function symbols.

8 days agomeson: several cleanups (#39644)
Yu Watanabe [Sun, 9 Nov 2025 09:05:22 +0000 (18:05 +0900)] 
meson: several cleanups (#39644)

9 days agomeson: refuse to build when gcrypt support is enabled bu libgpg-error not found 39644/head
Yu Watanabe [Sun, 9 Nov 2025 00:20:41 +0000 (09:20 +0900)] 
meson: refuse to build when gcrypt support is enabled bu libgpg-error not found

Follow-up for 066e603ac641e22b1827ce36c9d55311fa44be6e.

9 days agomeson: drop redundant HAVE_ZLIB check
Yu Watanabe [Sat, 8 Nov 2025 20:42:18 +0000 (05:42 +0900)] 
meson: drop redundant HAVE_ZLIB check

ENABLE_IMPORTD requires HAVE_ZLIB, and it is already checked at the very
beginning of the file.

9 days agoREADME: align features after 'for'
Yu Watanabe [Sat, 8 Nov 2025 19:53:46 +0000 (04:53 +0900)] 
README: align features after 'for'

9 days agoREADME: memory_hugetlb_accounting is since kernel v6.7
Yu Watanabe [Sat, 8 Nov 2025 19:52:14 +0000 (04:52 +0900)] 
README: memory_hugetlb_accounting is since kernel v6.7

https://github.com/torvalds/linux/commit/8cba9576df601c384abd334a503c3f6e1e29eefb

9 days agonsresource: allow multiple userns from the same process in parallel
Lennart Poettering [Thu, 6 Nov 2025 09:46:58 +0000 (10:46 +0100)] 
nsresource: allow multiple userns from the same process in parallel

When generating a name for a transient userns automatically we so far
just included our PID to make it unique. That doens't really work if
multiple userns shall be kept in parallel by a single process. Let's hence
include a counter as well.

9 days agoimport: various smaller tweaks and fixes, preparation for OCI download support in...
Lennart Poettering [Sat, 8 Nov 2025 17:31:11 +0000 (18:31 +0100)] 
import: various smaller tweaks and fixes, preparation for OCI download support in importd (#39620)

9 days agopull-job: port .payload field to struct iovec 39620/head
Lennart Poettering [Fri, 7 Nov 2025 12:52:38 +0000 (13:52 +0100)] 
pull-job: port .payload field to struct iovec

struct iovec is really how we should encode any form of arbitrary blob
data

9 days agopull-job: use http_status_etag_exists() at a second place
Lennart Poettering [Thu, 6 Nov 2025 08:32:22 +0000 (09:32 +0100)] 
pull-job: use http_status_etag_exists() at a second place

9 days agopull: there's no need to keep the downloaded image in memory, except for the sha256su...
Lennart Poettering [Wed, 5 Nov 2025 21:28:08 +0000 (22:28 +0100)] 
pull: there's no need to keep the downloaded image in memory, except for the sha256sums/gpg file

This seems to be a mistake, in place since the first commit: we only
want the downloaded data in memory if this is a sha256sums or gpg file,
which we need to prorcess ourselves.

9 days agopull: use ASSERT_PTR() to shorten code a tiny bit
Lennart Poettering [Wed, 5 Nov 2025 21:27:33 +0000 (22:27 +0100)] 
pull: use ASSERT_PTR() to shorten code a tiny bit

9 days agopull: now that PullJob can verify expected digests, let's rely on it for tar/raw...
Lennart Poettering [Wed, 5 Nov 2025 21:24:01 +0000 (22:24 +0100)] 
pull: now that PullJob can verify expected digests, let's rely on it for tar/raw pulling

Instead of authenticating the downloaded image explicity in the tar and
in the raw downloader, we can now rely on the checksum checking in the
generic PullJob code. Hence do so: drop tep the checksum field from
TarPull and RawPull, and just initialized the ->expected_checksum in the
relevant PullJob instead.

9 days agopull-job: optionally store an expected checksum in PullJob object
Lennart Poettering [Wed, 5 Nov 2025 16:45:09 +0000 (17:45 +0100)] 
pull-job: optionally store an expected checksum in PullJob object

9 days agoimport: rework pull logic to store download digests in binary form rather than string
Lennart Poettering [Wed, 5 Nov 2025 16:31:24 +0000 (17:31 +0100)] 
import: rework pull logic to store download digests in binary form rather than string

We generally want to store data in parsed form, not formatted form,
hence let's follow our own rules on this, and store the message digest
as "struct iovec" rather than as string. This is generally more
efficient and safer, simply because of case issues.

9 days agopull-job: optionally take expected content length and compare it with what we are...
Lennart Poettering [Wed, 5 Nov 2025 15:58:09 +0000 (16:58 +0100)] 
pull-job: optionally take expected content length and compare it with what we are downloading

9 days agopull-job: always implicitly NUL terminate downloaded payload stored in memory
Lennart Poettering [Wed, 5 Nov 2025 15:48:24 +0000 (16:48 +0100)] 
pull-job: always implicitly NUL terminate downloaded payload stored in memory

Just as a safety measure, let's always NUL terminate what we are
downloading, maybe future code will parse it as string, and is sloppy by
accident.

(We have similar logic in read_full_file(), and I think it's a really
good rule, to always implicitly NUL terminate blobs we acquire that
might very well be used as text later on)

10 days agomeson: drop dangling reference to gcrypt
Mike Yuan [Sat, 8 Nov 2025 01:09:59 +0000 (02:09 +0100)] 
meson: drop dangling reference to gcrypt

... which was also a typo ;)

Follow-up for e9d4b88b817b9711291d8734cffdd4faf94b584a

10 days agomeson: sysupdate requires systemd-pull and friends
Yu Watanabe [Fri, 7 Nov 2025 22:01:11 +0000 (07:01 +0900)] 
meson: sysupdate requires systemd-pull and friends

Fixes #39635.

10 days agocore/execute: morph exec_output_is_* to _forward_to_*
Mike Yuan [Fri, 7 Nov 2025 16:57:58 +0000 (17:57 +0100)] 
core/execute: morph exec_output_is_* to _forward_to_*

Follow-up for 379d9ae222c52f93692e06d5b33fb341791b9688

After the commit, the functions are only used to determine
whether journals shall be forwarded to selected targets,
hence rename as such and remove effectively unused condition
on EXEC_OUTPUT_TTY.

10 days agotest: rotate journal before invocation test
Luca Boccassi [Fri, 7 Nov 2025 20:12:47 +0000 (20:12 +0000)] 
test: rotate journal before invocation test

Occasionally there are truncated journals failing this test:

[  884.181701] H TEST-04-JOURNAL.sh[12104]: ++ journalctl --no-hostname -n 1 -t bash --invocation=fe8122a7d8eb42c7bf357ac5fafa95e1
[  884.181749] H TEST-04-JOURNAL.sh[12091]: + assert_in 'invocation 1 fe8122a7d8eb42c7bf357ac5fafa95e1' 'Nov 06 17:27:10 bash[11985]: invocation 1 fe8122a7d8eb42c7bf357ac5fafa95e1'
[  884.181773] H TEST-04-JOURNAL.sh[12105]: + set +ex
[  884.181819] H TEST-04-JOURNAL.sh[12091]: + read -r idx invocation _
[  884.181819] H TEST-04-JOURNAL.sh[12091]: + i=2
[  884.181865] H TEST-04-JOURNAL.sh[12106]: ++ journalctl --no-hostname -n 1 -t bash --invocation=2 -u invocation-id-test-20992
[  884.181865] H TEST-04-JOURNAL.sh[12106]: Journal file /var/log/journal/936183a66e7c47939693ae37a967e4fd/system.journal is truncated, ignoring file.
[  884.181865] H TEST-04-JOURNAL.sh[12106]: No journal entry found for the invocation (+2).
[  884.181952] H TEST-04-JOURNAL.sh[12091]: + assert_in 'invocation 2 07d0bd6b5c654b148541d798abccaa96' ''
[  884.181972] H TEST-04-JOURNAL.sh[12107]: + set +ex
[  884.181972] H TEST-04-JOURNAL.sh[12107]: FAIL: 'invocation 2 07d0bd6b5c654b148541d798abccaa96' not found in:

Rotate it at the beginning of the test case to try and avoid this.

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

10 days agocore: assign TTY to PAM context when TTYPath= is specified
Yu Watanabe [Fri, 7 Nov 2025 16:03:12 +0000 (01:03 +0900)] 
core: assign TTY to PAM context when TTYPath= is specified

Fixes #38486 again, which was fixed by
1405d46bf998b5a4b6f572a14ac88890828a405d, but regressed again by
f875a8026ec2dfa6026da3ee216782e9f7c04a43.

This also make it use exec_input_is_terminal().

Follow-up for f875a8026ec2dfa6026da3ee216782e9f7c04a43.