]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
6 weeks agoboot: let's make the one space we output early on invisible 39026/head
Lennart Poettering [Fri, 19 Sep 2025 13:32:29 +0000 (15:32 +0200)] 
boot: let's make the one space we output early on invisible

let's place the cursor at the beginning of the line before/after, so we
know it's the first char we overwrite, and we return to the front again
right after.

6 weeks agoboot: return to beginning of line when enrolling
Lennart Poettering [Fri, 19 Sep 2025 13:31:53 +0000 (15:31 +0200)] 
boot: return to beginning of line when enrolling

6 weeks agoboot: work around ansi color issues between sd-boot, uefi and terminals
Lennart Poettering [Fri, 19 Sep 2025 12:54:08 +0000 (14:54 +0200)] 
boot: work around ansi color issues between sd-boot, uefi and terminals

So, UEFI's color texting is a bit weird. It translates everything to
ANSI sequences, but unlike ANSI sequences it has no understanding of a
distinct "default" bg/fg color, it assumes the ansi color "0" is always
equal to white on black, but that's of course not really true, most
terminal emulators at the very least support white background too.

tianocore then also tries to be smart and suppresses ANSI color changes
from a color to itself. But if the understanding of the color is wrong
in the first place, then any color change suppression like this hurts
more than it helps.

Then in addition there are certain terminal tools that will reset the bg
color on every line break ("less" for example) to the default.

Let's deal with that and improve the situation on all fronts:

1. force out color changes by doing two color changes whenever we really
   want it.

2. on every newline force out the color change again.

with this in place, using sd-boot on a terminal emulator is a lot nicer.

