]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 weeks agoci: Replace codeql PotentiallyDangerousFunction query with clang-tidy (#41246)
Daan De Meyer [Mon, 23 Mar 2026 10:30:47 +0000 (11:30 +0100)] 
ci: Replace codeql PotentiallyDangerousFunction query with clang-tidy (#41246)

2 weeks agomkosi-tool/opensuse: add libtss2-tcti-device0 package
vlefebvre [Fri, 20 Mar 2026 14:55:31 +0000 (15:55 +0100)] 
mkosi-tool/opensuse: add libtss2-tcti-device0 package

libtss2-tcti-device0 is not installed by default in the openSUSE
image, but is now required when building the test image. Without it,
the build fails with

```
Shared library 'libtss2-tcti-device.so.0' is not available:
libtss2-tcti-device.so.0: cannot open shared object file: No such file or directory
```

Follow-up for 5f85409f932dfdc123d0e8ded8e8a9a6f9443119

2 weeks agopo: Translated using Weblate (Indonesian)
Arif Budiman [Mon, 23 Mar 2026 06:58:47 +0000 (06:58 +0000)] 
po: Translated using Weblate (Indonesian)

Currently translated at 100.0% (266 of 266 strings)

Co-authored-by: Arif Budiman <arifpedia@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/id/
Translation: systemd/main

2 weeks agoTwo fixlets (#41273)
Daan De Meyer [Mon, 23 Mar 2026 08:05:27 +0000 (09:05 +0100)] 
Two fixlets (#41273)

From yeswehack.com reports

2 weeks agonetworkd: replace D-Bus with Varlink in networkctl (#40780)
Yu Watanabe [Mon, 23 Mar 2026 05:55:57 +0000 (14:55 +0900)] 
networkd: replace D-Bus with Varlink in networkctl (#40780)

networkctl previously called networkd over D-Bus for several operations.
This replaces all of those calls with Varlink, making it the sole IPC
mechanism between networkctl and networkd.

 New Varlink methods added to networkd:

- io.systemd.Network.Link (new sub-interface for link-specific
operations):

- Link.Describe — replaces Link.BitRates + DHCPServer.Leases D-Bus
properties
- Link.Up — replaces Link.SetUp D-Bus method (moved from
**io.systemd.Network.LinkUp**)
- Link.Down — replaces Link.SetDown D-Bus method (moved from
**io.systemd.Network.LinkDown**)
      - Link.Renew  — replaces Link.Renew D-Bus method
      - Link.ForceRenew   — replaces Link.ForceRenew D-Bus method
      - Link.Reconfigure  — replaces Link.Reconfigure D-Bus method

  - io.systemd.service
     - Reload            — replaces Manager.Reload D-Bus method

  Supporting changes:
- link_get_bit_rates() extracted from networkd-link.c into
networkd-speed-meter.c
- BitRates added to link_build_json() so Link.Describe returns them
inline
alongside the existing interface description, replacing a separate D-Bus
read
- link_reconfigure_full() and manager_reload() extended to accept
sd_varlink*
for deferred async replies (consistent with existing sd_bus_message*
path)
  - DHCP lease display (networkctl status) uses Link.Describe instead of
DHCPServer.Leases; falls back to ClientId when hostname is not present

2 weeks agomountfsd: fix readOnly flag inversion 41273/head
Luca Boccassi [Mon, 23 Mar 2026 00:51:29 +0000 (00:51 +0000)] 
mountfsd: fix readOnly flag inversion

mountfsd applies R/O when the varlink readOnly flag is set to false

Reported on yeswehack.com as YWH-PGM9780-164

Follow-up for 702a52f4b5d49cce11e2adbc740deb3b644e2de0

2 weeks agocore: also set iov_len when deserializing LogExtraFields=
Luca Boccassi [Mon, 23 Mar 2026 00:25:46 +0000 (00:25 +0000)] 
core: also set iov_len when deserializing LogExtraFields=

This is not actually used so it doesn't really matter in
practice and the fields are used anyway, but for cleanliness
fix it

Reported on yeswehack.com as YWH-PGM9780-165

Follow-up for 5699a1689b7e49702e4e60d08ab3fe386ba8d4df

2 weeks agossh: handle VMADDR_CID_ANY in a couple places (#41230)
Daan De Meyer [Sun, 22 Mar 2026 19:07:53 +0000 (20:07 +0100)] 
ssh: handle VMADDR_CID_ANY in a couple places (#41230)

Originally reported in Ubuntu as
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2145027.

2 weeks ago[RFC] core: add `io.systemd.Manager.{PowerOff,SoftReboot,Halt,Kexec}` (#41236)
Daan De Meyer [Sun, 22 Mar 2026 19:06:34 +0000 (20:06 +0100)] 
[RFC] core: add `io.systemd.Manager.{PowerOff,SoftReboot,Halt,Kexec}` (#41236)

2 weeks agomips: Fix conditional inclusion of <asm/sgidefs.h>
Andreas K. Hüttel [Fri, 20 Mar 2026 12:52:17 +0000 (13:52 +0100)] 
mips: Fix conditional inclusion of <asm/sgidefs.h>

systemd now has a system call wrapper that does a long series of #ifdef's to
differentiate between architectures and ABIs. This wrapper has two problems.

1. On mips, it needs to differentiate between O32, N32, N64 ABI. It does that
via a code block in src/include/override/sys/generate-syscall.py (and derived
files):

     76 #  elif defined(_MIPS_SIM)
     77 #    if _MIPS_SIM == _MIPS_SIM_ABI32
     78 #      define systemd_NR_{syscall} {nr_mipso32}
     79 #    elif _MIPS_SIM == _MIPS_SIM_NABI32
     80 #      define systemd_NR_{syscall} {nr_mips64n32}
     81 #    elif _MIPS_SIM == _MIPS_SIM_ABI64
     82 #      define systemd_NR_{syscall} {nr_mips64}
     83 #    else
     84 #      error "Unknown MIPS ABI"
     85 #    endif
     86 #  elif defined(__hppa__)

Now the _MIPS_SIM* constants stem from a vendor-specific header file sgidefs.h,
which is included with glibc, but not with musl. It is however always present
in the Linux kernel headers as asm/sgidefs.h ...

2. To work around this, the syscall wrapper already has a block

     47 #ifdef ARCH_MIPS
     48 #include <asm/sgidefs.h>
     49 #endif

Turns out, ARCH_MIPS is defined nowhere in Gentoo, neither on glibc nor on musl.
As a result the code (by accident, probably sgidefs.h is included transitively
somehow) works on glibc, but not on musl.

The simplest fix is to replace line 47 in the generator and the derived file
with

     47 #ifdef __mips__

Two other source code files require a similar fix since they rely on the
constants.

Bug: https://github.com/systemd/systemd/issues/41239
Bug: https://bugs.gentoo.org/971376
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
2 weeks agosd-dhcp-client: several trivial cleanups (#41256)
Daan De Meyer [Sun, 22 Mar 2026 19:00:33 +0000 (20:00 +0100)] 
sd-dhcp-client: several trivial cleanups (#41256)

2 weeks agodhcp: fix user class and vendor specific option assignment
Yu Watanabe [Sun, 22 Mar 2026 14:39:38 +0000 (23:39 +0900)] 
dhcp: fix user class and vendor specific option assignment

The commit 6d7cb9a6b8361d2b327222bc12872a3676358bc3 fixes the assignment
of the these options when specified through SendOption=. However, it
breaks when specified through UserClass= or SendVendorOption=.

When UserClass= or SendVendorOption= is specified, the option length is
calculated from the sd_dhcp_client.user_class or .vendor_options. Hence,
we can use 0 for the length in that case.

Follow-up for 6d7cb9a6b8361d2b327222bc12872a3676358bc3.

2 weeks agosd-varlink: gracefully reject arrays/maps with a null element
Frantisek Sumsal [Fri, 20 Mar 2026 19:27:07 +0000 (20:27 +0100)] 
sd-varlink: gracefully reject arrays/maps with a null element

Follow-up for 799392286ec0797c0a2a1260c444360b47ef36fc.

2 weeks agocore: allow unset pidref in manager_log_caller 41236/head
Michael Vogt [Sat, 21 Mar 2026 21:36:20 +0000 (22:36 +0100)] 
core: allow unset pidref in manager_log_caller

This commit allows unset pidref when calling manager_log_caller().
With that we can log manager calls even if we cannot resolve the
caller. Currently when we cannot resolve the caller we are just
not logging anything. With this commit we at least log the call
(even though we don't know what caller it was).

Thanks to keszybz for the suggestion.

2 weeks agocore: extract varlink_log_caller() helper
Michael Vogt [Sat, 21 Mar 2026 21:12:02 +0000 (22:12 +0100)] 
core: extract varlink_log_caller() helper

Extract a common helper varlink_log_caller() and use in the varlink
code when logging the caller of a method. It also logs the method
now that was tried (but failed) to be logged with log_notice just
like manager_log_caller() would do.

I was looking into modifying `manager_log_caller` instead and
accept a NULL pidref but could not log more than the method without
pidref and would make the manager_log_caller slightly less nice.

Thanks to keszybz for suggesting this.

2 weeks agocore: add `io.systemd.Manager.{PowerOff,Reboot,SoftReboot,Halt,Kexec}`
Michael Vogt [Fri, 20 Mar 2026 15:25:42 +0000 (16:25 +0100)] 
core: add `io.systemd.Manager.{PowerOff,Reboot,SoftReboot,Halt,Kexec}`

This adds the low-level io.systemd.Manager shutdown support. This
is (much) simpler than the logind one. It mimics dbus but uses
a shared helper for the simple cases.

Note that this is more restrictive than the dbus version. The
dbus version uses SD_BUS_VTABLE_CAPABILITY(CAP_SYS_BOOT) but
the varlink version uses varlink_check_privileged_peer(link).
This is mostly because I'm not sure how to do the equivalent
in a race-free way.

Thanks to Daan for suggesting this.

2 weeks agodns-packet: move p->more unref into the free path
Oblivionsage [Sat, 21 Mar 2026 16:43:50 +0000 (17:43 +0100)] 
dns-packet: move p->more unref into the free path

dns_packet_unref() unconditionally unrefs p->more on every call,
even when n_ref > 1. But dns_packet_ref() doesn't ref p->more.
This means if a packet with a ->more chain gets ref'd and unref'd
multiple times, the chain gets freed too early while the parent
still holds a dangling pointer.

Move the p->more unref into the n_ref == 1 block so the chain
only gets cleaned up when the packet is actually being freed.

2 weeks agosd-dhcp-client: propagate errors in client_initialize_{io,time}_events() 41256/head
Yu Watanabe [Sat, 14 Mar 2026 12:59:42 +0000 (21:59 +0900)] 
sd-dhcp-client: propagate errors in client_initialize_{io,time}_events()

Call client_stop() on error and return 0 only on callback.
Normal non-callback functions should propagate errors.

This also makes client_initialize_time_events() use
event_reset_time_relative().

2 weeks agosd-dhcp-client: voidify client_initialize()
Yu Watanabe [Thu, 12 Mar 2026 20:16:16 +0000 (05:16 +0900)] 
sd-dhcp-client: voidify client_initialize()

It never fails.

2 weeks agosd-dhcp-client: drop disabled FORCERENEW message support
Yu Watanabe [Tue, 10 Mar 2026 23:50:24 +0000 (08:50 +0900)] 
sd-dhcp-client: drop disabled FORCERENEW message support

FORCERENEW message support has been disabled so long time for security
concern. Most other implementations of DHCP server/client neither
support FORCERENEW. Let's completely drop relevant code.

2 weeks agosd-dhcp-client: add missing error checks
Yu Watanabe [Thu, 12 Mar 2026 20:19:06 +0000 (05:19 +0900)] 
sd-dhcp-client: add missing error checks

2 weeks agosd-dhcp-client: add missing assertion
Yu Watanabe [Fri, 13 Mar 2026 16:31:41 +0000 (01:31 +0900)] 
sd-dhcp-client: add missing assertion

2 weeks agosd-dhcp-client: coding style fix
Yu Watanabe [Thu, 12 Mar 2026 20:31:45 +0000 (05:31 +0900)] 
sd-dhcp-client: coding style fix

2 weeks agofuzz-dhcp-client: modernize test code
Yu Watanabe [Thu, 12 Mar 2026 23:11:18 +0000 (08:11 +0900)] 
fuzz-dhcp-client: modernize test code

2 weeks agotest-dhcp-client: modernize test code
Yu Watanabe [Thu, 12 Mar 2026 22:11:06 +0000 (07:11 +0900)] 
test-dhcp-client: modernize test code

2 weeks agoci: Replace codeql PotentiallyDangerousFunction query with clang-tidy 41246/head
Daan De Meyer [Fri, 20 Mar 2026 21:14:42 +0000 (22:14 +0100)] 
ci: Replace codeql PotentiallyDangerousFunction query with clang-tidy

The strerror() calls in test-errno-util.c are intentional so silence
clang-tidy there.

2 weeks agotest-fd-util: Replace dup() with fcntl()
Daan De Meyer [Fri, 20 Mar 2026 21:11:15 +0000 (22:11 +0100)] 
test-fd-util: Replace dup() with fcntl()

Last remaining use of dup() in the codebase, let's get rid of it.

2 weeks agotest-resolved-stream: Use accept4() instead of accept()
Daan De Meyer [Fri, 20 Mar 2026 21:05:08 +0000 (22:05 +0100)] 
test-resolved-stream: Use accept4() instead of accept()

2 weeks agoreboot-util: Make clang-tidy happy if xenctrl is not installed
Daan De Meyer [Fri, 20 Mar 2026 20:52:00 +0000 (21:52 +0100)] 
reboot-util: Make clang-tidy happy if xenctrl is not installed

xenctrl is another library that's not widely available across distributions.
Let's make sure clang-tidy is happy with reboot-util.c if it is not
available.

2 weeks agocore: Add two more IWYU pragmas
Daan De Meyer [Fri, 20 Mar 2026 20:50:10 +0000 (21:50 +0100)] 
core: Add two more IWYU pragmas

If selinux isn't enabled, these are reported as unused, so let's
add pragmas to tell clang-tidy to keep these.

2 weeks agoselinux-util: Make clang-tidy happy if selinux is not available
Daan De Meyer [Fri, 20 Mar 2026 20:38:27 +0000 (21:38 +0100)] 
selinux-util: Make clang-tidy happy if selinux is not available

Most of our libraries are available on all distributions so we don't
bother with making clang-tidy happy if the library is not available.
The one exception is selinux which isn't available on Arch. Let's
conditionalize the includes in selinux-util.c so that clang-tidy is
still happy on Arch where we can't install libselinux.

2 weeks agocore: Only build selinux-setup if we have selinux
Daan De Meyer [Fri, 20 Mar 2026 20:38:08 +0000 (21:38 +0100)] 
core: Only build selinux-setup if we have selinux

2 weeks agotest-dhcp-client: fix packet length and checksum in IP header
Yu Watanabe [Fri, 20 Mar 2026 17:11:28 +0000 (02:11 +0900)] 
test-dhcp-client: fix packet length and checksum in IP header

2 weeks agokmod-setup: load vsock_loopback alongside vsock
vlefebvre [Fri, 20 Mar 2026 14:25:09 +0000 (15:25 +0100)] 
kmod-setup: load vsock_loopback alongside vsock

Loading vmw_vsock_virtio_transport early at boot causes vsock to be
resident before any application opens an AF_VSOCK socket. Because the
kernel skips autoloading when the vsock module is already present,
vsock_loopback never gets loaded automatically, and any subsequent
bind() to VMADDR_CID_LOCAL fails with EADDRNOTAVAIL.

Fix this by explicitly loading vsock_loopback on virtio or VMWare
machines via the new may_have_vsock_looopback() helper, wich covers both
vmw_vsock_virtio_transport and vmware_vsock_vmci_transport case.
vsock_loopback is the only module that registers a transport for
VMADDR_CID_LOCAL (CID 1) and has no hard dependency from any of the
vsock transport modules.

Fixes: #41100
Follow-up for 381c78db491a7c5fad8697543dd36ebe9b848718

2 weeks agomountfsd: Add CAP_SYS_PTRACE and CAP_SYS_CHROOT
Daan De Meyer [Fri, 20 Mar 2026 13:14:28 +0000 (14:14 +0100)] 
mountfsd: Add CAP_SYS_PTRACE and CAP_SYS_CHROOT

CAP_SYS_PTRACE for making sure we can open mount namespaces of
peers via /proc/<pid>/ns and CAP_SYS_CHROOT for making sure we can
join those mount namespaces.

2 weeks agohwdb: keyboard: erase entry that will never match
David Santamaría Rogado [Thu, 19 Mar 2026 09:07:55 +0000 (10:07 +0100)] 
hwdb: keyboard: erase entry that will never match

The match in "AYA NEO" will never happen as dmi modalias will wipe blank
spaces. Even more the intended match was covered before by "AYANEO".

Actually there are contributions that rely on someone giving some data
to other someone with no test at all.

Should be consider to enforce the full udevadm info --export-db as
mandatory requirement fot this kind of contributions.

2 weeks agointegritysetup: regularize conversion of integrity alg.
David Tardon [Fri, 27 Feb 2026 12:29:44 +0000 (13:29 +0100)] 
integritysetup: regularize conversion of integrity alg.

The number of integrity algorithms we handle whose names differ between
integritysetup and dm-integrity continually increases, so let's drop the
ad hoc conversion and use string tables.

2 weeks agoStop disabling -Wattributes (#41174)
Zbigniew Jędrzejewski-Szmek [Fri, 20 Mar 2026 16:10:10 +0000 (17:10 +0100)] 
Stop disabling -Wattributes (#41174)

In one of the reviews one of the LLMs noticed that the pragma is set but
never unset, so it remains in effect for the rest of the translation
unit. From the comment, it's not clear how old those "old compilers"
were, so let's try if things work without this workaround.

2 weeks agosocket-util: filter out VMADDR_CID_ANY in vsock_get_local_cid() 41230/head
Nick Rosbrook [Fri, 20 Mar 2026 15:23:39 +0000 (11:23 -0400)] 
socket-util: filter out VMADDR_CID_ANY in vsock_get_local_cid()

It has been observed on some systems[1] that ssh-issue may print out:

 Try contacting this VM's SSH server via 'ssh vsock%4294967295' from host.

i.e. it suggests connecting with VMADDR_CID_ANY, which is not valid. It
seems that IOCTL_VM_SOCKETS_GET_LOCAL_CID may return VMADDR_CID_ANY in
some cases, e.g. when vsock is not full initialized or so.

Treat VMADDR_CID_ANY as special in vsock_get_local_cid(), the same as
VMADDR_CID_LOCAL and VMADDR_CID_HOST, and return an error.

[1] https://launchpad.net/bugs/2145027

2 weeks agossh-proxy: return an error if user supplies VMADDR_CID_ANY
Nick Rosbrook [Fri, 20 Mar 2026 15:13:28 +0000 (11:13 -0400)] 
ssh-proxy: return an error if user supplies VMADDR_CID_ANY

Right now, if a user tries to pass VMADDR_CID_ANY to systemd-ssh-proxy,
an assert is triggered:

 $ ssh vsock%4294967295
 Assertion 'cid != VMADDR_CID_ANY' failed at src/ssh-generator/ssh-proxy.c:21, function process_vsock_cid(). Aborting.
 mm_receive_fd: recvmsg: expected received 1 got 0
 proxy dialer did not pass back a connection

This is becauase the value returned from vsock_parse_cid is not checked
before being passed to process_vsock_string. Add a check to prevent
that.

2 weeks agoenv-file: add parse_env_data() helper
Lennart Poettering [Fri, 13 Mar 2026 21:51:42 +0000 (22:51 +0100)] 
env-file: add parse_env_data() helper

2 weeks agomake static hostname settable via firstboot credential (#41212)
Daan De Meyer [Fri, 20 Mar 2026 14:50:51 +0000 (15:50 +0100)] 
make static hostname settable via firstboot credential (#41212)

Split out of #40980

2 weeks agoshared: extract `socket_forward_new()` helper from socket-proxyd (#41168)
Daan De Meyer [Fri, 20 Mar 2026 14:45:33 +0000 (15:45 +0100)] 
shared: extract `socket_forward_new()` helper from  socket-proxyd (#41168)

2 weeks agohwdb: sensor: fix bncf newbook 11
David Santamaría Rogado [Thu, 19 Mar 2026 01:38:06 +0000 (02:38 +0100)] 
hwdb: sensor: fix bncf newbook 11

Actually was found that this device has panel mount at -90º. This fixes
the matrix to follow panel orientation.

More info in the previous PR comments:
https://github.com/systemd/systemd/pull/40773

Fixes: 774e8059590fac45614a135161dee4669945e342
2 weeks agosensor: gpd fix matches
David Santamaría Rogado [Thu, 19 Mar 2026 03:07:07 +0000 (04:07 +0100)] 
sensor: gpd fix matches

Actually for example the Win Max 2 match is affecting devices that even
didn't exist when the matrix was added.

2 weeks agosd-json: when parsing optionally insist top-level variant is object or array
Lennart Poettering [Thu, 19 Mar 2026 10:23:45 +0000 (11:23 +0100)] 
sd-json: when parsing optionally insist top-level variant is object or array

Typically, the top-level JSON object has to be an object, in any json
document we parse, hence let's add a simple way to enforce that.

Make use of this in various places.

(Note, various other JSON parsers insist on this logic right from the
beginning, but I actually thinking making this insisting optional like
this patch does it is the cleaner approach)

2 weeks agoboot: inline a single-use variable 41174/head
Zbigniew Jędrzejewski-Szmek [Fri, 20 Mar 2026 08:50:27 +0000 (09:50 +0100)] 
boot: inline a single-use variable

Also, in general we prefer variables that are always defined over
checking with #ifdef, so #if defined(HAVE_NO_STACK_PROTECTOR_ATTRIBUTE)
is something that we want to avoid.

2 weeks agonsresourced: fix BPF loading when using kernel compiled with Clang
Clayton Craft [Fri, 20 Mar 2026 00:08:31 +0000 (17:08 -0700)] 
nsresourced: fix BPF loading when using kernel compiled with Clang

This fixes an issue where nsresourced fails to load BPF on kernels
compiled with Clang (this output was from v259):

    $ sudo env SYSTEMD_LOG_LEVEL=debug /usr/lib/systemd/systemd-nsresourced
    ; int BPF_PROG(userns_restrict_path_chown, struct path *path, void* uid, void *gid, int ret) { @ userns-restrict.bpf.c:134
    ...
    ; return validate_path(path, ret); @ userns-restrict.bpf.c:135
    ...
    ; static int validate_path(const struct path *path, int ret) { @ userns-restrict.bpf.c:120
    ...
    ; task = (struct task_struct*) bpf_get_current_task_btf(); @ userns-restrict.bpf.c:84
    ...
    ; task_userns = task->cred->user_ns; @ userns-restrict.bpf.c:85
    ...
    R2 invalid mem access 'rcu_ptr_or_null_'

When Clang is used (which sets CONFIG_PAHOLE_HAS_BTF_TAG), btf_type_tag
support is enabled. As a result, an rcu type tag is added to
task_struct::cred:

    $ bpftool btf dump file /sys/kernel/btf/vmlinux | grep "STRUCT 'task_struct'"
    [459] STRUCT 'task_struct' size=4672 vlen=242

    $ bpftool btf dump file /sys/kernel/btf/vmlinux | grep -A200 "^\[459\] STRUCT 'task_struct'" | grep cred
    'ptracer_cred' type_id=802 bits_offset=14528
    'real_cred' type_id=802 bits_offset=14592
    'cred' type_id=802 bits_offset=14656

    $ bpftool btf dump file /sys/kernel/btf/vmlinux | grep '^\[802\]'
    [802] PTR '(anon)' type_id=801

    $ bpftool btf dump file /sys/kernel/btf/vmlinux | grep '^\[801\]'
    [801] TYPE_TAG 'rcu' type_id=803

Since the struct ptr *could* be null, we have to add a null pointer
check to satisfy the bpf verifier.

2 weeks agomeson: disable __attribute__((__retain__)) on old compilers
Zbigniew Jędrzejewski-Szmek [Thu, 19 Mar 2026 16:06:17 +0000 (17:06 +0100)] 
meson: disable __attribute__((__retain__)) on old compilers

This attribute was introduced in gcc 11, and our baseline is currently
8.4. So let's allow using _retain_ everywhere, but make it into a noop
if not supported.

Using __has_attribute was suggested, but with gcc-11.5.0-14.el9.x86_64,
__has__attribute(__retain__) is true, but we get a warning when the
attribute is actually used.

2 weeks agotest: skip D-Bus FD truncation test with dbus-daemon
Luca Boccassi [Fri, 20 Mar 2026 00:43:26 +0000 (00:43 +0000)] 
test: skip D-Bus FD truncation test with dbus-daemon

dbus-daemon intentionally disconnects peers when FDs get
truncated. Detect it and skip it in that case, as the purpose
of the test is not to exercise the D-Bus implementation, but
our library.
When running with dbus-broker (Fedora, etc) we'll get full
coverage.

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

Follow-up for 744d589632c545e90ae76853abbfbc90cb530e24

2 weeks agokernel-install: fix assert in context_copy
Robin Ebert [Fri, 20 Mar 2026 12:32:04 +0000 (13:32 +0100)] 
kernel-install: fix assert in context_copy

2 weeks agoimds preparation (#41214)
Daan De Meyer [Fri, 20 Mar 2026 14:14:21 +0000 (15:14 +0100)] 
imds preparation (#41214)

3 weeks agostub: make debug logging controllable via smbios11 work in the stub too, not just...
Lennart Poettering [Sat, 7 Mar 2026 22:45:25 +0000 (23:45 +0100)] 
stub: make debug logging controllable via smbios11 work in the stub too, not just the boot menu

Follow-up for: 0ce83b8a578f3076d9ecff6b1d59613ff4afa3b5

3 weeks agofirstboot: permit setting the static hostname via a system credential 41212/head
Lennart Poettering [Thu, 5 Mar 2026 09:39:28 +0000 (10:39 +0100)] 
firstboot: permit setting the static hostname via a system credential

For the IMDS case there's value in being able to set the static
hostname, instead of just the transient one. Let's introduce
firstboot.hostname, which only applies to first boot, and write the
static hostname. This is different from system.hostname which applies to
any boot, and writes the transient hostname.

3 weeks agofirstboot: harden credential handling a bit
Lennart Poettering [Wed, 11 Mar 2026 10:15:27 +0000 (11:15 +0100)] 
firstboot: harden credential handling a bit

Credentials are highly privileged things, but still, let's do some
validation, because we can.

3 weeks agoiovec-util: introduce IOVEC_MAKE_BYTE() helper 41214/head
Lennart Poettering [Thu, 26 Feb 2026 09:10:53 +0000 (10:10 +0100)] 
iovec-util: introduce IOVEC_MAKE_BYTE() helper

3 weeks agoudev: tag DMI id device with "systemd", so that we can order units after it
Lennart Poettering [Thu, 26 Feb 2026 10:24:21 +0000 (11:24 +0100)] 
udev: tag DMI id device with "systemd", so that we can order units after it

For various usecases it is useful to read relevant data from the DMI
udev device, but this means we need a way to wait for it for this to be
probed to be race-free. Hence tag it with "systemd", so that
sys-devices-virtual-dmi-id.device can be used as synchronization point.

3 weeks agofileio: introduce write_data_file_atomic_at() helper
Lennart Poettering [Fri, 27 Feb 2026 09:05:16 +0000 (10:05 +0100)] 
fileio: introduce write_data_file_atomic_at() helper

This is very similar to write_string_file_atomic(), but is intentionally
kept separate (after long consideration). It focusses on arbitrary
struct iovec data, not just strings, and hence also doesn't do stdio at
all. It's hence a lot more low-level.

We might want to consider moving write_string_file*() on top of
write_data_file_atomic_at(), but for now don't.

3 weeks agoshared: extract `socket_forward_new()` helper from socket-proxyd 41168/head
Michael Vogt [Wed, 18 Mar 2026 10:38:48 +0000 (11:38 +0100)] 
shared: extract `socket_forward_new()` helper from socket-proxyd

This commit extracts the socket forwarding code from the existing
socket-proxyd into a new shared helper that will be used by the
varlinkctl protocol upgrade support code and is used as is in
the socket-proxyd.c.

It tries to keep the changes as small as possible, its mostly
renaming like:
* connection_create_pipes -> socket_forward_create_pipes
* connection_shovel -> socket_forward_shovel
* connection_enable_event_sources -> socket_forward_enable_event_sources
* traffic_cb -> socket_forward_traffic_cb

and a new socket_forward_new() that creates/starts the forwarding.

All log_error_errno() got downgraded to log_debug_errno().

3 weeks agounits: allow io.systemd.Hostname to be available earlier
Michael Vogt [Thu, 19 Mar 2026 15:05:52 +0000 (16:05 +0100)] 
units: allow io.systemd.Hostname to be available earlier

Currently the varlink interface for hostname is only available
after sysinit. This means it is not available until systemd-firstboot
is finished. But there is information like the boot-id in there that
is useful to get early.

My use-case is to query the system early via the varlink-http-bridge
and currently I can't get data from io.systemd.Hostname until
systemd-firstboot is completed which is a bit limiting.

So to fix it this commit sets DefaultDependencies=no on both the socket
and service units.

It also changes hostnamed.c to use
bus_open_system_watch_bind_with_description() which means we will
reconnect once dbus is available. This mimics what resolved-bus.c
is doing (and which was originally introduced in d7afd945b).

Thanks to Lennart for pointing this out.

3 weeks agotests: drop _weak_ from the SYSTEMD_TEST_TABLE definition
Zbigniew Jędrzejewski-Szmek [Thu, 19 Mar 2026 10:44:40 +0000 (11:44 +0100)] 
tests: drop _weak_ from the SYSTEMD_TEST_TABLE definition

This will cause test binaries that reference SYSTEMD_TEST_TABLE,
e.g. by trying to iterate over the test list, to fail if no tests are
defined. I think this is the correct thing to do, as the lack of tests
indicates some kind of mistake.

3 weeks agotest-bpf-token: convert "intro" to a test
Zbigniew Jędrzejewski-Szmek [Thu, 19 Mar 2026 10:43:08 +0000 (11:43 +0100)] 
test-bpf-token: convert "intro" to a test

This file was a bit strange… It was shoehorning a manual test into
the intro block and not using the rest of the TEST machinery. Let's
convert it into a normal executable with a run function as we do
in other similar cases.

3 weeks agotimesyncd: drop obsolete privilege dropping code
Zbigniew Jędrzejewski-Szmek [Thu, 19 Mar 2026 17:57:11 +0000 (18:57 +0100)] 
timesyncd: drop obsolete privilege dropping code

systemd-timesyncd always runs as an unprivileged user via the service
file, so the code to resolve the systemd-timesync user, drop privileges
adjust file ownership/permissions, or even create the directory cannot
do anything useful and is unnecessary.

Follow-up for 00a415fc8f9e3469549a56d29f448b8cf14b0598, which made
running under an unprivileged user unconditional.

3 weeks agotest: add basic TEST-74-AUX-UTILS.socket-proxyd.sh
Michael Vogt [Wed, 18 Mar 2026 12:23:20 +0000 (13:23 +0100)] 
test: add basic TEST-74-AUX-UTILS.socket-proxyd.sh

With the planned extraction of the socket-forward code its useful
to have a basic way to validate the functionality. So add a basic
test that ensures at least base functionality is intact.

3 weeks agoVarious dissect-image cleanups (#41178)
Chris Down [Fri, 20 Mar 2026 03:52:32 +0000 (11:52 +0800)] 
Various dissect-image cleanups (#41178)

I noticed the message for verity partition mismatch was wrong, which
then led me down this rabbit hole...

Aside from the new test for usr verity partitions, this is 49
insertions(+), 127 deletions(-), and reduces the space for bugs to hide
a bit.

3 weeks agopo: Translated using Weblate (Kabyle)
Massii Aqvayli [Thu, 19 Mar 2026 20:58:44 +0000 (20:58 +0000)] 
po: Translated using Weblate (Kabyle)

Currently translated at 15.0% (40 of 266 strings)

Co-authored-by: Massii Aqvayli <massiin@proton.me>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/kab/
Translation: systemd/main

3 weeks agohwdb/keyboard: Map FN key on Wareus B15
Artem Proskurnev [Thu, 19 Mar 2026 15:39:21 +0000 (18:39 +0300)] 
hwdb/keyboard: Map FN key on Wareus B15

After kernel commit 907bc9268a ("Input: atkbd - map F23 key to support default copilot shortcut")
Fn+F5 combination (switch touchpad on/off) stopped working correctly.

Fn produces F23, it is probably a bug in BIOS, ther eis no "Copilot" key.
It was ignored before that commit, but now we have to remap it here in hwdb.

This workaround is similar to systemd commit d2502f5
("hwdb/keyboard: Map FN key on TUXEDO InfinityFlex 14 Gen1")

Hardware probe of this notebook: https://linux-hardware.org/?probe=2d5266f5c6

3 weeks agodissect-image: Add usr verity partition coverage 41178/head
Chris Down [Thu, 19 Mar 2026 13:35:46 +0000 (21:35 +0800)] 
dissect-image: Add usr verity partition coverage

3 weeks agotest-time-util: restore relaxation of check is special timezones
Zbigniew Jędrzejewski-Szmek [Thu, 19 Mar 2026 11:39:17 +0000 (12:39 +0100)] 
test-time-util: restore relaxation of check is special timezones

Fixup for 514fa9d39ae9935ef1e014a3dd48dd5856007df2. We are now getting
failures in CI i386 builds in Fedora rawhide:
  TZ=Europe/Lisbon, tzname[0]=WET, tzname[1]=WEST
  @212545617716594 → Sun 1976-09-26 00:26:57 WET → @212542017000000 → Sun 1976-09-26 00:26:57 CET
  src/test/test-time-util.c:450: Assertion failed: Expected "ignore" to be true

Restore the conditionalization for CAT, EAT, WET that was removed
in the refactoring.

3 weeks agodissect-image: Consolidate verity validation and setup
Chris Down [Thu, 19 Mar 2026 13:15:44 +0000 (21:15 +0800)] 
dissect-image: Consolidate verity validation and setup

The verity consistency checks and verity setup code also have parallel
blocks for root and usr that do basically identical work. Let's
consolidate them and reduce the footprint for bugs or deviance to
manifest.

3 weeks agodissect-image: Merge partition handler code
Chris Down [Thu, 19 Mar 2026 13:10:21 +0000 (21:10 +0800)] 
dissect-image: Merge partition handler code

dissect-image has six(!) different branches with basically the same
code. Let's avoid that and reduce the spaces for bugs or differing
behaviour to subtly creep in.

3 weeks agodissect-image: Fix wrong UUID logged on usr verity partition mismatch
Chris Down [Thu, 19 Mar 2026 13:01:54 +0000 (21:01 +0800)] 
dissect-image: Fix wrong UUID logged on usr verity partition mismatch

When there's a partition mismatch the USR_VERITY branch logs usr_uuid in
the mismatch message, but the check is actually against usr_verity_uuid.

3 weeks agovconsole-setup: make work somewhat cleanly if loadkeys/setfont are not available...
Lennart Poettering [Thu, 19 Mar 2026 12:23:32 +0000 (13:23 +0100)] 
vconsole-setup: make work somewhat cleanly if loadkeys/setfont are not available (#40959)

3 weeks agonetwork: add unmanaged interface checks to Link.Renew and Link.ForceRenew Varlink... 40780/head
noxiouz [Thu, 19 Mar 2026 11:50:26 +0000 (11:50 +0000)] 
network: add unmanaged interface checks to Link.Renew and Link.ForceRenew Varlink methods

The D-Bus counterparts (bus_link_method_renew, bus_link_method_force_renew)
reject calls on unmanaged interfaces with BUS_ERROR_UNMANAGED_INTERFACE,
but the Varlink methods silently succeed. Add the same guard to both
Varlink methods, returning io.systemd.Network.Link.InterfaceUnmanaged,
and declare the error in the IDL.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 weeks agoStop disabling -Wattributes
Zbigniew Jędrzejewski-Szmek [Thu, 19 Mar 2026 10:35:00 +0000 (11:35 +0100)] 
Stop disabling -Wattributes

In one of the reviews one of the LLMs noticed that the pragma is set but
never unset, so it remains in effect for the rest of the translation
unit. From the comment, it's not clear how old those "old compilers" were,
so let's try if things work without this workaround.

3 weeks agoci: Update prompt to reduce time spent re-checking comments
Daan De Meyer [Thu, 19 Mar 2026 10:34:25 +0000 (11:34 +0100)] 
ci: Update prompt to reduce time spent re-checking comments

I noticed looking at the logs that claude spends a lot of time re-checking
existing comments, so let's update the prompt to hopefully reduce
the amount of comments that it re-checks.

3 weeks agoci: Instruct claude to not do any escaping for review comments
Daan De Meyer [Thu, 19 Mar 2026 10:12:37 +0000 (11:12 +0100)] 
ci: Instruct claude to not do any escaping for review comments

Should hopefully fix cases like
https://github.com/systemd/systemd/pull/40780#discussion_r2956841573.

3 weeks agoci: Have claude spend more effort on reviews
Daan De Meyer [Thu, 19 Mar 2026 09:34:04 +0000 (10:34 +0100)] 
ci: Have claude spend more effort on reviews

Let's give this a try and see how it impacts reviews (and cost).

3 weeks agovconsole-setup: handle gracefully if setfont/loadkeys are not available 40959/head
Lennart Poettering [Thu, 5 Mar 2026 15:13:39 +0000 (16:13 +0100)] 
vconsole-setup: handle gracefully if setfont/loadkeys are not available

Let's not complain too loudly if these external binaries aren't there.

3 weeks agovconsole-setup: add a bunch of assert()s
Lennart Poettering [Thu, 5 Mar 2026 15:13:34 +0000 (16:13 +0100)] 
vconsole-setup: add a bunch of assert()s

3 weeks agouserdb: add birthDate field to JSON user records (#40954)
Luca Boccassi [Wed, 18 Mar 2026 23:04:03 +0000 (23:04 +0000)] 
userdb: add birthDate field to JSON user records (#40954)

Add an optional field that can be used to store a user's birth date.
userdb already stores personal metadata (`emailAddress`, `realName`,
`location`) so `birthDate` is a natural fit.

3 weeks agonetworkctl: drop unused functions
noxiouz [Tue, 24 Feb 2026 14:04:09 +0000 (23:04 +0900)] 
networkctl: drop unused functions

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
3 weeks agonetworkctl: use io.systemd.Network.Link.Describe() Varlink method
noxiouz [Sun, 22 Feb 2026 15:17:37 +0000 (15:17 +0000)] 
networkctl: use io.systemd.Network.Link.Describe() Varlink method

This makes networkctl fetch bit-rate statistics and offered DHCP
leases via Link.Describe() method instead of D-Bus.

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
3 weeks agonetwork: add io.systemd.Network.Link.Describe() Varlink method
noxiouz [Sun, 22 Feb 2026 15:17:37 +0000 (15:17 +0000)] 
network: add io.systemd.Network.Link.Describe() Varlink method

The handler returns the JSON produced by link_build_json().

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
3 weeks agonetworkctl: use io.systemd.service.Reload() method
noxiouz [Sun, 22 Feb 2026 15:29:44 +0000 (15:29 +0000)] 
networkctl: use io.systemd.service.Reload() method

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
3 weeks agonetwork: implement io.systemd.service.Reload() in networkd
noxiouz [Sun, 22 Feb 2026 15:29:44 +0000 (15:29 +0000)] 
network: implement io.systemd.service.Reload() in networkd

Bind networkd's reload handler to the generic io.systemd.service.Reload
method.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
3 weeks agonetworkctl: use new varlink methods
Yu Watanabe [Tue, 24 Feb 2026 12:46:07 +0000 (21:46 +0900)] 
networkctl: use new varlink methods

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
3 weeks agonetwork: add io.systemd.Network.Link.Reconfigure() Varlink method
noxiouz [Sun, 22 Feb 2026 15:26:28 +0000 (15:26 +0000)] 
network: add io.systemd.Network.Link.Reconfigure() Varlink method

The handler calls link_reconfigure_full() with UNCONDITIONALLY|CLEANLY
flags and defers the Varlink reply until reconfiguration completes.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
3 weeks agonetwork: add io.systemd.Network.Link.ForceRenew() Varlink method
noxiouz [Sun, 22 Feb 2026 15:25:07 +0000 (15:25 +0000)] 
network: add io.systemd.Network.Link.ForceRenew() Varlink method

The handler calls sd_dhcp_server_forcerenew() if the server is running
and logs a warning on failure.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
3 weeks agonetwork: add io.systemd.Network.Link.Renew() Varlink method
noxiouz [Sun, 22 Feb 2026 15:24:14 +0000 (15:24 +0000)] 
network: add io.systemd.Network.Link.Renew() Varlink method

The handler calls dhcp4_renew() and logs a warning on failure.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
3 weeks agonetwork: extend link_reconfigure_full() and manager_reload() for Varlink
noxiouz [Sun, 22 Feb 2026 15:11:37 +0000 (15:11 +0000)] 
network: extend link_reconfigure_full() and manager_reload() for Varlink

Add an sd_varlink* parameter to both functions so Varlink callers can
receive a deferred reply once all async work completes, symmetrically
with the existing sd_bus_message* path.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
3 weeks agonetwork: add BitRates field to link_build_json() and the Varlink IDL
noxiouz [Sun, 22 Feb 2026 15:09:56 +0000 (15:09 +0000)] 
network: add BitRates field to link_build_json() and the Varlink IDL

Expose the speed meter transmit/receive rates as a BitRates struct in
the per-link JSON output and the io.systemd.Network Varlink IDL.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
3 weeks agonetwork: extract link_get_bit_rates() into networkd-speed-meter.c
noxiouz [Sun, 22 Feb 2026 15:09:08 +0000 (15:09 +0000)] 
network: extract link_get_bit_rates() into networkd-speed-meter.c

Move the bit-rate computation out of property_get_bit_rates() in
networkd-link-bus.c into a standalone link_get_bit_rates() helper in
networkd-speed-meter.c, which already owns the speed meter state.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
3 weeks agoAdd tmpfiles --inline and use it in one unit file (#41034)
Zbigniew Jędrzejewski-Szmek [Wed, 18 Mar 2026 21:49:11 +0000 (22:49 +0100)] 
Add tmpfiles --inline and use it in one unit file (#41034)

3 weeks agouserdb: add birthDate field to JSON user records 40954/head
Dylan M. Taylor [Fri, 6 Mar 2026 12:34:57 +0000 (07:34 -0500)] 
userdb: add birthDate field to JSON user records

Add a birthDate field to the JSON user record, stored internally as a
struct tm with INT_MIN/negative sentinels for unset fields. The field
is serialized as a YYYY-MM-DD string in JSON and validated via
parse_birth_date(), which shares its core logic with
parse_calendar_date() through a new parse_calendar_date_full()
function.

For birth dates, timegm() is called directly (rather than
mktime_or_timegm_usec) to support pre-epoch dates. The wday field is
used to distinguish timegm() failure from a valid (time_t) -1 return.

birthDate is excluded from user_record_self_modifiable_fields(), so
only administrators can set or change it via homectl. The field
remains in the regular (non-privileged) JSON section, keeping it
readable by the user and applications.

3 weeks agohostname: add API for getting custom fields from machine-info
seaeunlee [Fri, 6 Mar 2026 00:33:01 +0000 (00:33 +0000)] 
hostname: add API for getting custom fields from machine-info

3 weeks agoTranslations update from Fedora Weblate (#41164)
Luca Boccassi [Wed, 18 Mar 2026 20:42:46 +0000 (20:42 +0000)] 
Translations update from Fedora Weblate (#41164)

Translations update from [Fedora
Weblate](https://translate.fedoraproject.org) for
[systemd/main](https://translate.fedoraproject.org/projects/systemd/main/).

Current translation status:

![Weblate translation
status](https://translate.fedoraproject.org/widget/systemd/main/horizontal-auto.svg)

3 weeks agopo: Translated using Weblate (Punjabi) 41164/head
A S Alam [Wed, 18 Mar 2026 18:58:46 +0000 (18:58 +0000)] 
po: Translated using Weblate (Punjabi)

Currently translated at 34.9% (93 of 266 strings)

Co-authored-by: A S Alam <aalam@users.noreply.translate.fedoraproject.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/pa/
Translation: systemd/main

3 weeks agopo: Translated using Weblate (Finnish)
Jan Kuparinen [Wed, 18 Mar 2026 18:58:46 +0000 (18:58 +0000)] 
po: Translated using Weblate (Finnish)

Currently translated at 100.0% (266 of 266 strings)

Co-authored-by: Jan Kuparinen <copper_fin@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fi/
Translation: systemd/main

3 weeks agopo: Translated using Weblate (Kabyle)
Massii Aqvayli [Wed, 18 Mar 2026 18:58:45 +0000 (18:58 +0000)] 
po: Translated using Weblate (Kabyle)

Currently translated at 7.5% (20 of 266 strings)

Co-authored-by: Massii Aqvayli <massiin@proton.me>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/kab/
Translation: systemd/main