]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 weeks agoRevert "Update systemctl.xml" 39423/head
Frantisek Sumsal [Thu, 23 Oct 2025 13:32:19 +0000 (15:32 +0200)] 
Revert "Update systemctl.xml"

This reverts commit b0fe317d14c4e9a02ff661c2ccd37f093cfda396.
This reverts commit 9f4f7f0372688127adc27f82a75db58749eb6d6e.

2 weeks agoman: handle leading/trailing/repeating whitespaces in anchor links
Frantisek Sumsal [Thu, 23 Oct 2025 13:30:52 +0000 (15:30 +0200)] 
man: handle leading/trailing/repeating whitespaces in anchor links

So even if a <term> section contains newlines, we get a reasonable
anchor link to it.

Before:
<dt id="
  bind
  UNIT
  PATH
  [PATH]
"><span class="term">
...
<a class="headerlink" title="Permalink to this term" href="#%0A%20%20%20%20%20%20%20%20%20%20%20%20bind%0A%20%20%20%20%20%20%20%20%20%20%20%20UNIT%0A%20%20%20%20%20%20%20%20%20%20%20%20PATH%0A%20%20%20%20%20%20%20%20%20%20%20%20[PATH]%0A%20%20%20%20%20%20%20%20%20%20">¶</a>

After:
<dt id="bind UNIT PATH [PATH]"><span class="term">
...
<a class="headerlink" title="Permalink to this term" href="#bind%20UNIT%20PATH%20[PATH]">¶</a>

Resolves: #39196

2 weeks agotest: properly wait for the forked process
Frantisek Sumsal [Thu, 23 Oct 2025 08:28:07 +0000 (10:28 +0200)] 
test: properly wait for the forked process

The process forked off by `systemd-notify --fork` is not a child of the
current shell, so using `wait` doesn't work. This then later causes a
race, when the test occasionally fails because it attempts to start a
new systemd-socket-activate instance before the old one is completely
gone:

[ 1488.947744] TEST-74-AUX-UTILS.sh[1938]: Child 1947 died with code 0
[ 1488.947952] TEST-74-AUX-UTILS.sh[1933]: + assert_eq hello hello
[ 1488.949716] TEST-74-AUX-UTILS.sh[1948]: + set +ex
[ 1488.950112] TEST-74-AUX-UTILS.sh[1950]: ++ cat /proc/1938/comm
[ 1488.945555] systemd[1]: Started systemd-networkd.service - Network Management.
[ 1488.950365] TEST-74-AUX-UTILS.sh[1933]: + assert_in systemd-socket systemd-socket-
[ 1488.950563] TEST-74-AUX-UTILS.sh[1951]: + set +ex
[ 1488.950766] TEST-74-AUX-UTILS.sh[1933]: + kill 1938
[ 1488.950766] TEST-74-AUX-UTILS.sh[1933]: + wait 1938
[ 1488.950766] TEST-74-AUX-UTILS.sh[1933]: .//usr/lib/systemd/tests/testdata/units/TEST-74-AUX-UTILS.socket-activate.sh: line 14: wait: pid 1938 is not a child of this shell
[ 1488.950766] TEST-74-AUX-UTILS.sh[1933]: + :
[ 1488.951486] TEST-74-AUX-UTILS.sh[1952]: ++ systemd-notify --fork -- systemd-socket-activate -l 1234 --now socat ACCEPT-FD:3 PIPE
[ 1488.952222] TEST-74-AUX-UTILS.sh[1953]: Failed to listen on [::]:1234: Address already in use
[ 1488.952222] TEST-74-AUX-UTILS.sh[1953]: Failed to open '1234': Address already in use
[ 1488.956831] TEST-74-AUX-UTILS.sh[1933]: + PID=1953
[ 1488.957078] TEST-74-AUX-UTILS.sh[102]: + echo 'Subtest /usr/lib/systemd/tests/testdata/units/TEST-74-AUX-UTILS.socket-activate.sh failed'
[ 1488.957078] TEST-74-AUX-UTILS.sh[102]: Subtest /usr/lib/systemd/tests/testdata/units/TEST-74-AUX-UTILS.socket-activate.sh failed

2 weeks agoman/network: extend document about the default value of IPv6AcceptRA=
Yu Watanabe [Tue, 21 Oct 2025 17:52:28 +0000 (02:52 +0900)] 
man/network: extend document about the default value of IPv6AcceptRA=

Prompted by #39304.