6 weeks agolibacl → turn into dlopen() dependency (#39087)
Yu Watanabe [Wed, 24 Sep 2025 09:25:20 +0000 (18:25 +0900)] 
libacl → turn into dlopen() dependency (#39087)

6 weeks agomeasure: strip tpm 1.x remnants and make GetActivePcrBanks() work (#39089)
Yu Watanabe [Wed, 24 Sep 2025 09:14:09 +0000 (18:14 +0900)] 
measure: strip tpm 1.x remnants and make GetActivePcrBanks() work (#39089)

Let's never bother with old TPM 1.x structures, they are not mentioned
in the TCG for TPM2 spec at all. However, the spec does say we should
check the Size field of the relevant structs, before accessing them,
hence do that.

Use that to determine the version of the protocol, before accessing
GetActiveBanks().

Alternative to: #39034
Fixes: #38932
Follow-up to: 6eab4cd44c3c43698dcfc2c3bc8cd31ed610a812

6 weeks agoudev-builtin-net_id: Add DeviceTree-based names for WLAN devices (#39060)
Yu Watanabe [Wed, 24 Sep 2025 09:10:27 +0000 (18:10 +0900)] 
udev-builtin-net_id: Add DeviceTree-based names for WLAN devices (#39060)

Add support for generating names like wldN based on DeviceTree aliases.

DeviceTree alias names follow de facto conventions. As of writing, there
are so far two ways WLAN devices are represented in DeviceTree aliases
in upstream Linux DTS files:

- Firstly, as wifi0, used for example in t600x-j314-j316.dtsi
- Secondly, as ethernet0 or ethernet1, used for example in
sun8i-q8-common.dtsi, with a comment saying the reason is to "Make
u-boot set mac-address for wifi without an eeprom"

So we need to handle both while generating names. Refactor most of the
logic in names_devicetree() into a helper
names_devicetree_alias_prefix() that takes an alias_prefix instead of
hardcoding "ethernet", and, in the new names_devicetree():

- For prefix "en", use alias_prefix "ethernet"
- For prefix "wl", try alias_prefix "wifi" first, and if that was not
found, fall back to alias_prefix "ethernet"

Since this is a naming scheme change, also gate this behind
NAMING_DEVICETREE_ALIASES_WLAN and NAMING_V259, and document this
change.

6 weeks agoacl: turn libacl dep into a dlopen() one 39087/head
Lennart Poettering [Tue, 23 Sep 2025 09:46:49 +0000 (11:46 +0200)] 
acl: turn libacl dep into a dlopen() one

I initially didn't think it would be worth doing this, but I changed my
mind. People out there quite successfully build systemd without ACL
support, and that suggests life without it is quite possible. Moreover
we only use it as very specific places:

1. in udev/logind for "uaccess" mgmt
2. in tmpfiles to implement explicitly configured acl changes
3. in journald/coredump/pstore to manage access to unpriv users
4. in pid1 to manage access to credential files
5. when shifting UIDs of container trees

I specific container environments it should be entirely fine to live without all
of these, hence let's pull this in on demand only.

6 weeks agotree-wide: drop deps on libacl
Lennart Poettering [Tue, 23 Sep 2025 09:44:44 +0000 (11:44 +0200)] 
tree-wide: drop deps on libacl

test-shift-uid.c doesn't actually use anything from libacl. It all goes
through shared/, and the dep there is enough.

Same for the coredump stuffi, logind and core/.

And pstore doesn't use it at all, neither directly or indirectly.

6 weeks agocleanup: add cleanup func macro that renames the function
Lennart Poettering [Tue, 23 Sep 2025 09:43:43 +0000 (11:43 +0200)] 
cleanup: add cleanup func macro that renames the function

This is useful when having to add a "sym_" prefix to functions

6 weeks agoboot: check protocol version before assuming GetActiveBanks() exists 39089/head
Lennart Poettering [Tue, 23 Sep 2025 11:42:02 +0000 (13:42 +0200)] 
boot: check protocol version before assuming GetActiveBanks() exists

Alternative to: #39034
Fixes: #38932
Follow-up to: 6eab4cd44c3c43698dcfc2c3bc8cd31ed610a812

6 weeks agomeasure: strip tpm 1.x remnants
Lennart Poettering [Tue, 23 Sep 2025 11:18:56 +0000 (13:18 +0200)] 
measure: strip tpm 1.x remnants

Let's never bother with old TPM 1.x structures, they are not mentioned
in the TCG for TPM2 spec at all. However, the spec does say we should
check the Size field of the relevant structs, before accessing them,
hence do that.

6 weeks agofs-util: prefer glibc's fchmodat() if possible
Luca Boccassi [Tue, 23 Sep 2025 22:13:23 +0000 (23:13 +0100)] 
fs-util: prefer glibc's fchmodat() if possible

Since v2.39 glibc's fchmodat() will call into the kernel's fchmodat2()
if flags are passed:

https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=65341f7bbea824d2ff9d37db15d8be162df42bd3;hp=c52c2c32db15aba8bbe1a0b4d3235f97d9c1a525

On older versions, if the flag is anything other than AT_SYMLINK_NOFOLLOW,
it returns EINVAL, so we can detect it and call the kernel syscall directly
ourselves.

Using the glibc wrappers when possible is prefereable so that programs
like fakeroot can intercept its calls and redirect them.

Follow-up for adecfb3bc0be0def49433277fcad5333893756cc

6 weeks agodocs: add a governance document
Lennart Poettering [Tue, 23 Sep 2025 15:01:13 +0000 (17:01 +0200)] 
docs: add a governance document

Since there have been disagreements on certain aspects of the technical
direction, let's clear things up, and introduce a governance document,
taking inspiration from:

https://github.com/uapi-group/uapi-group.github.io/blob/main/content/_index.md#governance

6 weeks agomkosi: update debian commit reference to 49dd9371a0c0dd08c7847c5885722eab88ac279f
Luca Boccassi [Tue, 23 Sep 2025 22:31:20 +0000 (23:31 +0100)] 
mkosi: update debian commit reference to 49dd9371a0c0dd08c7847c5885722eab88ac279f

49dd9371a0 d/rules: Ubuntu moved vmlinux.h too
c81ce364eb Install new files for upstream build
35abaf33bc Override more Lintian warnings about appstream
a3d3690c45 Override Lintian warning for appstream-metadata-missing-modalias-provide
1bcda1fd90 Override Lintian warning for binaries-have-file-conflict
c597c00ffc Drop versioned conflicts added for bullseye upgrades
9cd845af25 Override lintian warnings for conflicts-with-version
359da95d09 Override Lintian warning for spare-manual-page
3ef8c31cb2 Override Lintian warning for groff-message
dbe51582a9 Update changelog for 258-1 release
ffd971a27d autopkgtest: ensure /usr/sbin is in the PATH for unit-tests job
f086b8e881 autopkgtest: enable debug logs for unit-tests job
02142b9eae autopkgest: install dosfstools for test-loop-block
0319d890bd salsa-ci: enable ppc64el builds
645b1fa318 autopkgtest: use -20 instead of -22 for zstd compression
b8dc9b0ce7 salsa-ci: switch to recommended entry point yml
152a2b3140 autopkgtest: set default_device_timeout_sec=240
6d46436878 autopkgtest: manually compress logs on failure
c6c70bbb0c Update changelog for 258~rc4-1 release
2695112df7 Update changelog for 258~rc3-1 release
2c293cb2be systemd-boot: update version for rm_conffile

6 weeks agoudev-builtin-net_id: Add DeviceTree-based names for WLAN devices 39060/head
dramforever [Fri, 19 Sep 2025 13:52:00 +0000 (21:52 +0800)] 
udev-builtin-net_id: Add DeviceTree-based names for WLAN devices

Add support for generating names like wldN based on DeviceTree aliases.

DeviceTree alias names follow de facto conventions. As of writing, there
are so far two ways WLAN devices are represented in DeviceTree aliases
in upstream Linux DTS files:

- Firstly, as wifi0, used for example in t600x-j314-j316.dtsi
- Secondly, as ethernet0 or ethernet1, used for example in
  sun8i-q8-common.dtsi, with a comment saying the reason is to "Make
  u-boot set mac-address for wifi without an eeprom"

Therefore for prefix "wl", try alias_prefix "wifi" first, and if that
was not found, fall back to alias_prefix "ethernet"

Since this is a naming scheme change, also gate this behind
NAMING_DEVICETREE_ALIASES_WLAN and NAMING_V259, and document this
change.

6 weeks agoudev-builtin-net_id: Refactor names_devicetree() to avoid hardcoding
dramforever [Fri, 19 Sep 2025 13:52:00 +0000 (21:52 +0800)] 
udev-builtin-net_id: Refactor names_devicetree() to avoid hardcoding

Refactor most of the logic in names_devicetree() into a helper
names_devicetree_alias_prefix() that takes an alias_prefix instead of
hardcoding "ethernet".

The return value names_devicetree_alias_prefix() will be used in further
commits to allow for alias_prefix fallback.

6 weeks agotest: use relative paths to executables
Yu Watanabe [Sun, 21 Sep 2025 13:10:21 +0000 (22:10 +0900)] 
test: use relative paths to executables

This also makes shebang always use env command, and drops unnecessary
'bash -c' or 'sh -c' when a signle command is invoked in the shell,
like sleep or echo.

6 weeks agoudev,login: update ACL on static device nodes (#39071)
Lennart Poettering [Tue, 23 Sep 2025 12:27:36 +0000 (14:27 +0200)] 
udev,login: update ACL on static device nodes (#39071)

Fixes regression caused by #36444.
Fixes #39043.

6 weeks agologin: update ACL on static device nodes again 39071/head
Yu Watanabe [Tue, 23 Sep 2025 01:17:47 +0000 (10:17 +0900)] 
login: update ACL on static device nodes again

In the commit c960ca2be1cfd183675df581f049a0c022c1c802, the logic of
updating ACL on device node was moved from logind to udevd, but at that
time, mistakenly removed the logic for static nodes.

Fixes a regression caused by c960ca2be1cfd183675df581f049a0c022c1c802 (v258).
Fixes #39043.

6 weeks agoudev: move devnode_acl() back to libshared
Yu Watanabe [Tue, 23 Sep 2025 00:56:09 +0000 (09:56 +0900)] 
udev: move devnode_acl() back to libshared

This effectively reverts 1abb592f2f886913492e4967cc96816c167177a9.
No functional change, preparation for the next commit.

6 weeks agoboot: add support for overriding key enrollement timeout
Igor Opaniuk [Thu, 18 Sep 2025 15:49:32 +0000 (17:49 +0200)] 
boot: add support for overriding key enrollement timeout

Currently, a 15-second timeout is hardcoded for the key enrollment
process while waiting for user confirmation. Make this value configurable
to allow the option of disabling user input, such as during automatic key
provisioning at the factory.

Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
6 weeks agoFix sd_bus_can_send signature in manpage
Joshua Krusell [Tue, 23 Sep 2025 09:21:51 +0000 (11:21 +0200)] 
Fix sd_bus_can_send signature in manpage

6 weeks agorepart: add a very basic varlink interface (#39072)
Lennart Poettering [Tue, 23 Sep 2025 08:46:50 +0000 (10:46 +0200)] 
repart: add a very basic varlink interface (#39072)

This is split out of https://github.com/systemd/systemd/pull/38764.

It adds a very basic Varlink API to repart. Not the actual
repartitioning APIs, but simply a call to get a list of candidate
devices.

A very basic test case is added too.

Other commits from #38764 add the repartitioning API, but let's do that
in a separate PR.

6 weeks agotest: add simple testcase for io.systemd.Repart.ListCandidateDevices 39072/head
Lennart Poettering [Mon, 22 Sep 2025 10:19:42 +0000 (12:19 +0200)] 
test: add simple testcase for io.systemd.Repart.ListCandidateDevices

6 weeks agoblockdev-list,repart: optionally hide zero-size block devices
Lennart Poettering [Fri, 5 Sep 2025 12:23:12 +0000 (14:23 +0200)] 
blockdev-list,repart: optionally hide zero-size block devices

Block devices with removable media (e.g. SD card readers) indicate a
missing medium with a zero size. Optionally ignore such block devices
that carry no medium currently.

6 weeks agoblockdev-list,repart: optionally, filter list of candidate block device and remove...
Lennart Poettering [Thu, 28 Aug 2025 09:18:16 +0000 (11:18 +0200)] 
blockdev-list,repart: optionally, filter list of candidate block device and remove OS root disk

6 weeks agorepart: add basic Varlink support, for now only with a ListCandidateDevices() call
Lennart Poettering [Thu, 28 Aug 2025 09:19:41 +0000 (11:19 +0200)] 
repart: add basic Varlink support, for now only with a ListCandidateDevices() call

6 weeks agoblockdev-list: also pick up block device size
Lennart Poettering [Thu, 28 Aug 2025 08:56:06 +0000 (10:56 +0200)] 
blockdev-list: also pick up block device size

6 weeks agoblockdev-list: optionally return finds as list instead of writing it to stdout
Lennart Poettering [Thu, 28 Aug 2025 08:40:42 +0000 (10:40 +0200)] 
blockdev-list: optionally return finds as list instead of writing it to stdout

6 weeks agosd-device: add device_get_sysattr_u64() helper
Lennart Poettering [Thu, 28 Aug 2025 08:52:56 +0000 (10:52 +0200)] 
sd-device: add device_get_sysattr_u64() helper

6 weeks agoTwo follow-ups for dlopen()-ification (#39078)
Luca Boccassi [Mon, 22 Sep 2025 23:13:13 +0000 (00:13 +0100)] 
Two follow-ups for dlopen()-ification (#39078)

6 weeks agocore/systemd.pc: do not add new non-underscored vars
Mike Yuan [Mon, 22 Sep 2025 17:15:57 +0000 (19:15 +0200)] 
core/systemd.pc: do not add new non-underscored vars

Follow-up for 346b7b6b4931fc6bee9e820e0160dd024a86ed52

The old style was deprecated in
4908de44b0a0409f84a7cdc5641b114d6ce8ba03.

6 weeks agopam-util,libaudit-util: strip "lib" prefix from dlopen "feature" field 39078/head
Mike Yuan [Mon, 22 Sep 2025 15:38:57 +0000 (17:38 +0200)] 
pam-util,libaudit-util: strip "lib" prefix from dlopen "feature" field

As per our usual coding style.

6 weeks agopam-util: fix build without PAM
Mike Yuan [Mon, 22 Sep 2025 16:53:12 +0000 (18:53 +0200)] 
pam-util: fix build without PAM

Follow-up for 882c9ce0402ec6e37201628a9a361500ff39b1ed
Prompted by #39077

Note that HAVE_PAM ifdeffery in pam-util.c is removed,
since its build as a whole is conditioned out if
!HAVE_PAM in shared/meson.build.

6 weeks agojournal: fix two recent regressions in config handling (#39069)
Yu Watanabe [Mon, 22 Sep 2025 17:43:03 +0000 (02:43 +0900)] 
journal: fix two recent regressions in config handling (#39069)

Fixes #39046.
Fixes #39057.

6 weeks agolibaudit-util: fix build with audit disabled
Antonio Alvarez Feijoo [Mon, 22 Sep 2025 15:27:27 +0000 (17:27 +0200)] 
libaudit-util: fix build with audit disabled

```
In file included from ../src/test/test-dlopen-so.c:21:
../src/test/test-dlopen-so.c: In function ‘run’:
../src/test/test-dlopen-so.c:53:23: error: implicit declaration of function ‘dlopen_libaudit’; did you mean ‘dlopen_libfido2’? [-Werror=implicit-function-declaration]
   53 |         ASSERT_DLOPEN(dlopen_libaudit, HAVE_AUDIT);
      |                       ^~~~~~~~~~~~~~~
../src/shared/tests.h:181:24: note: in definition of macro ‘ASSERT_OK’
  181 |                 typeof(expr) _result = (expr);                                                                  \
      |                        ^~~~
../src/test/test-dlopen-so.c:53:9: note: in expansion of macro ‘ASSERT_DLOPEN’
   53 |         ASSERT_DLOPEN(dlopen_libaudit, HAVE_AUDIT);
      |         ^~~~~~~~~~~~~
../src/test/test-dlopen-so.c:53:23: warning: nested extern declaration of ‘dlopen_libaudit’ [-Wnested-externs]
   53 |         ASSERT_DLOPEN(dlopen_libaudit, HAVE_AUDIT);
      |                       ^~~~~~~~~~~~~~~
../src/shared/tests.h:181:24: note: in definition of macro ‘ASSERT_OK’
  181 |                 typeof(expr) _result = (expr);                                                                  \
      |                        ^~~~
../src/test/test-dlopen-so.c:53:9: note: in expansion of macro ‘ASSERT_DLOPEN’
   53 |         ASSERT_DLOPEN(dlopen_libaudit, HAVE_AUDIT);
      |         ^~~~~~~~~~~~~

```

Follow-up for 4d8c5c657ae0829f93944a00302e7ce700913e54

6 weeks agojournal: make JournalConfig.set_audit as enum 39069/head
Yu Watanabe [Mon, 22 Sep 2025 06:22:48 +0000 (15:22 +0900)] 
journal: make JournalConfig.set_audit as enum

In systemd <= 257, each set_audit tristate value had special meaning,
- true: enable the kernel audit subsystem,
- false: disable the kernel audit subsystem,
- negative: keep the current kernel audit subsystem state.

And the default is true, rather than negative. So, users sometimes
explicitly pass an empty string to Audit= setting to keep the state.

But since f48cf2a96dfdc23fe30ba0f870125fe55cab64c7 (v258), the negative
value is mistakenly used as 'really unspecified' even if an empty string
is explicitly specified.

This makes negative values handled as unspecified as usual, and assign a new
positive value AUDIT_KEEP for when an empty string is explicitly specified.
Also, make the Audit= setting accept "keep" setting, and suggest to use "keep"
rather than an empty string.

Fixes a regression caused by f48cf2a96dfdc23fe30ba0f870125fe55cab64c7 (v258).
Fixes #39057.

6 weeks agojournal: add missing initialization
Yu Watanabe [Mon, 22 Sep 2025 06:52:04 +0000 (15:52 +0900)] 
journal: add missing initialization

Otherwise, SplitMode= in journald.conf is always ignored.

Fixes a regression caused by f48cf2a96dfdc23fe30ba0f870125fe55cab64c7 (v258).
Fixes #39046.

6 weeks agopkgconf: expose variables for system-alloc-{uid,gid}-min
Markus Boehme [Wed, 27 Aug 2025 20:49:29 +0000 (22:49 +0200)] 
pkgconf: expose variables for system-alloc-{uid,gid}-min

Expose variables for system-alloc-uid-min and system-alloc-gid-min
similar to the UID/GID ranges already exposed for the respective
maximums, and other UID/GID ranges.

6 weeks agonspawn: don't try to connect to D-Bus when it's not necessary (#39045)
Aleksandr Mezin [Mon, 22 Sep 2025 10:59:38 +0000 (13:59 +0300)] 
nspawn: don't try to connect to D-Bus when it's not necessary (#39045)

`runtime_bus` is only used if `!arg_keep_unit`.

`system_bus` is additionally used if `arg_register`.

So for `!arg_register && arg_keep_unit`, none of them should be
necessary, and nspawn should be able to work without any D-Bus
connections.

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

Follow-up for f2f26f1527529b1ea7dcb0dba85456ac98800627

6 weeks agozsh-completion: add completion for `freeze`, `thaw`, `condstop`
雪叶 [Sat, 20 Sep 2025 15:03:35 +0000 (23:03 +0800)] 
zsh-completion: add completion for `freeze`, `thaw`, `condstop`

6 weeks agoman/systemd-notify: add a note on return value
Christian Hesse [Fri, 19 Sep 2025 15:04:53 +0000 (17:04 +0200)] 
man/systemd-notify: add a note on return value

The options `--booted` is compared with the command `systemctl
is-system-running`, but the return values have differnt meanings and it
is not a drop-in.

6 weeks agoptyfwd: reset tty when exiting
Lennart Poettering [Fri, 19 Sep 2025 12:50:53 +0000 (14:50 +0200)] 
ptyfwd: reset tty when exiting

Let's do a "soft" reset of the TTY when a ptyfwd session ends. This is a
good idea, in order to reset changes to the scrolling window that code
inside the session might have made. A "soft" reset will undo this.

While we are at it, make sure to output the ansi sequences for this
*after* terminating any half-written line, as that is still somewhat
contents of the session, even if it's augmented.

6 weeks agoglyph-util: add missing ascii represenations of some emojis
Lennart Poettering [Fri, 19 Sep 2025 14:27:44 +0000 (16:27 +0200)] 
glyph-util: add missing ascii represenations of some emojis

6 weeks agodissect-image: simplification
Lennart Poettering [Sat, 20 Sep 2025 06:40:25 +0000 (08:40 +0200)] 
dissect-image: simplification

6 weeks agoFollow-ups for recent changes to creds (#39040)
Yu Watanabe [Sun, 21 Sep 2025 19:54:57 +0000 (04:54 +0900)] 
Follow-ups for recent changes to creds (#39040)

6 weeks agomachine: fix crash on update from older than v258
Yu Watanabe [Sun, 21 Sep 2025 15:45:14 +0000 (00:45 +0900)] 
machine: fix crash on update from older than v258

UID entry in the machine state file is introduced in v258,
hence when a host is upgraded to v258, the field does not exist in the
file, thus the variable 'uid' is NULL.

Follow-up for 276d20018623ef14956ce87975be48da5de63f29.
Fixes #39061.

6 weeks agocore/exec-credential: don't enable graceful for load_credential() 39040/head
Mike Yuan [Fri, 19 Sep 2025 22:42:43 +0000 (00:42 +0200)] 
core/exec-credential: don't enable graceful for load_credential()

Follow-up for 4be269563db777bb30f2609b3d4f5180fe9e2d2a

This contradicts the logic described in commit msg.

6 weeks agocore/exec-credential: log about errno
Mike Yuan [Fri, 19 Sep 2025 22:42:12 +0000 (00:42 +0200)] 
core/exec-credential: log about errno

6 weeks agocreds: uniformly use varlink error table
Mike Yuan [Fri, 19 Sep 2025 22:32:54 +0000 (00:32 +0200)] 
creds: uniformly use varlink error table

Follow-up for ffd4b3809681b940d7d1fb9bc64502306c0a3e7e

6 weeks agosd-device: use RET_GATHER() in device_tag_index() (#39053)
anthisfan [Sun, 21 Sep 2025 12:39:35 +0000 (21:39 +0900)] 
sd-device: use RET_GATHER() in device_tag_index() (#39053)

Replace manual error collection with RET_GATHER() macro.

6 weeks agomeson: fix type in comment
Lennart Poettering [Sat, 20 Sep 2025 06:41:56 +0000 (08:41 +0200)] 
meson: fix type in comment

As per https://github.com/systemd/systemd/pull/38999#discussion_r2363704203

6 weeks agopam: make libpam a dlopen() based dependency
Lennart Poettering [Mon, 8 Sep 2025 14:04:23 +0000 (16:04 +0200)] 
pam: make libpam a dlopen() based dependency

6 weeks agocore/manager: honor show_status_overridden in manager_watch_jobs_next_time()
Mike Yuan [Fri, 19 Sep 2025 17:35:08 +0000 (19:35 +0200)] 
core/manager: honor show_status_overridden in manager_watch_jobs_next_time()

Prompted by #39029

6 weeks agorun: include sys/stat.h again
Yu Watanabe [Fri, 19 Sep 2025 16:36:58 +0000 (01:36 +0900)] 
run: include sys/stat.h again

This partially reverts 9adb4685dffadb3991535a8d990ce35132b6d9a6.

For the case that sys/stat.h is not included indirectly by other headers.
Fixes the following error:
```
../src/run/run.c: In function 'fchown_to_capsule':
../src/run/run.c:2128:21: error: storage size of 'st' isn't known
 2128 |         struct stat st;
      |                     ^~
```

6 weeks agolibaudit-util: fix typo
Yu Watanabe [Fri, 19 Sep 2025 20:14:22 +0000 (05:14 +0900)] 
libaudit-util: fix typo

Follow-up for 4d8c5c657ae0829f93944a00302e7ce700913e54.

7 weeks agoVarious smaller tweaks to bootctl (#38996)
Yu Watanabe [Fri, 19 Sep 2025 19:28:00 +0000 (04:28 +0900)] 
Various smaller tweaks to bootctl (#38996)

7 weeks agocore: console status fixes (#39029)
Mike Yuan [Fri, 19 Sep 2025 18:30:11 +0000 (20:30 +0200)] 
core: console status fixes (#39029)

7 weeks agosmall refactorings of the machine-credential code (#38982)
Lennart Poettering [Fri, 19 Sep 2025 16:28:39 +0000 (18:28 +0200)] 
small refactorings of the machine-credential code (#38982)

This is ultimately preparation for #38764, but makes a lot of sense on
its own.

7 weeks agobootctl: split out auto-enroll cert load code into function of its own 38996/head
Lennart Poettering [Wed, 3 Sep 2025 10:20:32 +0000 (12:20 +0200)] 
bootctl: split out auto-enroll cert load code into function of its own

7 weeks agobootctl: output a more precise log message when updating existing EFI vars
Lennart Poettering [Wed, 3 Sep 2025 08:38:59 +0000 (10:38 +0200)] 
bootctl: output a more precise log message when updating existing EFI vars

7 weeks agobootctl: don't update $ESP/EFI/BOOTX64.EFI twice
Lennart Poettering [Tue, 2 Sep 2025 20:44:35 +0000 (22:44 +0200)] 
bootctl: don't update $ESP/EFI/BOOTX64.EFI twice

We update BOOTX64.EFI explicitly once (because we know that it's the
main entry point of UEFI) and then a second time when we update
everything in $ESP/EFI/*.EFI. That's redundant and pretty ugly/confusing
in the log output. Hence exclude the file we already updated explicitly
from the 2nd run.

7 weeks agobootctl: downgrade messages about foreign EFI files
Lennart Poettering [Tue, 2 Sep 2025 20:41:48 +0000 (22:41 +0200)] 
bootctl: downgrade messages about foreign EFI files

Given that we iterate through $ESP/EFI/BOOT/*.EFI these days this is a
pretty common case, hence it's not really noteworthy, hence downgrade
these log messages from LOG_NOTICE to LOG_INFO.

7 weeks agobootctl: split out varlink setup into a helper call of its own
Lennart Poettering [Sat, 30 Aug 2025 20:50:59 +0000 (22:50 +0200)] 
bootctl: split out varlink setup into a helper call of its own

7 weeks agobootctl: normalize some enum definitions
Lennart Poettering [Wed, 3 Sep 2025 09:48:39 +0000 (11:48 +0200)] 
bootctl: normalize some enum definitions

7 weeks agobootctl: use RET_GATHER() all over the place
Lennart Poettering [Wed, 3 Sep 2025 09:45:22 +0000 (11:45 +0200)] 
bootctl: use RET_GATHER() all over the place

7 weeks agobootctl: switch a few getenv() calls to secure_getenv()
Lennart Poettering [Wed, 3 Sep 2025 09:31:30 +0000 (11:31 +0200)] 
bootctl: switch a few getenv() calls to secure_getenv()

Following the rule that we should always prefer the secure flavour over
the regular one unless there's a clear reason for the regular one, let's
switch this over. Better safe than sorry.

7 weeks agorepart: some smaller tweaks (#38995)
Lennart Poettering [Fri, 19 Sep 2025 15:43:52 +0000 (17:43 +0200)] 
repart: some smaller tweaks (#38995)

7 weeks agodlopen() libaudit (#38998)
Lennart Poettering [Fri, 19 Sep 2025 15:43:33 +0000 (17:43 +0200)] 
dlopen() libaudit (#38998)

Split out of #38861

7 weeks agocore: fix status output suppression 39029/head
Lennart Poettering [Fri, 19 Sep 2025 08:13:45 +0000 (10:13 +0200)] 
core: fix status output suppression

This fixes two things: first of all it ensures we take the override
status output field properly into account, instead of going directly to
the regular one.

Moreover, it ensures that we bypass auto for both notice + emergency,
since both have the same "impact", and, don't limit this for notice
only.

7 weeks agounit: line-break overly long parameter list + add assert()
Lennart Poettering [Fri, 19 Sep 2025 08:12:52 +0000 (10:12 +0200)] 
unit: line-break overly long parameter list + add assert()

7 weeks agojob: shorten code
Lennart Poettering [Fri, 19 Sep 2025 08:12:13 +0000 (10:12 +0200)] 
job: shorten code

7 weeks agomachine-credential: add low-level machine_credential_add() as common back-end for... 38982/head
Lennart Poettering [Thu, 18 Sep 2025 07:20:00 +0000 (09:20 +0200)] 
machine-credential: add low-level machine_credential_add() as common back-end for machine_credential_set() + machine_credential_load()

7 weeks agomachine-credential: replace machine_credentials_contains() by machine_credential_find()
Lennart Poettering [Thu, 18 Sep 2025 07:19:28 +0000 (09:19 +0200)] 
machine-credential: replace machine_credentials_contains() by machine_credential_find()

7 weeks agomachine-credential: include the high-level not the low-level string-util.h
Lennart Poettering [Thu, 18 Sep 2025 07:18:59 +0000 (09:18 +0200)] 
machine-credential: include the high-level not the low-level string-util.h

7 weeks agorepart: tweak byte value output 38995/head
Lennart Poettering [Tue, 9 Sep 2025 20:52:45 +0000 (22:52 +0200)] 
repart: tweak byte value output

So far, when outputing information about copy progress we'd suppress the
digit after the dot if it is zero. That makes the progress bar a bit
"jumpy", because sometimes there are two more character cells used than
other times. Let's just always output one digit after the dot here
hence, to avoid this.

7 weeks agorepart: add some line breaks
Lennart Poettering [Thu, 28 Aug 2025 08:54:41 +0000 (10:54 +0200)] 
repart: add some line breaks

7 weeks agorepart: never use a grain size below sector size
Lennart Poettering [Fri, 29 Aug 2025 08:42:33 +0000 (10:42 +0200)] 
repart: never use a grain size below sector size

7 weeks agoopenssl-util: make openssl_load_private_key()'s ret_ui parameter optional
Lennart Poettering [Wed, 3 Sep 2025 08:40:21 +0000 (10:40 +0200)] 
openssl-util: make openssl_load_private_key()'s ret_ui parameter optional

7 weeks agoaudit: shortcut some audit syscalls if we are compiled without audit support anyway 38998/head
Lennart Poettering [Mon, 8 Sep 2025 13:28:00 +0000 (15:28 +0200)] 
audit: shortcut some audit syscalls if we are compiled without audit support anyway

7 weeks agobuild: make libaudit dep dlopen()
Lennart Poettering [Mon, 8 Sep 2025 10:26:35 +0000 (12:26 +0200)] 
build: make libaudit dep dlopen()

7 weeks agocore: Expose oom kills and managed oom kills as properties (#38906)
Daan De Meyer [Fri, 19 Sep 2025 14:19:19 +0000 (16:19 +0200)] 
core: Expose oom kills and managed oom kills as properties (#38906)

It can be useful for users to know this information so let's expose it
as properties so it can be queried.

7 weeks agotree-wide: Remove unused includes (#39023)
Daan De Meyer [Fri, 19 Sep 2025 14:07:04 +0000 (16:07 +0200)] 
tree-wide: Remove unused includes (#39023)

7 weeks agotree-wide: Remove unused includes 39023/head
Daan De Meyer [Fri, 19 Sep 2025 09:31:11 +0000 (11:31 +0200)] 
tree-wide: Remove unused includes

7 weeks agotest: Add tests for systemd's kernel oom kill handling 38906/head
Daan De Meyer [Thu, 18 Sep 2025 08:18:17 +0000 (10:18 +0200)] 
test: Add tests for systemd's kernel oom kill handling

7 weeks agocore: Expose oom kills and managed oom kills as properties
Daan De Meyer [Fri, 12 Sep 2025 12:14:26 +0000 (14:14 +0200)] 
core: Expose oom kills and managed oom kills as properties

It can be useful for users to know this information so let's expose
it as properties so it can be queried.

7 weeks agocore: Use oom_group_kill attribute if OOMPolicy=kill
Daan De Meyer [Thu, 18 Sep 2025 07:59:10 +0000 (09:59 +0200)] 
core: Use oom_group_kill attribute if OOMPolicy=kill

For managed oom kills, we check the user.oomd_ooms property which
reports how many times systemd-oomd recursively killed the entire
cgroup. For kernel OOM kills, we check the oom_kill property from
memory.events which reports how many processes were killed by the
kernel OOM killer in the corresponding cgroup and its child cgroups.
For units with Delegate=yes, this is problematic, becase OOM kills
in child cgroups that were handled by the delegated unit will still
be treated as unit OOM kills by systemd.

Specifically, if systemd is managing the delegated cgroup and
memory.oom.group=1 is set on both the service cgroup and the child
cgroup, if the child cgroup is OOM killed and this is handled by systemd
running inside the delegated units, when the unit exits later, it will
still be treated as oom-killed because oom_kill in memory.events will
contain the OOM kills that happened in the child cgroup.

To allow addressing this, the oom_group_kill property was added to the
memory.events and memory.events.local files which allows reading how many
times the entire cgroup was oom killed by the kernel if memory.oom.group=1.
If we read this from memory.events.local, we know how many times the unit's
entire cgroup (plus child cgroups) got oom killed by the kernel. This matches
what we report for systemd-oomd managed oom kills and avoids reporting the
unit as oom-killed if a child cgroup was oom killed by the kernel due to
having memory.oom.group=1 set on it.

Since this is only available from kernel 5.12 onwards, we fall back to
reading the oom_kill field from memory.events if the oom_group_kill property
is not available.

7 weeks agomkosi: Add stress-ng to sanitizer wrapper programs
Daan De Meyer [Fri, 19 Sep 2025 11:54:37 +0000 (13:54 +0200)] 
mkosi: Add stress-ng to sanitizer wrapper programs

7 weeks agoman/varlink: fix typo
Yu Watanabe [Fri, 19 Sep 2025 11:25:24 +0000 (20:25 +0900)] 
man/varlink: fix typo

Follow-up for 04e2cb892878574b4e5715a22c2901c34762cff6.

7 weeks agoman/repart: fix typo
Yu Watanabe [Fri, 19 Sep 2025 11:24:06 +0000 (20:24 +0900)] 
man/repart: fix typo

Follow-up for 49dcc89ddc15651ebca8da7a13e5c5b08ec247cb.

7 weeks agocreds-util: fix typo
Yu Watanabe [Fri, 19 Sep 2025 11:23:02 +0000 (20:23 +0900)] 
creds-util: fix typo

Follow-up for 9be0a94b9848096ad465eb3fc76fa9adc7118ab6.

7 weeks agovarlink: flag -> flags
Yu Watanabe [Fri, 19 Sep 2025 11:21:19 +0000 (20:21 +0900)] 
varlink: flag -> flags

Follow-up for 86fd19af1461bf407938dc69d2d0d4b54ac2c059.

7 weeks agodocs: use '_' as separator for OSC page
Luca Boccassi [Fri, 19 Sep 2025 10:41:30 +0000 (11:41 +0100)] 
docs: use '_' as separator for OSC page

Make it consistent with other pages

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

7 weeks agovirt: revert to detect chroot by comparing with / rather than /proc/PID/root
Mike Yuan [Thu, 18 Sep 2025 23:16:19 +0000 (01:16 +0200)] 
virt: revert to detect chroot by comparing with / rather than /proc/PID/root

This partially reverts d6267b9b18a30c81dd3335230ef71af04e1ea330

So, arch-chroot currently uses a rather cursed setup:
it sets up a PID namespace, but mounts /proc/ from the outside
into the chroot tree, and then call chroot(2), essentially
making it somewhere between chroot(8) and a full-blown
container. Hence, the PID dirs in /proc/ reveal the outer world.
The offending commit switched chroot detection to compare
/proc/1/root and /proc/OUR_PID/root, exhibiting the faulty behavior
where the mentioned environment now gets deemed to be non-chroot.

Now, this is very much an issue in arch-chroot. However,
if /proc/ is to be properly associated with the pidns,
then we'd treat it as a container and no longer a chroot.
Also, the previous logic feels more readable and more
honestly reported errors in proc_mounted(). Hence I opted
for reverting the change here. Still note that the culprit
(once again :/) lies in the arch-chroot's pidns impl, not
systemd.

Fixes https://gitlab.archlinux.org/archlinux/packaging/packages/systemd/-/issues/54

7 weeks agofirewall-util: remove iptables/libiptc backend support (#38976)
Yu Watanabe [Fri, 19 Sep 2025 10:54:17 +0000 (19:54 +0900)] 
firewall-util: remove iptables/libiptc backend support (#38976)

This removes iptables/libiptc backend support in firewall-util, as
already announced by 5c68c51045c27d77b7afc211df7304a958d8cf24.
Then, this drops meaningless `FirewallContext` wrapper.

7 weeks agoinclude: Add missing IWYU pragmas
Daan De Meyer [Fri, 19 Sep 2025 09:30:12 +0000 (11:30 +0200)] 
include: Add missing IWYU pragmas

7 weeks agotree-wide: Fix two curl warnings
Daan De Meyer [Fri, 19 Sep 2025 09:29:36 +0000 (11:29 +0200)] 
tree-wide: Fix two curl warnings

7 weeks agovarious: port remaining users of setmntent() to libmount (#38929)
Lennart Poettering [Fri, 19 Sep 2025 07:26:06 +0000 (09:26 +0200)] 
various: port remaining users of setmntent() to libmount (#38929)

7 weeks agovarious tweaks for systemd-creds & related (#38979)
Yu Watanabe [Fri, 19 Sep 2025 07:21:12 +0000 (16:21 +0900)] 
various tweaks for systemd-creds & related (#38979)

7 weeks agochase: tweaks to chase_open()/chase_openat() (#38984)
Yu Watanabe [Fri, 19 Sep 2025 07:11:24 +0000 (16:11 +0900)] 
chase: tweaks to chase_open()/chase_openat() (#38984)