]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
5 weeks agobuild(deps): bump ninja from 1.11.1.4 to 1.13.0 in /.github/workflows dependabot/pip/dot-github/workflows/ninja-1.13.0 39183/head
dependabot[bot] [Thu, 2 Oct 2025 08:28:52 +0000 (08:28 +0000)] 
build(deps): bump ninja from 1.11.1.4 to 1.13.0 in /.github/workflows

Bumps [ninja](https://github.com/scikit-build/ninja-python-distributions) from 1.11.1.4 to 1.13.0.
- [Release notes](https://github.com/scikit-build/ninja-python-distributions/releases)
- [Changelog](https://github.com/scikit-build/ninja-python-distributions/blob/master/HISTORY.rst)
- [Commits](https://github.com/scikit-build/ninja-python-distributions/compare/1.11.1.4...1.13.0)

---
updated-dependencies:
- dependency-name: ninja
  dependency-version: 1.13.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
5 weeks agobuild(deps): bump ossf/scorecard-action from 2.4.2 to 2.4.3
dependabot[bot] [Wed, 1 Oct 2025 09:02:06 +0000 (09:02 +0000)] 
build(deps): bump ossf/scorecard-action from 2.4.2 to 2.4.3

Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.4.2 to 2.4.3.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/05b42c624433fc40578a4040d5cf5e36ddca8cde...4eaacf0543bb3f2c246792bd56e8cdeffafb205a)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-version: 2.4.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
5 weeks agobuild(deps): bump meson from 1.8.3 to 1.9.1 in /.github/workflows
dependabot[bot] [Wed, 1 Oct 2025 09:02:18 +0000 (09:02 +0000)] 
build(deps): bump meson from 1.8.3 to 1.9.1 in /.github/workflows

Bumps [meson](https://github.com/mesonbuild/meson) from 1.8.3 to 1.9.1.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/1.8.3...1.9.1)

---
updated-dependencies:
- dependency-name: meson
  dependency-version: 1.9.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
5 weeks agounits/systemd-battery-check.service: minor cleanup (#39178)
Yu Watanabe [Tue, 30 Sep 2025 18:54:00 +0000 (20:54 +0200)] 
units/systemd-battery-check.service: minor cleanup (#39178)

5 weeks agounits/systemd-battery-check.service: split [Unit] options into groups 39178/head
Mike Yuan [Tue, 30 Sep 2025 14:32:48 +0000 (16:32 +0200)] 
units/systemd-battery-check.service: split [Unit] options into groups

5 weeks agounits/systemd-battery-check.service: prettify Description=
Mike Yuan [Tue, 30 Sep 2025 14:32:14 +0000 (16:32 +0200)] 
units/systemd-battery-check.service: prettify Description=

Addresses https://github.com/systemd/systemd/pull/39170#issuecomment-3348997894

5 weeks agoSeveral more timezone related cleanups (#39160)
Mike Yuan [Tue, 30 Sep 2025 13:40:40 +0000 (15:40 +0200)] 
Several more timezone related cleanups (#39160)

Continuation of #38876.

5 weeks agotest: store and compare just the property value
Frantisek Sumsal [Mon, 29 Sep 2025 14:11:27 +0000 (16:11 +0200)] 
test: store and compare just the property value

Follow-up for 5730a400fd5ee82566fe03eb832121a0d4bc26b6.

5 weeks agounits: move FailureAction= to the correct section
Yu Watanabe [Mon, 29 Sep 2025 13:26:54 +0000 (22:26 +0900)] 
units: move FailureAction= to the correct section

FailureAction= in [Service] is still supported but deprecated.

Follow-up for e3d4148d50909119c4e9327e6ad96d3ca7f4661a.

5 weeks agohomectl firstboot tweaks (#39137)
Lennart Poettering [Mon, 29 Sep 2025 08:56:27 +0000 (10:56 +0200)] 
homectl firstboot tweaks (#39137)

This adds what #39101 and #39070 did for the regular firstboot wizard
but for the homectl firstboot part: i.e. port to the generic prompt
loop, show the "chrome" bars, and mute the console.

And then it also makes querying for aux groups and shells optional,
because quite frankly, i am not sure what to answer there.

5 weeks agovmspawn: enable qemu guest agent with --console=gui
Luca Boccassi [Sat, 27 Sep 2025 15:46:12 +0000 (16:46 +0100)] 
vmspawn: enable qemu guest agent with --console=gui

For auto resolution scaling, etc

5 weeks agopo: Translated using Weblate (Khmer (Central))
kanitha chim [Sun, 28 Sep 2025 10:07:55 +0000 (10:07 +0000)] 
po: Translated using Weblate (Khmer (Central))

Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: kanitha chim <kchim@redhat.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/km/
Translation: systemd/main

5 weeks agotree-wide: stop assigning colon prefixed timezone to $TZ 39160/head
Yu Watanabe [Sun, 28 Sep 2025 01:19:08 +0000 (10:19 +0900)] 
tree-wide: stop assigning colon prefixed timezone to $TZ

glibc (and also musl, though we do not officially support it yet)
silently ignores colon prefix in $TZ. Let's always not prefix the
timezone.

tzset(3) states:
> A nonempty value of TZ can be one of two formats, either of which can
> be preceded by a colon which is ignored.

Addresses https://github.com/systemd/systemd/pull/38876#discussion_r2384347594.

5 weeks agotimedatectl,test: use SAVE_TIMEZONE at more places
Yu Watanabe [Sun, 28 Sep 2025 01:10:47 +0000 (10:10 +0900)] 
timedatectl,test: use SAVE_TIMEZONE at more places

5 weeks agocalendar-spec: use SAVE_TIMEZONE
Yu Watanabe [Sun, 28 Sep 2025 01:09:44 +0000 (10:09 +0900)] 
calendar-spec: use SAVE_TIMEZONE

Then, we can avoid heavy fork() operation.

5 weeks agosd-boot: fix indentation of status output
Felix Pehla [Sat, 27 Sep 2025 18:46:09 +0000 (20:46 +0200)] 
sd-boot: fix indentation of status output

64376936c70ac1cba18fcdcaec8eb337d80c48a7 missed some printf()s when
adjusting indentation.

5 weeks agotime-util: fix using wrong timezone when parsing timestamp (#38876)
Yu Watanabe [Sun, 28 Sep 2025 00:49:10 +0000 (09:49 +0900)] 
time-util: fix using wrong timezone when parsing timestamp (#38876)

This mostly fixes issues workarounded several times, e.g. #28472 and
#35471.

5 weeks agobash-completion: systemd-sysext/systemd-confext missing options (#38948)
Yu Watanabe [Sun, 28 Sep 2025 00:48:13 +0000 (09:48 +0900)] 
bash-completion: systemd-sysext/systemd-confext missing options (#38948)

5 weeks agovmspawn: try to set up swtpm state for 4K RSA keys support
Luca Boccassi [Fri, 26 Sep 2025 22:54:02 +0000 (23:54 +0100)] 
vmspawn: try to set up swtpm state for 4K RSA keys support

The next version of swtpm will support RSA4096, but it needs to be called
with a new parameter in order to do so. Try with it first, and if
execution fails, fallback to running without it.

This is especially needed for OBS builds, as the signing key is RSA4096
and cannot be changed by users, so the generated UKIs have RSA4096 signatures
for the pcrsig sections, and swtpm refuses them without the new support.

5 weeks agoVarious small cleanups (#39155)
Mike Yuan [Sat, 27 Sep 2025 15:22:57 +0000 (17:22 +0200)] 
Various small cleanups (#39155)

5 weeks agoRevert "Bump required minimum version of libfido2 to 1.5.0" and add missing def instead
Luca Boccassi [Thu, 18 Sep 2025 16:29:41 +0000 (17:29 +0100)] 
Revert "Bump required minimum version of libfido2 to 1.5.0" and add missing def instead

It helps nobody to break compatibility for a missing definition
for printing an error.
Just add the missing definition if not present, as it is already
done for thousands of others from the kernel, glibc, etc.

This partially reverts commit d8b60944f5f752a06ad1553ca77b04b7fea903e9.

5 weeks agoman/udev_enumerate_new: fix style 39155/head
Zbigniew Jędrzejewski-Szmek [Sat, 27 Sep 2025 13:28:18 +0000 (16:28 +0300)] 
man/udev_enumerate_new: fix style

Follow-up for 4f4641799e289ad5d0c149004972470ce7961551.

5 weeks agossh-generator: adjust formatting
Zbigniew Jędrzejewski-Szmek [Tue, 16 Sep 2025 14:51:02 +0000 (16:51 +0200)] 
ssh-generator: adjust formatting

5 weeks agocore/varlink: drop duplicated check
Zbigniew Jędrzejewski-Szmek [Wed, 3 Sep 2025 14:08:19 +0000 (16:08 +0200)] 
core/varlink: drop duplicated check

Those are static functions that are only called from manager_varlink_init
which already does the same check.

5 weeks agoshared/generator: fix grammar in comment
Zbigniew Jędrzejewski-Szmek [Tue, 5 Aug 2025 12:02:01 +0000 (14:02 +0200)] 
shared/generator: fix grammar in comment

5 weeks agocore/cgroup: drop useless wrapper
Zbigniew Jędrzejewski-Szmek [Tue, 29 Jul 2025 09:04:30 +0000 (11:04 +0200)] 
core/cgroup: drop useless wrapper

5 weeks agoethtool-util: several cleanups for applying link settings (#38879)
Daan De Meyer [Sat, 27 Sep 2025 12:31:11 +0000 (14:31 +0200)] 
ethtool-util: several cleanups for applying link settings (#38879)

5 weeks agotime-util: fix issues in parse_timestamp() and optimize performance 38876/head
Yu Watanabe [Tue, 9 Sep 2025 00:52:45 +0000 (09:52 +0900)] 
time-util: fix issues in parse_timestamp() and optimize performance

Previously, an input string ends with short timezone spec e.g. WET,
was parsed by setting $TZ environment variable to the timezone.
But the timezone might be different from the original local timezone,
thus the result might not follow the timezone change in the original
local timezone.

This makes the check of the short timezone spec with tzname[] earlier,
then it is not necessary to load another timezone file for e.g. WET,
and provides expected time.

This also make it use SAVE_TIMEZONE macro and drop use of forking
process. This makes greatly improve performance when parsing string
that contains timezone different from the current local timezone.

Unfortunately, there is still one corner case that our test fails.
When tzdata is built with rearguard enabled, then at least
Africa/Windhoek timezone does not provide correct time, but time shifted
1 hour from the original.

5 weeks agotime-util: introduce parse_gmtoff() helper function
Yu Watanabe [Tue, 9 Sep 2025 00:50:46 +0000 (09:50 +0900)] 
time-util: introduce parse_gmtoff() helper function

5 weeks agotime-util: introduce SAVE_TIMEZONE macro
Yu Watanabe [Tue, 9 Sep 2025 00:36:07 +0000 (09:36 +0900)] 
time-util: introduce SAVE_TIMEZONE macro

5 weeks agopam_systemd: correct alignment
Mike Yuan [Fri, 26 Sep 2025 22:58:54 +0000 (00:58 +0200)] 
pam_systemd: correct alignment

Follow-up for cf2630acaa87ded5ad99ea30ed4bd895e71ca503

5 weeks agoshared: add missing alloc-util.h include
Xarblu [Fri, 26 Sep 2025 19:40:50 +0000 (21:40 +0200)] 
shared: add missing alloc-util.h include

Needed for _cleanup_free_

5 weeks agoman: add missing description for udev_enumerate_new functions
Osama Abdelkader [Fri, 26 Sep 2025 18:34:53 +0000 (21:34 +0300)] 
man: add missing description for udev_enumerate_new functions

Add proper description section for udev_enumerate_new(), udev_enumerate_ref(),
and udev_enumerate_unref() functions. The description matches the source code
comments for consistency.

Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
5 weeks agopam_systemd: honor session class provided via PAM environment
Michal Sekletar [Mon, 25 Aug 2025 13:09:36 +0000 (15:09 +0200)] 
pam_systemd: honor session class provided via PAM environment

Replaces #38638

Co-authored-by: Lennart Poettering <lennart@poettering.net>
5 weeks agobash-completion: update systemd-sysext, systemd-confext 38948/head
Pascal Bachor [Fri, 26 Sep 2025 18:20:49 +0000 (20:20 +0200)] 
bash-completion: update systemd-sysext, systemd-confext

5 weeks agosysext: support --mutable=help
Pascal Bachor [Fri, 26 Sep 2025 18:20:31 +0000 (20:20 +0200)] 
sysext: support --mutable=help

5 weeks agodocs(boot): fix typo in code block
Le_Futuriste [Fri, 26 Sep 2025 14:41:19 +0000 (16:41 +0200)] 
docs(boot): fix typo in code block

5 weeks agoTEST-64-UDEV-STORAGE: do not use -f/--force option for wipefs
Yu Watanabe [Sun, 31 Aug 2025 00:30:22 +0000 (09:30 +0900)] 
TEST-64-UDEV-STORAGE: do not use -f/--force option for wipefs

When -f/--force is used, wipefs does not call ioctl(BLKRRPART), hence
the partitions will remain in sysfs. Let's not use the option.

This also makes it use 'udevadm lock' for safety.

5 weeks agofirstboot: don't talk about any 'new' installation 39137/head
Lennart Poettering [Fri, 19 Sep 2025 13:55:49 +0000 (15:55 +0200)] 
firstboot: don't talk about any 'new' installation

The firstboot interface might pop-up also during live mode (because it's
just very useful to have the right kbd mapping applied), and that's
hardly a "new installation". Hence use more generic terms

5 weeks agofirstboot: optionally, don't query for keymap unless connected to a real VT
Lennart Poettering [Fri, 19 Sep 2025 13:42:32 +0000 (15:42 +0200)] 
firstboot: optionally, don't query for keymap unless connected to a real VT

The keymap only really matters if there's local access to a system, i.e.
if there's actually a physical kbd directly connected to it, to apply it
to. If during firstboot we are not talked to via a VT (but via SSH,
container, or hypervisor console or so instead), then it's very unlikely
we ever are. Hence, don't ask for a keymap, and let#s shortcut the
questions asked at boot.

5 weeks agofirstboot: drop waiting for key when starting
Lennart Poettering [Fri, 19 Sep 2025 08:17:00 +0000 (10:17 +0200)] 
firstboot: drop waiting for key when starting

We only show this blurb on the first question, but the first question is
interactive anyway, hence no need to wait for input first explicitly, we
won't progress anyway without user input.

(similar for homectl's firstboot)

5 weeks agohomectl: port to prompt_loop()
Lennart Poettering [Fri, 19 Sep 2025 13:02:51 +0000 (15:02 +0200)] 
homectl: port to prompt_loop()

5 weeks agohomectl: mute console while running firstboot prompts
Lennart Poettering [Fri, 19 Sep 2025 08:22:49 +0000 (10:22 +0200)] 
homectl: mute console while running firstboot prompts

5 weeks agohomectl: show blue 'chrome' bar in first boot mode
Lennart Poettering [Fri, 19 Sep 2025 08:18:29 +0000 (10:18 +0200)] 
homectl: show blue 'chrome' bar in first boot mode

5 weeks agohomectl: make querying for shell+aux groups optional in firstboot mode
Lennart Poettering [Thu, 18 Sep 2025 06:54:36 +0000 (08:54 +0200)] 
homectl: make querying for shell+aux groups optional in firstboot mode

5 weeks agoman: document --prompt-new-user which was added back in v256
Lennart Poettering [Fri, 26 Sep 2025 14:09:02 +0000 (16:09 +0200)] 
man: document --prompt-new-user which was added back in v256

5 weeks agopam_systemd: downgrade OSC sequence writing at close to LOG_DEBUG
Lennart Poettering [Fri, 26 Sep 2025 10:30:54 +0000 (12:30 +0200)] 
pam_systemd: downgrade OSC sequence writing at close to LOG_DEBUG

Fixes: #39135
5 weeks agonetwork-generator: ip: do not fail on ntp value
Sebastian Gross [Fri, 26 Sep 2025 09:14:30 +0000 (11:14 +0200)] 
network-generator: ip: do not fail on ntp value

linux https://www.kernel.org/doc/html/latest/admin-guide/nfs/nfsroot.html
states `ntp0-ip` as parameter to `ip=` command line.

Until now systemd-network-generator would fail if ntp was provided with
-EINVAL due to trailing arguments.

Stay in line with kernel doc and handle ntp value properly.

5 weeks agoethtool-util: drop use of union ethtool_link_usettings 38879/head
Yu Watanabe [Tue, 2 Sep 2025 03:13:03 +0000 (12:13 +0900)] 
ethtool-util: drop use of union ethtool_link_usettings

Previously, we shift arrays on read and then shift back on write.
It is inefficient and not necessary.
Let's directly use the buffer that kernel provides as is.

5 weeks agoethtool-util: fix comment
Yu Watanabe [Tue, 2 Sep 2025 01:39:45 +0000 (10:39 +0900)] 
ethtool-util: fix comment

The very initial implementation sets cmd with zero when the bitmap
length does not match. But, it is fixed by
https://github.com/torvalds/linux/commit/793cf87de9d1a62dc9079c3ec5fcc01cfc62fafb

Fortunately, our code does not follow the outdated comment, but checks
cmd field correctly.

5 weeks agoethtool-util: rename functions and update log messages
Yu Watanabe [Tue, 2 Sep 2025 01:28:11 +0000 (10:28 +0900)] 
ethtool-util: rename functions and update log messages

5 weeks agoethtool-util: drop use of deprecated ETHTOOL_GSET and ETHTOOL_SSET
Yu Watanabe [Tue, 2 Sep 2025 01:21:51 +0000 (10:21 +0900)] 
ethtool-util: drop use of deprecated ETHTOOL_GSET and ETHTOOL_SSET

The methods are deprecated since kernel v4.20,
https://github.com/torvalds/linux/commit/9b3004953503462a4fab31b85e44ae446d48f0bd
and they are trivial wrapper of ETHTOOL_GLINKSETTINGS and ETHTOOL_SLINKSETTINGS,
respectively. Hence, the fallback logic is nowadays completely
meaningless. Let's drop them.

6 weeks agodissect: Add more debug logging (#39125)
Daan De Meyer [Fri, 26 Sep 2025 09:53:35 +0000 (11:53 +0200)] 
dissect: Add more debug logging (#39125)

6 weeks agodissect: Add more debug logging 39125/head
Daan De Meyer [Thu, 25 Sep 2025 18:05:36 +0000 (20:05 +0200)] 
dissect: Add more debug logging

6 weeks agossh-proxy: Add support for per user machined
Daan De Meyer [Fri, 26 Sep 2025 07:39:23 +0000 (09:39 +0200)] 
ssh-proxy: Add support for per user machined

Let's check both the per user machined and the system machined instead
of only the system machined. We give preference to the per user machined
and fall back to the system machined.

6 weeks agomute console kernel log/pid1 status output while firstboot is running (#39101)
Lennart Poettering [Fri, 26 Sep 2025 09:12:24 +0000 (11:12 +0200)] 
mute console kernel log/pid1 status output while firstboot is running (#39101)

This is also preparation for the installer later, split out of #38764.
It makes the experience a lot nicer if our nice little tools aren't
constantly interrupted by log spew from the kernel.

Fixes: #34448
6 weeks agolibselinux: turn into dlopen() dep
Lennart Poettering [Mon, 8 Sep 2025 16:31:49 +0000 (18:31 +0200)] 
libselinux: turn into dlopen() dep

6 weeks agoupdate TODO
Lennart Poettering [Mon, 8 Sep 2025 16:41:04 +0000 (18:41 +0200)] 
update TODO

6 weeks agoParse a new profile key in Type 1 boot entries
Itxaka [Tue, 23 Sep 2025 10:07:21 +0000 (12:07 +0200)] 
Parse a new profile key in Type 1 boot entries

This allows Type 1 entries to take advantage of multiprofile efi files
by allowing the configuration of the profile associated with that entry.

It will now parse the profile key in a Type 1 config to select that
profile when booting that efi file instead of relaying in the cmdline

Signed-off-by: Itxaka <itxaka@kairos.io>
6 weeks agofirstboot: get rid of pointless strjoina() 39101/head
Lennart Poettering [Fri, 26 Sep 2025 07:43:45 +0000 (09:43 +0200)] 
firstboot: get rid of pointless strjoina()

6 weeks agotest: add simple test case for mute-console service
Lennart Poettering [Wed, 24 Sep 2025 16:01:20 +0000 (18:01 +0200)] 
test: add simple test case for mute-console service

6 weeks agovarlinkctl: send READY=1 for --more calls once we received first reply
Lennart Poettering [Wed, 24 Sep 2025 16:01:04 +0000 (18:01 +0200)] 
varlinkctl: send READY=1 for --more calls once we received first reply

6 weeks agofirstboot: mute console while running on the console at boot
Lennart Poettering [Tue, 16 Sep 2025 07:27:07 +0000 (09:27 +0200)] 
firstboot: mute console while running on the console at boot

Fixes: #34448
6 weeks agoprompt-util: add client helper for muting the console
Lennart Poettering [Mon, 15 Sep 2025 20:36:17 +0000 (22:36 +0200)] 
prompt-util: add client helper for muting the console

6 weeks agomute-console: add simple varlink service that can disable log/status spew to kernel...
Lennart Poettering [Mon, 15 Sep 2025 16:19:22 +0000 (18:19 +0200)] 
mute-console: add simple varlink service that can disable log/status spew to kernel console

For "wizard" style interactive tools it's very annoying if they are
interrupted by kernel log output or PID1's status output. let's add some
infra to disable this temporarily. I decided to implement this as an IPC
service so that we can make this robust: if the client request the
muting dies we can automatically unmute again.

This is hence a tiny varlink service, but it can also be started
directly from the cmdline.

6 weeks agoshutdown: move printk changing code int generic code
Lennart Poettering [Mon, 15 Sep 2025 16:18:31 +0000 (18:18 +0200)] 
shutdown: move printk changing code int generic code

6 weeks agodissect: Add full stop to debug log messages in dissect_image()
Daan De Meyer [Fri, 26 Sep 2025 07:26:06 +0000 (09:26 +0200)] 
dissect: Add full stop to debug log messages in dissect_image()

6 weeks agomkosi: bump fedora from 42 to 43
Yu Watanabe [Thu, 25 Sep 2025 19:38:12 +0000 (04:38 +0900)] 
mkosi: bump fedora from 42 to 43

It seems
- the address sanitizer on fedora 42 reports false-positive, or
- probing partitions in libblkid 2.40.4 has a bug.

Not sure which causes the issue, but anyway the address sanitizer
kills udev-worker when sym_blkid_partition_get_name() is called
in udev-builtin-blkid.c.
```
systemd-udevd[488]: ==488==ERROR: AddressSanitizer: stack-buffer-underflow on address 0x7ffdd716e020 at pc 0x563e3ca66fcb bp 0x7ffdd716d970 sp 0x7ffdd716d968
systemd-udevd[488]: READ of size 8 at 0x7ffdd716e020 thread T0 ((udev-worker))
(snip)
systemd-udevd[488]: HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
systemd-udevd[488]:       (longjmp and C++ exceptions *are* supported)
systemd-udevd[488]: SUMMARY: AddressSanitizer: stack-buffer-underflow (/usr/bin/udevadm+0x187fca) (BuildId: 1fb56dbdf0447aba1185d6e34560b782b76098be)
(snip)
systemd-udevd[488]: Command: (udev-worker)
systemd-udevd[488]: ==488==ABORTING
```

Let's bump fedora from 42 to 43.

Fixes mkosi fedora 42 job failures after c349edfe49dc2c4b8a79e5d08ecf7c8e93c4c909.

6 weeks agonetworkd: fia xRequiredOperationalStateForOnline serializtion
Anton Tiurin [Mon, 15 Sep 2025 19:32:39 +0000 (12:32 -0700)] 
networkd: fia xRequiredOperationalStateForOnline serializtion

In integration tests (for example TEST-85-NETWORK-NetworkctlTests)

LINK_OPERSTATE_RANGE_INVALID and required_for_online == -1 are serialized as
```
"RequiredForOnline": "true",
"RequiredOperationalStateForOnline": [null, null]
```
Such link should be reported as required_for_online=False and not
serialize nulls.

6 weeks agonetworkctl: change bitrate format from 'bps' to 'Bps'
Anton Tiurin [Tue, 16 Sep 2025 20:58:56 +0000 (21:58 +0100)] 
networkctl: change bitrate format from 'bps' to 'Bps'

6 weeks agonspawn: free D-Bus error before fallback (#39131)
Luca Boccassi [Fri, 26 Sep 2025 05:00:48 +0000 (06:00 +0100)] 
nspawn: free D-Bus error before fallback (#39131)

Otherwise the next call fails:

Got message type=error sender=:1.5 destination=:1.470 path=n/a
    interface=n/a member=n/a cookie=151 reply_cookie=3 signature=s
    error-name=org.freedesktop.DBus.Error.UnknownMethod
    error-message=Unknown method CreateMachineEx or interface
    org.freedesktop.machine1.Manager. Assertion
'!bus_error_is_dirty(reterr_error)' failed at
    src/libsystemd/sd-bus/sd-bus.c:2396, function sd_bus_call(). Aborting.

Follow-up for d80af3b97b94e450a002ddac13874a953f0eab3e

6 weeks agocore: assorted fixes and cleanups for cgroup (#39094)
Yu Watanabe [Fri, 26 Sep 2025 04:56:25 +0000 (13:56 +0900)] 
core: assorted fixes and cleanups for cgroup (#39094)

6 weeks agotimer: fix unexpected triggering of service immediately after restart of a timer...
Yu Watanabe [Fri, 26 Sep 2025 00:51:36 +0000 (09:51 +0900)] 
timer: fix unexpected triggering of service immediately after restart of a timer (#38868)

Fixes: #31231
Fixes: #35805
6 weeks agocore/bpf-firewall: replace unnecessary unit_setup_cgroup_runtime() with unit_get_cgro... 39094/head
Yu Watanabe [Tue, 23 Sep 2025 19:45:21 +0000 (04:45 +0900)] 
core/bpf-firewall: replace unnecessary unit_setup_cgroup_runtime() with unit_get_cgroup_runtime()

Except for the test, bpf_firewall_compile() is only called by the following:
  cgroup_context_apply() -> cgroup_apply_firewall() -> bpf_firewall_compile()
and in the early stage of cgroup_context_apply(), it checks if the cgroup
runtime exists. Hence, it is not necessary to try to allocate the
runtime in bpf_firewall_compile().

6 weeks agocore/bpf-firewall: make failures in loading custom BPF program not critical
Yu Watanabe [Tue, 23 Sep 2025 21:02:22 +0000 (06:02 +0900)] 
core/bpf-firewall: make failures in loading custom BPF program not critical

All other resource control features work as 'best-effort', and failures
in applying them are handled gracefully. However, unlike the other features,
we tested if the BPF programs can be loaded and refuse execution on failure.

Moreover, the previous behavior of testing loading BPF programs had
inconsistency: the test was silently skipped if the cgroup for the unit does
not exist yet, but tested when the cgroup already exists.

Let's not handle failures in loading custom BPF programs as critical, but
gracefully ignore them, like we do for the other resource control features.

Follow-up for fab347489fcfafbc8367c86afc637ce1b81ae59e.

6 weeks agocore/unit: fail earlier before spawning executor when we failed to realize cgroup
Yu Watanabe [Tue, 23 Sep 2025 20:29:22 +0000 (05:29 +0900)] 
core/unit: fail earlier before spawning executor when we failed to realize cgroup

Before 23ac08115af83e3a0a937fa207fc52511aba2ffa, even if we failed to
create the cgroup for a unit, a cgroup runtime object for the cgroup is
created with the cgroup path. Hence, the creation of cgroup is failed,
execution of the unit will fail in posix_spawn_wrapper() and logged
something like the following:
```
systemd[1]: testservice.service: Failed to create cgroup /testslice.slice/testservice.service: Cannot allocate memory
systemd[1]: testservice.service: Failed to spawn executor: No such file or directory
systemd[1]: testservice.service: Failed to spawn 'start' task: No such file or directory
systemd[1]: testservice.service: Failed with result 'resources'.
systemd[1]: Failed to start testservice.service.
```

However, after the commit, when we failed to create the cgroup, a cgroup
runtime object is not created, hence NULL will be assigned to
ExecParameters.cgroup_path in unit_set_exec_params().
Hence, the unit process will be invoked in the init.scope.
```
systemd[1]: testservice.service: Failed to create cgroup /testslice.slice/testservice.service: Cannot allocate memory
systemd[1]: Starting testservice.service...
cat[1094]: 0::/init.scope
systemd[1]: testservice.service: Deactivated successfully.
systemd[1]: Finished testservice.service.
```
where the test service calls 'cat /proc/self/cgroup'.

To fix the issue, let's fail earlier when we failed to create cgroup.

Follow-up for 23ac08115af83e3a0a937fa207fc52511aba2ffa (v258).

6 weeks agolibmount: make dlopen() dependency
Lennart Poettering [Wed, 24 Sep 2025 20:36:30 +0000 (22:36 +0200)] 
libmount: make dlopen() dependency

6 weeks agomachined: introduce per-user instance (#39123)
Yu Watanabe [Thu, 25 Sep 2025 23:16:18 +0000 (08:16 +0900)] 
machined: introduce per-user instance (#39123)

This is the first part of #38728, just the machined stuff, no the
importd stuff.

This definitely makes sense of its own, hence let's get this in first.

The original PR contains a tescase that tests machined + importd in
combination. This PR here hence is without a testcase, but it's there,
just in the other PR.

This looks large and is large, but do note that much of the machined
changes are very repetitive: they conditionalize PK checks to the system
version, as PK doesn't make sense in the use rversion.

6 weeks agocore/cgroup: make sure deserialized accounting data is not voided (#39130)
Yu Watanabe [Thu, 25 Sep 2025 22:54:48 +0000 (07:54 +0900)] 
core/cgroup: make sure deserialized accounting data is not voided (#39130)

6 weeks agoman: fix typo
Yu Watanabe [Thu, 25 Sep 2025 22:23:56 +0000 (07:23 +0900)] 
man: fix typo

Follow-up for 73ee723aa77bfb9f9988b80228b646d65d1770b2.

6 weeks agointegration tests: do not adjust log level in the test script
Yu Watanabe [Wed, 24 Sep 2025 15:46:35 +0000 (00:46 +0900)] 
integration tests: do not adjust log level in the test script

We passes log level through kernel command line. It is not necessary to
set to debug level at the beginning, and set to info at the end.
This is important when a test has several subtests. If a subtest sets
log level to info at the end, then subsequent tests may not generate any
useful logs.

6 weeks agolibseccomp: fix build error
Matteo Croce [Thu, 25 Sep 2025 19:48:26 +0000 (21:48 +0200)] 
libseccomp: fix build error

When HAVE_SECCOMP is not set, a build error happens:

../src/analyze/analyze-security.c: In function ‘get_security_info’:
../src/analyze/analyze-security.c:2449:13: error: unused variable ‘r’ [-Werror=unused-variable]
 2449 |         int r;
      |             ^
cc1: some warnings being treated as errors

Fix it by removing the sometimes unused variable.

6 weeks agocore/cgroup: make sure deserialized accounting data is not voided 39130/head
Mike Yuan [Thu, 25 Sep 2025 20:28:33 +0000 (22:28 +0200)] 
core/cgroup: make sure deserialized accounting data is not voided

Currently, cgroup_path is (de-)serialized after all the cached
accounting data. This is bogus though, since unit_set_cgroup_path()
destroys the CGroupRuntime object and starts afresh, discarding
all deserialized values. This matters especially for IP accounting,
whose BPF maps get recreated on reload/reexec and the previous values
are exclusively retrievable from deserialization. Let's hence swap things
around and serialize cgroup_path first, accounting data only afterwards.

6 weeks agocore/cgroup: realign macro line continuation
Mike Yuan [Thu, 25 Sep 2025 20:33:19 +0000 (22:33 +0200)] 
core/cgroup: realign macro line continuation

6 weeks agomachined: make image locking runtime scope aware, too 39123/head
Lennart Poettering [Tue, 15 Jul 2025 15:21:52 +0000 (17:21 +0200)] 
machined: make image locking runtime scope aware, too

We cannot create an image lock in /run if we are unpriv, hence create it
in $XDG_RUNTIME_DIR instead.

6 weeks agomachinectl: add support for user-scoped operation
Lennart Poettering [Tue, 15 Jul 2025 11:08:33 +0000 (13:08 +0200)] 
machinectl: add support for user-scoped operation

6 weeks agomachined: allow running in --user mode
Lennart Poettering [Tue, 15 Jul 2025 10:15:19 +0000 (12:15 +0200)] 
machined: allow running in --user mode

6 weeks agodiscover-image: support runtime scope also for .nspawn settings files and the pool dir
Lennart Poettering [Tue, 15 Jul 2025 10:13:27 +0000 (12:13 +0200)] 
discover-image: support runtime scope also for .nspawn settings files and the pool dir

discover-image.[ch] largely already supports per-scope operations, let's
extend this however to also cover finding .nspawn settings files and
managing the pool dir.

6 weeks agoservice-util: add generic parser for runtime scope
Lennart Poettering [Tue, 15 Jul 2025 06:44:48 +0000 (08:44 +0200)] 
service-util: add generic parser for runtime scope

6 weeks agopath-lookup: add runtime_directory_generic() helper
Lennart Poettering [Tue, 15 Jul 2025 10:34:39 +0000 (12:34 +0200)] 
path-lookup: add runtime_directory_generic() helper

6 weeks agoruntime-scope: add runtime_scope_to_socket_mode() helper
Lennart Poettering [Tue, 15 Jul 2025 10:34:22 +0000 (12:34 +0200)] 
runtime-scope: add runtime_scope_to_socket_mode() helper

6 weeks agoosc-context: fix typo: 8003 -> 3008
Yu Watanabe [Thu, 25 Sep 2025 17:16:17 +0000 (02:16 +0900)] 
osc-context: fix typo: 8003 -> 3008

Follow-up for dadbb34919abd3fefeb5b8ccc9794da9398a2503 (v258).

6 weeks agomachined: do not allow unprivileged users to shell into the root namespace
Luca Boccassi [Wed, 24 Sep 2025 14:42:51 +0000 (15:42 +0100)] 
machined: do not allow unprivileged users to shell into the root namespace

We intend to make self-registering machines an unprivileged operation,
but currently that would allow an unprivileged user to register a
process they own in the root namespace, and then login as any
user they like, including root, which is not ideal.

Forbid non-root from shelling into a machine that is running in
the root user namespace.

6 weeks agoresolve: undo change to return code of next_search_domain() (#39119)
Mantas Mikulėnas [Thu, 25 Sep 2025 19:52:18 +0000 (22:52 +0300)] 
resolve: undo change to return code of next_search_domain() (#39119)

This caused resolved to only consider the 1st search domain of every
interface and ignore the rest.

Fixes a regression caused by 81ae2237c1792943a1ec712ae2e630bcc592175b (v258).
Fixes #39118.

6 weeks agolibseccomp: turn into dlopen() dependency
Lennart Poettering [Mon, 8 Sep 2025 15:17:05 +0000 (17:17 +0200)] 
libseccomp: turn into dlopen() dependency

6 weeks agofind-esp: fix error handling
Yu Watanabe [Thu, 25 Sep 2025 16:08:53 +0000 (01:08 +0900)] 
find-esp: fix error handling

Follow-up for 4b2b2f3ab710e328f1712a3f5e7480817c7a6ccd.

6 weeks agogpt: Introduce function to convert verity hash or sig to data partition
Daan De Meyer [Thu, 25 Sep 2025 17:57:36 +0000 (19:57 +0200)] 
gpt: Introduce function to convert verity hash or sig to data partition

Let's rename the existing partition_verity_to_data() to
partition_verity_hash_to_data() and make a new partition_verity_to_data() that
handles both verity hash and verity signature partitions.

Rename other functions to match the new naming.

6 weeks agomkosi: pull in bsdutils for script, used by various integration tests
Luca Boccassi [Thu, 25 Sep 2025 12:41:58 +0000 (13:41 +0100)] 
mkosi: pull in bsdutils for script, used by various integration tests

4971s TEST-74-AUX-UTILS.sh[1212]: + script -ec 'networkctl edit --runtime "$NETWORK_NAME"' /dev/null
4971s TEST-74-AUX-UTILS.sh[1269]: .//usr/lib/systemd/tests/testdata/units/TEST-74-AUX-UTILS.networkctl.sh: line 55: script: command not found

Currently works due to a transitive dependency somewhere else
that is being dropped, pull it in directly given the tool is
used by the tests

6 weeks agodissect: Add more debug logging
Daan De Meyer [Thu, 25 Sep 2025 10:09:29 +0000 (12:09 +0200)] 
dissect: Add more debug logging

Currently it's next to impossible to find out why dissect_image()
has failed with EADDRNOTAVAIL, so let's add debug logging and use
EREMOTE for the different architectures error to help out with
debugging a bit.

6 weeks agocgroup-util: add pidref+full counter parts for cg_pid_get_user_unit()
Lennart Poettering [Wed, 27 Aug 2025 12:01:44 +0000 (14:01 +0200)] 
cgroup-util: add pidref+full counter parts for cg_pid_get_user_unit()

This completes the set of functions for getting the user unit of a
process, mirroring the four functions we already have for the system
unit.