2 weeks agorereadpt: always update kernel partition tables from userspace in an incremental...
Yu Watanabe [Thu, 23 Oct 2025 00:35:03 +0000 (09:35 +0900)] 
rereadpt: always update kernel partition tables from userspace in an incremental fashion (#39390)

Let's address #38672 comprehensively: let's avoid BLKRRPART as much as
we can, and always do careful userspace controlled, incremental updates
to the kernel partition tables.

This simply iterates through blkid's partition parsing, and turns it
into a BLKPG ioctls, adding, updating, removing partitions as necessary,
suppressing unnecessary changes. This has the major benefit that the
call becomes truly idempotent: if nothing changed then nothing is
removed/readed, like BLKRRPART is doing it.

This then ports over all code currently doing partition refreshing,
specifcially: udev, repart, and homed.

Fixes: #38672
2 weeks agoTwo minor id128-related cleanups (#39407)
Yu Watanabe [Thu, 23 Oct 2025 00:30:11 +0000 (09:30 +0900)] 
Two minor id128-related cleanups (#39407)

Split out from #39210

2 weeks agotree-wide: open block device locks in writable mode 39390/head
Lennart Poettering [Wed, 22 Oct 2025 20:47:53 +0000 (22:47 +0200)] 
tree-wide: open block device locks in writable mode

udev's block device locking protocol has one pitfall not even the
example in the documentation got right so far (even though this is
explained in all detail above): udev's rescanning is only triggered when
an fd that is opened for writing is closed. This means that if a
separate locking fd is opened on a block device – one that is maintained
independently of the fd actually used for writing – it must be opened for
writing too, so that closing the lock definitely triggers a rescan. This
matters in cases where the lock fd is kept for longer than the fd used
for writing to disk. (Because otherwise udev might get the
IN_CLOSE_WRITE event, but when it tries to rescan will find the device
locked, and never retry because no IN_CLOSE_WRITE is triggred anymore.)

Let's fix that across the codebase, at 4 places:

1. in makefs (a lock fd is kept, and mkfs then invoked as child, which
   uses a different fd, and the lock fd is closed only once the child
   died)

2. in udevadm lock (embarassing!): which is intended to be used to wrap tools
   that modify disk contents, very similar to the makefs case. The lock
   is also kept until after the tool exited.

3. In storagetm: the kernel nvme-tcp layer writes to the device
   directly, we just keep a lock fd.

4. the example in BLOCK_DEVICE_LOCKING.md

2 weeks agorepart: switch things over to our own partition reread logic
Lennart Poettering [Mon, 20 Oct 2025 14:13:31 +0000 (16:13 +0200)] 
repart: switch things over to our own partition reread logic

2 weeks agorepart: split out that disarms automatic artifact removal
Lennart Poettering [Mon, 20 Oct 2025 14:09:52 +0000 (16:09 +0200)] 
repart: split out that disarms automatic artifact removal

2 weeks agoudev: switch over to rereadpt() rather than raw BLKRRPART
Lennart Poettering [Mon, 20 Oct 2025 13:21:44 +0000 (15:21 +0200)] 
udev: switch over to rereadpt() rather than raw BLKRRPART

Fixes: #38672
2 weeks agohomed: switch from raw BLKRRPART to rereadpt_fd()
Lennart Poettering [Mon, 20 Oct 2025 13:18:42 +0000 (15:18 +0200)] 
homed: switch from raw BLKRRPART to rereadpt_fd()

2 weeks agorereadpt: implement userspace-based BLKRRPART re-implementation
Lennart Poettering [Mon, 20 Oct 2025 10:36:29 +0000 (12:36 +0200)] 
rereadpt: implement userspace-based BLKRRPART re-implementation

2 weeks agoblockdev-util: split out partition device node generation from dissect-util.c
Lennart Poettering [Mon, 20 Oct 2025 10:36:05 +0000 (12:36 +0200)] 
blockdev-util: split out partition device node generation from dissect-util.c

2 weeks agoblockdev-util: in blockdev_partscan_enabled() check if we are operating on block...
Lennart Poettering [Mon, 20 Oct 2025 10:35:05 +0000 (12:35 +0200)] 
blockdev-util: in blockdev_partscan_enabled() check if we are operating on block device first

The function makes no sense on any other type of fd, hence we better
check this explicitly.

2 weeks agoblockdev-util: rename BlockDeviceLookupFlag to plural
Lennart Poettering [Mon, 20 Oct 2025 15:58:37 +0000 (17:58 +0200)] 
blockdev-util: rename BlockDeviceLookupFlag to plural

This is a flags type and a flag function argument, let's name it in
plural, because it allows many flags combinations. Internally, the
implementation already used plural, but let's fix the prototypes too.

2 weeks agosd-device: add device_get_property_uint() helper
Lennart Poettering [Mon, 20 Oct 2025 10:34:32 +0000 (12:34 +0200)] 
sd-device: add device_get_property_uint() helper

This is just like device_get_property_int() but operates on unsigned
ints.

2 weeks agomkosi: update debian commit reference to 5650452e6b0b430f44d3d48b7322c2b3c8b9477f
Luca Boccassi [Wed, 22 Oct 2025 16:35:02 +0000 (17:35 +0100)] 
mkosi: update debian commit reference to 5650452e6b0b430f44d3d48b7322c2b3c8b9477f

5650452e6b Install new files for upstream build
607afcd060 salsa: disable arm64/ppc64el again
b1bb6d4849 systemd-tests: drop unused overrides
b3790a36ca getty-static: add missing Documentation=
1cea27caba Backport patch to fix autopkgtest with new util-linux due to file move
2e74a7f969 Update changelog for 258.1-1 release
9250e242b9 Make /run/lock world writable by default

2 weeks agovmspawn: Add --bind-user= and --bind-user-shell= (#38410)
Daan De Meyer [Wed, 22 Oct 2025 18:03:47 +0000 (20:03 +0200)] 
vmspawn: Add --bind-user= and --bind-user-shell= (#38410)

We use virtiofsd ID translation to mimick idmapped mounts and the
transient userdb credentials to provision the mapped user in the VM.

2 weeks agovmspawn: Add --bind-user= and --bind-user-shell= 38410/head
DaanDeMeyer [Mon, 14 Jul 2025 08:24:53 +0000 (10:24 +0200)] 
vmspawn: Add --bind-user= and --bind-user-shell=

We use virtiofsd ID translation to mimick idmapped mounts and the
transient userdb credentials to provision the mapped user in the VM.

2 weeks agovmspawn: Use machine_credential_add()
Daan De Meyer [Tue, 21 Oct 2025 19:38:18 +0000 (21:38 +0200)] 
vmspawn: Use machine_credential_add()

2 weeks agomachine-bind-user: Make home mount directory configurable
DaanDeMeyer [Fri, 22 Aug 2025 09:02:29 +0000 (11:02 +0200)] 
machine-bind-user: Make home mount directory configurable

2 weeks agomachine-bind-user: Use machine in log messages instead of container
DaanDeMeyer [Fri, 22 Aug 2025 08:52:17 +0000 (10:52 +0200)] 
machine-bind-user: Use machine in log messages instead of container

2 weeks agonspawn: Add --bind-user-shell= to --help
Daan De Meyer [Tue, 21 Oct 2025 19:31:29 +0000 (21:31 +0200)] 
nspawn: Add --bind-user-shell= to --help

2 weeks agoMissing policies for polkit as mentioned in freedesktop.org/software/systemd/man
theSillywhat [Sat, 18 Oct 2025 19:55:35 +0000 (15:55 -0400)] 
Missing policies for polkit as mentioned in freedesktop.org/software/systemd/man

2 weeks agoDisable abort in log_assert in libsystemd/libudev (#39307)
Zbigniew Jędrzejewski-Szmek [Wed, 22 Oct 2025 12:48:14 +0000 (14:48 +0200)] 
Disable abort in log_assert in libsystemd/libudev (#39307)

See the second commit for details.

I think we might want to apply the same treatment to nss and pam
modules. Asserting in such "plugin code" seems iffy. But this PR doesn't
change those in any way.

2 weeks agoshared/bus-get-properties: use sizeof instead of hardcoded size in bus_property_get_i... 39407/head
Mike Yuan [Sun, 5 Oct 2025 01:15:36 +0000 (03:15 +0200)] 
shared/bus-get-properties: use sizeof instead of hardcoded size in bus_property_get_id128()

Prompted by
https://github.com/systemd/systemd/pull/39210#discussion_r2404225907

2 weeks agolibsystemd-network/sd-lldp-tx: use SD_JSON_BUILD_PAIR_ID128
Mike Yuan [Sun, 5 Oct 2025 22:19:57 +0000 (00:19 +0200)] 
libsystemd-network/sd-lldp-tx: use SD_JSON_BUILD_PAIR_ID128

2 weeks agocoredump: split coredump.c into small pieces (#39351)
Lennart Poettering [Wed, 22 Oct 2025 11:37:51 +0000 (13:37 +0200)] 
coredump: split coredump.c into small pieces (#39351)

2 weeks agotree-wide: use setenvf() more, where appropriate
Lennart Poettering [Wed, 22 Oct 2025 07:44:56 +0000 (09:44 +0200)] 
tree-wide: use setenvf() more, where appropriate

2 weeks agoimport: support in --user mode (#39322)
Daan De Meyer [Wed, 22 Oct 2025 10:59:46 +0000 (12:59 +0200)] 
import: support in --user mode (#39322)

This is the first half of #38728, just the parts that immediately touch
importd to add a --user mode for it.

2 weeks agoman: Clarify usage of /usr/share/factory/ in programs
Ryan Brue [Mon, 18 Aug 2025 17:12:26 +0000 (12:12 -0500)] 
man: Clarify usage of /usr/share/factory/ in programs

As discussed in this thread:
https://github.com/redhat-performance/tuned/issues/798#issuecomment-3197697654

/usr/share/factory/ is not intended to be read from by programs,
but the wording in the FHS can be misread to think that programs
should be using /usr/share/factory/ as the vendor supplied configuration
directory rather than something like /usr/lib/foo/ or /usr/share/foo/.

This commit points developers to the UAPI configuration spec for how to
make their programs hermetic /usr/ compatible.

Signed-off-by: Ryan Brue <ryanbrue.dev@gmail.com>
2 weeks agoDo not use "critical assert_return" in libsystemd or libudev 39307/head
Zbigniew Jędrzejewski-Szmek [Mon, 13 Oct 2025 18:44:05 +0000 (20:44 +0200)] 
Do not use "critical assert_return" in libsystemd or libudev

Previously, when compiled in developer mode, a call into libsystemd with
invalid parameters would result in an abort. This means that it's effectively
impossible to install such libsystemd in a normal system, since various
third-party programs may now abort. A shared library should generally never
abort or exit the calling program.

In python-systemd, the test suite calls into libsystemd, to check if the proper
return values are received and propagated through the Python wrappers.
Obviously with libsystemd compiled from git, the test suite now fails
in a nasty way.

So rework the code to set assert_return_is_critical similarly to how we handle
mempool enablement: the function that returns true is declared as a week
symbol, and we "opt in" by linking a file that provides the function in
libsystemd-shared. Effectively, libsystemd and libudev always have
assert_return_is_critical==false, and our binaries and modules enable it
conditionally.

2 weeks agobasic/mempool: mark mempool_enabled as _pure_
Zbigniew Jędrzejewski-Szmek [Mon, 13 Oct 2025 17:23:55 +0000 (19:23 +0200)] 
basic/mempool: mark mempool_enabled as _pure_

The function internally does caching which means that the result must
always be the same, the definition of a pure function. The compiler might
be able to optimize some repeated calls to the function.

2 weeks agotree-wide: extend $LISTEN_FDS protocol with $LISTEN_PIDFDID
Daniel Foster [Thu, 17 Jul 2025 23:59:14 +0000 (09:59 +1000)] 
tree-wide: extend $LISTEN_FDS protocol with $LISTEN_PIDFDID

Although extremely unlikely, there is a race present in solely checking the
$LISTEN_PID environment variable, due to PID recycling. Fix that by introducing
$LISTEN_PIDFDID, which contains the 64-bit ID of a pidfd for the child process
that is not subject to recycling.

2 weeks agoRemove dns0.eu from default DNS servers
Septatrix [Tue, 21 Oct 2025 14:07:18 +0000 (16:07 +0200)] 
Remove dns0.eu from default DNS servers

The service has ceased operation.
Partially reverts 02527e95b55f3f970d29d3001269311c60f6717c.

2 weeks agoimportd: downgrade log message about bound capability set dropping + netns 39322/head
Lennart Poettering [Mon, 18 Aug 2025 21:18:34 +0000 (23:18 +0200)] 
importd: downgrade log message about bound capability set dropping + netns

An unprivileged process cannot reduce its own capability bounding set,
hence, while it is nice to reduce the set, let's not log about it
loudly, in case we are invoked unpriv (which we explicity support these
days after all).

An unpriv process also cannot detach from its netns, hence also
downgrade the warning to a debug message.

2 weeks agoimportd: support unpacking tarballs to foreign UID range
Lennart Poettering [Mon, 18 Aug 2025 21:18:18 +0000 (23:18 +0200)] 
importd: support unpacking tarballs to foreign UID range

When invoked unprivileged, let's use a transiently allocated userns, so
that we can properly untar UIDs/GIDs so that the trees appear owned by
the foreign UID/GID range.

2 weeks agoimportd: clean up how we determine image root in importd backends
Lennart Poettering [Mon, 18 Aug 2025 14:45:16 +0000 (16:45 +0200)] 
importd: clean up how we determine image root in importd backends

Let's introduce a single helper that determines where to download images
to, taking all three primary parameters into account: the image class,
the runtime scope and whether to do runtime or persistency.

Then port everything over to this.

This not only cleans things up, but makes sure the importd backends
actually properly can deal with per-user downloads, as before we never
took the runtime scope into account for determining download location.

2 weeks agoimportctl: add --user/--system switches
Lennart Poettering [Fri, 25 Jul 2025 06:29:32 +0000 (08:29 +0200)] 
importctl: add --user/--system switches

2 weeks agoimportd: properly support operation in per-user mode
Lennart Poettering [Fri, 25 Jul 2025 06:25:29 +0000 (08:25 +0200)] 
importd: properly support operation in per-user mode

2 weeks agoimportd: teach all backends --system/--user mode
Lennart Poettering [Mon, 18 Aug 2025 07:12:27 +0000 (09:12 +0200)] 
importd: teach all backends --system/--user mode

The runtime scope logic is internally already in place, let's expose
this via getopt() command line too. This way importd later can propagate
the invocation scope down to the backends.

2 weeks agoinstall-file: add flags to handle RO and syncing failures graceful
Lennart Poettering [Tue, 19 Aug 2025 19:07:08 +0000 (21:07 +0200)] 
install-file: add flags to handle RO and syncing failures graceful

When operating in unprivileged mode we might not be able to execute the
necessary operations to make a disk image read-only (because
FS_IMMUTABEL_FL needs privs for example), and syncing (because for that
we might need to open the root inode, but that might not be possible
from the outside).

Let's deal with that by making these operation optional: if they work
great, if not they don't.

2 weeks agocopy: make copy_tree_at_full()'s 'to' parameter optional
Lennart Poettering [Tue, 19 Aug 2025 19:14:19 +0000 (21:14 +0200)] 
copy: make copy_tree_at_full()'s 'to' parameter optional

Sometimes it's quite useful to pin a source dir via an fd, as well as a
target dir the same way, and then ask copy_tree_at_full() to copy the
contents from one to the other. Make this possible, by allowing 'to' be
NULL. (Previously, it had to be non-NULL, i.e. the function would always
create a new dir, no matter what.)

Note that we only support that for dir inodes.

2 weeks agocopy: optionally apply source inode's stat() when doing a merge copy
Lennart Poettering [Tue, 19 Aug 2025 19:17:32 +0000 (21:17 +0200)] 
copy: optionally apply source inode's stat() when doing a merge copy

2 weeks agonsresource: add constants for the only supported UID range size allocations
Lennart Poettering [Tue, 21 Oct 2025 21:00:46 +0000 (23:00 +0200)] 
nsresource: add constants for the only supported UID range size allocations

As requested: https://github.com/systemd/systemd/pull/39322#discussion_r2447366728

2 weeks agodissect-image: explain one more error
Lennart Poettering [Tue, 21 Oct 2025 11:32:39 +0000 (13:32 +0200)] 
dissect-image: explain one more error

2 weeks agoci/oss-fuzz: switch to Ubuntu 24.04
Yu Watanabe [Sun, 19 Oct 2025 04:16:19 +0000 (13:16 +0900)] 
ci/oss-fuzz: switch to Ubuntu 24.04

With
https://github.com/google/oss-fuzz/pull/14112 and
https://github.com/google/oss-fuzz/pull/14128,
we can now use Ubuntu 24.04. Let's bump the image version.

Note, the i386 build failure mentioned in the removed comment is related to
https://bugs.launchpad.net/ubuntu/+source/linux-signed-azure/+bug/2071445
https://github.com/actions/runner-images/issues/9977
and has been already fixed.

2 weeks agoTEST-75-RESOLVED: stop socket units before stopping the main service
Yu Watanabe [Sun, 19 Oct 2025 03:38:35 +0000 (12:38 +0900)] 
TEST-75-RESOLVED: stop socket units before stopping the main service

Fixes the following warning:
TEST-75-RESOLVED.sh[2251]: ++ restart_resolved
TEST-75-RESOLVED.sh[2251]: ++ systemctl stop systemd-resolved.service
TEST-75-RESOLVED.sh[2271]: Stopping 'systemd-resolved.service', but its triggering units are still active:
TEST-75-RESOLVED.sh[2271]: systemd-resolved-monitor.socket, systemd-resolved-varlink.socket

2 weeks agohwdb: Add V64x_V65xAU to list of Clevo models where scancode f7+f8 get mapped to...
Hans de Goede [Mon, 20 Oct 2025 18:52:00 +0000 (20:52 +0200)] 
hwdb: Add V64x_V65xAU to list of Clevo models where scancode f7+f8 get mapped to touchpad-toggle

Fn + F1 which is the shortcut for toggling the touchpad on/off sends
atkbd scancodes f7 (first press) + f8 (second press) just like on various
other Clevo models. Add the V64x_V65xAU model to the list of models where
these scancodes are mapped to touchpad-toggle.

2 weeks agonetworkd: minor units to unit file Description= strings (#39386)
Lennart Poettering [Mon, 20 Oct 2025 20:14:17 +0000 (22:14 +0200)] 
networkd: minor units to unit file Description= strings (#39386)

2 weeks agounits: use Title Case for network generator description string 39386/head
Lennart Poettering [Mon, 20 Oct 2025 11:01:28 +0000 (13:01 +0200)] 
units: use Title Case for network generator description string

We use Title Case for all other units, do so here too.

2 weeks agonetworkd: call networkd a "network management" rather "network configuration" tool
Lennart Poettering [Mon, 20 Oct 2025 10:59:32 +0000 (12:59 +0200)] 
networkd: call networkd a "network management" rather "network configuration" tool

This has irked me for a while. For me network configuration is the stuff
we store on disk in configuration file. And networkd then *applies* the
configuration. But the units so far claimed that networkd was the
"configuration" itself. Which I guess might make sense to some, but to
me sounds a bit unprecise. Let's clean this up, and call what networkd
is doing "Network Management".

2 weeks agocore: adding cgroup/invocationid lookups to io.systemd.Unit.List (#38032)
Daan De Meyer [Mon, 20 Oct 2025 15:15:34 +0000 (17:15 +0200)] 
core: adding cgroup/invocationid lookups to io.systemd.Unit.List (#38032)

2 weeks agoSeveral preparations for supporting new coredump interface (#39350)
Yu Watanabe [Mon, 20 Oct 2025 11:44:22 +0000 (20:44 +0900)] 
Several preparations for supporting new coredump interface (#39350)

2 weeks agocoredumpctl: fix condition for checking coredump journal entry
Yu Watanabe [Fri, 17 Oct 2025 13:48:07 +0000 (22:48 +0900)] 
coredumpctl: fix condition for checking coredump journal entry

If one of PID, UID, GID, or SIGNAL is missing, then parse_uid() and
friends in the below will trigger assertion. This fixes that.

Also, only PID, UID, GID, SIGNAL, and COMM are mandatory fields, but
others are not, hence this drops others from the condition.

Moreover, this mekes 'coredumpctl --list' not fail even if there exists a
broken coredump entry in journal.

2 weeks agoloop-util: explain why we propagate discard_max_bytes from backing block device to...
Lennart Poettering [Mon, 20 Oct 2025 10:59:02 +0000 (12:59 +0200)] 
loop-util: explain why we propagate discard_max_bytes from backing block device to loopback block device

Follow-up for: 29ee9c6fb7c75c421f887c8579c65eb04d4f634d

2 weeks agonetwork/dhcp-server: several follow-ups for domain option (#39380)
Yu Watanabe [Mon, 20 Oct 2025 11:17:59 +0000 (20:17 +0900)] 
network/dhcp-server: several follow-ups for domain option (#39380)

Follow-ups for 3eb7b881bd7e5ebe54910fe343d0ee0963879aab (#39260).

2 weeks agocore: enable SELinux checks in io.systemd.Unit.List 38032/head
Ivan Kruglov [Wed, 16 Jul 2025 14:06:55 +0000 (07:06 -0700)] 
core: enable SELinux checks in io.systemd.Unit.List

2 weeks agotest: lookup a unit by cgroup and invocationID in TEST-74-AUX-UTILS.varlinkctl
Ivan Kruglov [Wed, 16 Jul 2025 13:03:50 +0000 (06:03 -0700)] 
test: lookup a unit by cgroup and invocationID in TEST-74-AUX-UTILS.varlinkctl

2 weeks agocore: io.systemd.Unit.List can lookup by InvocationID
Ivan Kruglov [Wed, 16 Jul 2025 14:03:49 +0000 (07:03 -0700)] 
core: io.systemd.Unit.List can lookup by InvocationID

2 weeks agocore: io.systemd.Unit.List can lookup unit by CGroup
Ivan Kruglov [Wed, 16 Jul 2025 13:56:59 +0000 (06:56 -0700)] 
core: io.systemd.Unit.List can lookup unit by CGroup

2 weeks agoloop-util: mirror discard limits from backing device
nkraetzschmar [Wed, 15 Oct 2025 22:12:50 +0000 (00:12 +0200)] 
loop-util: mirror discard limits from backing device

2 weeks agosd-dhcp-server: fix conditions for checking if static address is assigned to another...
Yu Watanabe [Sun, 19 Oct 2025 07:44:44 +0000 (16:44 +0900)] 
sd-dhcp-server: fix conditions for checking if static address is assigned to another host

Even if a static lease may be configured for a host, another address may
be previously assigned to the host. Let's not refuse to assign the
static lease to the host even in that case.

Fixes an issue reported at
https://github.com/systemd/systemd/issues/35781#issuecomment-3369545753.

2 weeks agogitignore: add aider
jouyouyun [Mon, 20 Oct 2025 08:56:02 +0000 (16:56 +0800)] 
gitignore: add aider

Aider is an open-source AI coding assistant. When used, it generates history,
cache, and other files in the project. To prevent these files from being committed, you need to add .aider* to your .gitignore file

2 weeks agoptyfwd: Always prioritize $SYSTEMD_TINT_BACKGROUND
Daan De Meyer [Mon, 20 Oct 2025 07:29:08 +0000 (09:29 +0200)] 
ptyfwd: Always prioritize $SYSTEMD_TINT_BACKGROUND

By giving priority to --background= we prevent users from opting
out of coloring if an explicit color is chosen by a tool wrapping
one of our own tools. Instead, let's give priority to the environment
variable, so that even if our tools are wrapped by another tool with
a different background, users can still opt out of coloring just by
setting the environment variable, which has a high chance of being
forwarded to the invocation of our own tools which makes it easy to
use to disable color tinting globally if requested by the user.

2 weeks agoresolved: move DNS RR/key/naswer/question/packet code to shared/ + other tweaks ...
Daan De Meyer [Mon, 20 Oct 2025 10:20:10 +0000 (12:20 +0200)] 
resolved: move DNS RR/key/naswer/question/packet code to shared/ + other tweaks (#39324)

2 weeks agocore: make name/pid lookup params use AND logic in io.systemd.Unit.List
Ivan Kruglov [Wed, 16 Jul 2025 13:47:22 +0000 (06:47 -0700)] 
core: make name/pid lookup params use AND logic in io.systemd.Unit.List

2 weeks agobasic: pidref_is_set_or_automatic()
Ivan Kruglov [Wed, 16 Jul 2025 12:57:56 +0000 (05:57 -0700)] 
basic: pidref_is_set_or_automatic()

2 weeks agodns-domain: make dns_name_change_suffix() work with an empty/null suffix 39324/head
Lennart Poettering [Mon, 13 Oct 2025 09:34:24 +0000 (11:34 +0200)] 
dns-domain: make dns_name_change_suffix() work with an empty/null suffix

2 weeks agodns-rr: when decoding an RR from json, make class optional
Lennart Poettering [Fri, 10 Oct 2025 13:34:42 +0000 (15:34 +0200)] 
dns-rr: when decoding an RR from json, make class optional

The DNS RR class is a weird thing, and IRL always set to IN (i.e. 0x1).
Let's hence make it something that can be specified optionally, and
imply IN if not specified.

This makes it a bit nicer to put together suitable json resource record
keys from the command line.

2 weeks agoresolved: move DNS RR/key/answer/question/packet tools to shared/
Lennart Poettering [Thu, 9 Oct 2025 20:59:58 +0000 (22:59 +0200)] 
resolved: move DNS RR/key/answer/question/packet tools to shared/

We want to reuse these generic DNS concepts in resolved hook
implementations, hence move them to shared code.

(This also enables us to immediately remove som SVCB record handling
duplicate definitions.)

No real code changes, just some moving around of things.

2 weeks agostub: check load options a little more carefully
Thomas Mühlbacher [Thu, 16 Oct 2025 12:56:52 +0000 (14:56 +0200)] 
stub: check load options a little more carefully

This can lead to booting with a completely garbled command line with characters
being interpreted as miscellaneous CJK or symbols.

According to the UEFI spec, the optional data of the load option is just a
binary data buffer.

2 weeks agosysext: Configure overlayfs mount options via envvar
Nick Labich [Fri, 17 Oct 2025 02:42:58 +0000 (22:42 -0400)] 
sysext: Configure overlayfs mount options via envvar

Implements #39314

2 weeks agoDon't tag i2c mice as pointing sticks (#39264)
Yu Watanabe [Mon, 20 Oct 2025 06:04:27 +0000 (15:04 +0900)] 
Don't tag i2c mice as pointing sticks (#39264)

There are no real i2c mice but there are i2c `FooBar Mouse` devices that
are an artifact of how the HID kernel drivers split up event nodes.
These nodes will be seen for some i2c keyboards and touchpads, depending
on the HID report descriptor.

Let's not tag those as pointing sticks.

Closes #36677

2 weeks agoman: fix position of </para> tag
Yu Watanabe [Mon, 20 Oct 2025 05:26:28 +0000 (14:26 +0900)] 
man: fix position of </para> tag

Follow-up for 65664bba4090816f7e1fe40ed743480c19d702ee.

2 weeks agohwdb: don't tag a named Mouse device as pointingstick 39264/head
Peter Hutterer [Thu, 9 Oct 2025 00:56:54 +0000 (10:56 +1000)] 
hwdb: don't tag a named Mouse device as pointingstick

The generic kernel hid drivers split up devices based on the application
collection, appending a suffix for each collection (e.g. Touchpad,
Mouse, ...). Many i2c touchpads get a "... Mouse" event node which is
mislabelled as pointingstick by the input_id builtin, see commit
3d7ac1c655ec40f3829543072494dcdfb92dbc6b.

Closes: https://github.com/systemd/systemd/issues/36677
2 weeks agorules: extend 60-input-id.rules to allow for bus/vid/pid/name matches
Peter Hutterer [Thu, 9 Oct 2025 00:55:16 +0000 (10:55 +1000)] 
rules: extend 60-input-id.rules to allow for bus/vid/pid/name matches

Same approach as used in 70-mouse.rules, allow for a name-based match
optionally combined with bus/vid/pid (which the existing modalias rule
would already allow us anyway). Note that ID_BUS isn't assigned until
after this rule has run so we need to use the id/bustype attribute
directly.

Related to https://github.com/systemd/systemd/issues/36677

2 weeks agonetwork/dhcp-server: several cleanups for setting domain to DHCP server 39380/head
Yu Watanabe [Mon, 20 Oct 2025 03:16:31 +0000 (12:16 +0900)] 
network/dhcp-server: several cleanups for setting domain to DHCP server

- use dns_name_parent(),
- only ignore errors when the current hostname does not have domain
  part, but make other errors like ENOMEM critical.

Follow-ups for 3eb7b881bd7e5ebe54910fe343d0ee0963879aab.

2 weeks agotest: add unit test for dns_name_parent()
Yu Watanabe [Mon, 20 Oct 2025 03:01:22 +0000 (12:01 +0900)] 
test: add unit test for dns_name_parent()

2 weeks agoman: fix typo
Yu Watanabe [Mon, 20 Oct 2025 02:25:41 +0000 (11:25 +0900)] 
man: fix typo

Follow-up for 938f7fea7c953e5f5e9e199a5fcd22ac84fd1240.

2 weeks agodocs: fix conversion / calculation errors
Marien Zwart [Sun, 19 Oct 2025 13:41:08 +0000 (00:41 +1100)] 
docs: fix conversion / calculation errors

0x1770 is 6000, not 60000. It looks like 60000 is intended (the next
range starts at 60000 in both decimal and hex), so use that.

1000 to 60000 is 59001 users, as the range is inclusive on both sides.
Similar off-by-one for one of the "unused" ranges. After these changes,
the sizes of the ranges up to and including the "-1" ID sum up to 65536,
as expected.

I'm not sure where the size of the unused range after the container UID
range came from, but it is not correct (the "Container UID" and this
reserved range combined would be larger than the "HIC SVNT LEONES" 2^31
to 2^32-2 range...). Fix it.

It is unfortunate that the first half of this table makes more sense in
decimal while the second half makes more sense in hex (which would also
make the size in 65536 chunks easy to obtain): I'm tempted to add a
"sizes in hex" column...

2 weeks agohostname-setup: introduce pidref_gethostname_full() 39350/head
Yu Watanabe [Sat, 11 Oct 2025 03:30:05 +0000 (12:30 +0900)] 
hostname-setup: introduce pidref_gethostname_full()

2 weeks agoiovec-wrapper: introduce iovw_put_string_fieldf()
Yu Watanabe [Wed, 8 Oct 2025 19:10:20 +0000 (04:10 +0900)] 
iovec-wrapper: introduce iovw_put_string_fieldf()

2 weeks agoiovec-wrapper: introduce iovw_replace_string_field()
Yu Watanabe [Wed, 15 Oct 2025 00:29:18 +0000 (09:29 +0900)] 
iovec-wrapper: introduce iovw_replace_string_field()

2 weeks agopidfd-util: expose pidfd_get_info()
Yu Watanabe [Tue, 7 Oct 2025 09:03:32 +0000 (18:03 +0900)] 
pidfd-util: expose pidfd_get_info()

2 weeks agoinclude: update struct pidfd_info and relevant constants
Yu Watanabe [Tue, 7 Oct 2025 09:02:44 +0000 (18:02 +0900)] 
include: update struct pidfd_info and relevant constants

2 weeks agoinclude: import linux/coredump.h from kernel v6.17.1
Yu Watanabe [Tue, 7 Oct 2025 09:00:31 +0000 (18:00 +0900)] 
include: import linux/coredump.h from kernel v6.17.1

2 weeks agocoredump: drop unnecessary header inclusion 39351/head
Yu Watanabe [Wed, 8 Oct 2025 01:06:55 +0000 (10:06 +0900)] 
coredump: drop unnecessary header inclusion

2 weeks agocoredump: split out process_kernel() to coredump-kernel-helper.[ch]
Yu Watanabe [Wed, 8 Oct 2025 05:24:17 +0000 (14:24 +0900)] 
coredump: split out process_kernel() to coredump-kernel-helper.[ch]

Then, rename to coredump_kernel_helper().

2 weeks agocoredump: split out functions for sending coredump to coredump-send.[ch]
Yu Watanabe [Wed, 8 Oct 2025 21:10:25 +0000 (06:10 +0900)] 
coredump: split out functions for sending coredump to coredump-send.[ch]

2 weeks agocoredump: split out process_socket() to coredump-receive.[ch]
Yu Watanabe [Wed, 8 Oct 2025 01:01:06 +0000 (10:01 +0900)] 
coredump: split out process_socket() to coredump-receive.[ch]

Then, rename to coredump_receive().

2 weeks agocoredump: split out acquire_pid_mount_tree_fd() and submit_coredump() to coredump...
Yu Watanabe [Wed, 8 Oct 2025 00:53:01 +0000 (09:53 +0900)] 
coredump: split out acquire_pid_mount_tree_fd() and submit_coredump() to coredump-submit.[ch]

Then this renames submit_coredump() to coredump_submit().

2 weeks agocoredump: split out process_backtrace() to coredump-backtrace.[ch]
Yu Watanabe [Wed, 8 Oct 2025 00:43:14 +0000 (09:43 +0900)] 
coredump: split out process_backtrace() to coredump-backtrace.[ch]

Then, rename to coredump_backtrace().

2 weeks agocoredump: split out metadata parsers to coredump-context.[ch]
Yu Watanabe [Wed, 8 Oct 2025 00:37:53 +0000 (09:37 +0900)] 
coredump: split out metadata parsers to coredump-context.[ch]

2 weeks agocoredump: split out conf parser to coredump-config.[ch]
Yu Watanabe [Wed, 8 Oct 2025 00:29:38 +0000 (09:29 +0900)] 
coredump: split out conf parser to coredump-config.[ch]

2 weeks agoci: add bpftool workaround to coverity too
Luca Boccassi [Sat, 18 Oct 2025 13:23:59 +0000 (14:23 +0100)] 
ci: add bpftool workaround to coverity too

2 weeks agoci: fix workaround about bpftool for codeql
Yu Watanabe [Sat, 18 Oct 2025 01:39:13 +0000 (10:39 +0900)] 
ci: fix workaround about bpftool for codeql

Follow-up for e9fd2bbfffc5c2c7cd1ea0a288d5435fc15e387f.

2 weeks agoAssorted coverity fixes (#39355)
Luca Boccassi [Fri, 17 Oct 2025 19:30:09 +0000 (20:30 +0100)] 
Assorted coverity fixes (#39355)

2 weeks agomkosi: install new knot-keymgr in Fedora rawhide
Luca Boccassi [Fri, 17 Oct 2025 12:30:37 +0000 (13:30 +0100)] 
mkosi: install new knot-keymgr in Fedora rawhide

https://src.fedoraproject.org/rpms/knot/c/52aa1c6b27ca981abe9960c0a4161be7204be75e

TEST-75-RESOLVED.sh[116]: + keymgr . generate algorithm=ECDSAP256SHA256 ksk=yes zsk=yes
TEST-75-RESOLVED.sh[454]: /usr/lib/systemd/tests/testdata/units/TEST-75-RESOLVED.sh: line 153: keymgr: command not found

2 weeks agolog: add underflow assert guard
Luca Boccassi [Fri, 17 Oct 2025 10:27:55 +0000 (11:27 +0100)] 
log: add underflow assert guard

We often use ssize_t in log_error macros, but typically return int
which confuses coverity, as technically there is no guarantee that
int and ssize_t have the same range. Add an assert to enforce it.