]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
8 weeks agoshift-uid: Add debug logging
Daan De Meyer [Thu, 5 Feb 2026 20:42:48 +0000 (21:42 +0100)] 
shift-uid: Add debug logging

8 weeks agodissect: Allow --shift for users with CAP_CHOWN
Daan De Meyer [Thu, 5 Feb 2026 20:42:27 +0000 (21:42 +0100)] 
dissect: Allow --shift for users with CAP_CHOWN

8 weeks agodissect: Introduce --copy-ownership= to configure chown behavior
DaanDeMeyer [Sat, 27 Dec 2025 19:37:02 +0000 (20:37 +0100)] 
dissect: Introduce --copy-ownership= to configure chown behavior

Currently, if we're copying a file, we won't copy the owner UID/GID
from the source. If we're copying a directory, we will copy the owner
UID/GID from the source. Let's give users a bit more control over this
behavior by introducing --copy-ownership= which will default to the
current behavior but allows users to explicitly enable/disable copying
of ownership.

8 weeks agodissect: Make --mount/--unmount/--with work unprivileged
DaanDeMeyer [Fri, 26 Dec 2025 21:18:29 +0000 (22:18 +0100)] 
dissect: Make --mount/--unmount/--with work unprivileged

Let's check for CAP_SYS_ADMIN instead of root for these, and make
unmounting more graceful if we can't access the backing loop device
because of permission issues. This allows mounting and unmounting images
from an unprvileged mount namespace. The actual files in the image will
end up owned by nobody:nobody because we'll be in an unprivileged user
namespace, but assuming the directory permissions are not too strict, this
still allows interacting with the image in useful ways.

8 weeks agodissect: Fix wrong errno passed to log message
DaanDeMeyer [Fri, 26 Dec 2025 21:36:39 +0000 (22:36 +0100)] 
dissect: Fix wrong errno passed to log message

8 weeks agodissect: Fix segmentation fault if loop device is not provided
DaanDeMeyer [Fri, 26 Dec 2025 21:36:21 +0000 (22:36 +0100)] 
dissect: Fix segmentation fault if loop device is not provided

8 weeks agodissect: Fix logging in (with)
DaanDeMeyer [Fri, 26 Dec 2025 21:36:08 +0000 (22:36 +0100)] 
dissect: Fix logging in (with)

8 weeks agodissect: Don't use private userns for --copy-to/--copy-from
DaanDeMeyer [Fri, 26 Dec 2025 20:51:00 +0000 (21:51 +0100)] 
dissect: Don't use private userns for --copy-to/--copy-from

These actions interact with the host. The former needs privileges to
write into the image, the latter needs privileges to write on the host.
Neither will have the privileges required if the image is attached under
a private userns, hence, don't use one.

2 months agoreport: simplify error propagation 40642/head
Zbigniew Jędrzejewski-Szmek [Mon, 9 Feb 2026 11:15:56 +0000 (12:15 +0100)] 
report: simplify error propagation

Returning EXIT_* from an inner function is unusual and better
avoided. Let's just return a negative value and let the caller
do the conversion.

2 months agosd-varlink: Allow using sd_varlink_reply() in streaming methods (#40546)
Daan De Meyer [Wed, 11 Feb 2026 13:58:12 +0000 (14:58 +0100)] 
sd-varlink: Allow using sd_varlink_reply() in streaming methods (#40546)

2 months agobootctl: Drop SD_VARLINK_NULLABLE from ListBootEntries IDL 40546/head
Daan De Meyer [Sun, 8 Feb 2026 21:16:52 +0000 (22:16 +0100)] 
bootctl: Drop SD_VARLINK_NULLABLE from ListBootEntries IDL

9e10f3a7e800ad67be8d8b14ae158a27438814f0 changed the implementation
to report an error instead of an empty object but the IDL was not
adjusted. Let's fix that.

2 months agotree-wide: Migrate to varlink_set_sentinel()
Daan De Meyer [Tue, 3 Feb 2026 11:51:46 +0000 (12:51 +0100)] 
tree-wide: Migrate to varlink_set_sentinel()

2 months agoresolve: Make sure we free varlink subscription sets
Daan De Meyer [Tue, 3 Feb 2026 08:42:15 +0000 (09:42 +0100)] 
resolve: Make sure we free varlink subscription sets

2 months agosd-varlink: Introduce varlink_set_sentinel()
Daan De Meyer [Mon, 2 Feb 2026 13:23:40 +0000 (14:23 +0100)] 
sd-varlink: Introduce varlink_set_sentinel()

Streaming methods which are not used as a continuous subscription but
instead only send a series of objects all end up with the same workaround
to be able to figure out when to send sd_varlink_reply() or sd_varlink_notify().
Let's generalize this in sd-varlink itself.

Let's introduce the concept of a sentinel, which is a reply that will be sent
by sd-varlink if no other reply was queued by a method callback. The sentinel
is configured with varlink_set_sentinel(). If a sentinel is configured,
sd_varlink_reply() can be used more than once in streaming methods to queue
multiple values to stream to the client. The last queued reply is not sent
until the callback finishes. When the callback finishes, the last reply is
sent without "continues: more". If no reply was queued, the sentinel is sent.

This always using only sd_varlink_reply() in such streaming methods and
leaves sd_varlink_notify() available solely for continuous subscription
streaming methods, where we never use sd_varlink_reply() and instead disconnect
when the server exits.

2 months agosd-varlink: Move code around
Daan De Meyer [Mon, 2 Feb 2026 11:59:06 +0000 (12:59 +0100)] 
sd-varlink: Move code around

Preparation for next commits

2 months agovarlink-unit: Coding style cleanups
Daan De Meyer [Wed, 11 Feb 2026 08:39:04 +0000 (09:39 +0100)] 
varlink-unit: Coding style cleanups

2 months agonspawn: simplify parsing of --hostname/--machine
Zbigniew Jędrzejewski-Szmek [Wed, 3 Dec 2025 21:58:46 +0000 (22:58 +0100)] 
nspawn: simplify parsing of --hostname/--machine

2 months agoreport: fix hang when we start skipping metrics
Zbigniew Jędrzejewski-Szmek [Wed, 11 Feb 2026 11:44:13 +0000 (12:44 +0100)] 
report: fix hang when we start skipping metrics

Fixup for 0ec663a41fc49a3e4ec592c4e0037f4bc7e8f6fc.

2 months agoMetrics: Refactor to drop usage of strv
Yaping Li [Mon, 9 Feb 2026 14:47:27 +0000 (06:47 -0800)] 
Metrics: Refactor to drop usage of strv

This addresses Daan's feedback on #39202

2 months agojournal-upload: drop custom option error handling
Zbigniew Jędrzejewski-Szmek [Mon, 8 Dec 2025 09:52:11 +0000 (10:52 +0100)] 
journal-upload: drop custom option error handling

The line to set opterr=0 was added in the initial commit in
3d090cc6f34e5970765dd1e7ee5e648a056d180d. But afaict, this never worked as
intended, because ':' must be the first char in optstring given to
getopt_long() for it to return ':' for a missing option value. Since
this wasn't set, getopt_long() would return '?', and the missing value
would be handled as an unknown option:
  $ build/systemd-journal-upload --key
  Unknown option --key.
  $ build/systemd-journal-upload --asdf
  Unknown option --asdf.

Let's just do the standard thing:
  $ build/systemd-journal-upload --key
  build/systemd-journal-upload: option '--key' requires an argument
  $ build/systemd-journal-upload --asdf
  build/systemd-journal-upload: unrecognized option '--asdf'

2 months agocryptenroll: simplification
Zbigniew Jędrzejewski-Szmek [Fri, 5 Dec 2025 18:14:43 +0000 (19:14 +0100)] 
cryptenroll: simplification

2 months agocryptenroll: split out parser for --wipe-slot=
Zbigniew Jędrzejewski-Szmek [Fri, 5 Dec 2025 18:14:00 +0000 (19:14 +0100)] 
cryptenroll: split out parser for --wipe-slot=

2 months agopath: simplify run()
Zbigniew Jędrzejewski-Szmek [Thu, 4 Dec 2025 13:00:28 +0000 (14:00 +0100)] 
path: simplify run()

No functional change, just less indents.

2 months agomount-tool: fix confusion in --help
Zbigniew Jędrzejewski-Szmek [Tue, 9 Dec 2025 12:46:48 +0000 (13:46 +0100)] 
mount-tool: fix confusion in --help

See grandparent commit for explanation.

2 months agoimportctl: fix confusion in --help
Zbigniew Jędrzejewski-Szmek [Sat, 6 Dec 2025 12:36:43 +0000 (13:36 +0100)] 
importctl: fix confusion in --help

See parent commit for explanation.

2 months agocgtop: fix confusion in --help
Zbigniew Jędrzejewski-Szmek [Wed, 3 Dec 2025 14:23:12 +0000 (15:23 +0100)] 
cgtop: fix confusion in --help

When we say '-n --iterations=N' in --help, this means that the program
can be invoked with '-n N' or '--iterations=N' or '--iterations N'.
(The short option is specified without the argument.)

Here we tried to use '-p --order=path' to mean that the program can be
invoked with '-p' or '--order=path', but that is incompatible with the
established convention.

Also, indicate that the arg to --cpu is optional.

2 months agoNEWS: add entry about non-system accounts 40612/head
Zbigniew Jędrzejewski-Szmek [Mon, 9 Feb 2026 21:18:30 +0000 (22:18 +0100)] 
NEWS: add entry about non-system accounts

2 months agonetworkd: downgrade error for non-system users/groups to a warning
Zbigniew Jędrzejewski-Szmek [Mon, 9 Feb 2026 11:02:03 +0000 (12:02 +0100)] 
networkd: downgrade error for non-system users/groups to a warning

This reverts (in spirit) "network/tuntap: deny from owning Tun/Tap interfaces",
commit 940441b44c7040d62ae58b66bf124e9a0dae578d.

Justification similar as in the previous commit. The check is only
partially connected to the intended purpose and breaks backwards compat
without a sufficient reason.

Alternative fix for #37279.

2 months agoudev-rules: downgrade error about non-system user/group in OWNER=/GROUP=
Zbigniew Jędrzejewski-Szmek [Mon, 9 Feb 2026 11:02:02 +0000 (12:02 +0100)] 
udev-rules: downgrade error about non-system user/group in OWNER=/GROUP=

This reverts (in sprit) commit f5cdf9515aceca2e91f9a33b74267e0cf5a5b7e8,
"udev-rules: ignore non-system user/group in OWNER=/GROUP=".

The original change was done to clean up a situation where we added a
new group, but the group could already have been used for some other
purposes, and now the some unexpected entity would own the device.
Unfortunately, this check doesn't really address the issue, since the
existing account might as well be a system account, which might be
equally bad. In addition, this change is a big compatiblity break,
causing existing rules to stop working. Since quite a lot of systems
have local configuration to assign devices to users for various
purposes, this is very noticable to users. In a way, the original change
to add a new group was the compat break, and follow-up patch to cahnge
the rule parsing evolved a small compat break into a much bigger one.
There is merit to the change though, since device nodes shouldn't be
owned by users and groups and different mechanisms should be used
instead. To avoid breaking users systems, and since the original goal
cannot be achieved by this patch, let's downgrade this to a warning
to guide users towards different solutions.

2 months agoask-password-api: several modernizations for ask_password_agent() 40631/head
Mike Yuan [Wed, 4 Feb 2026 01:41:07 +0000 (02:41 +0100)] 
ask-password-api: several modernizations for ask_password_agent()

* Replace goto cleanup with block_signals_reset + CLEANUP_TMPFILE_AT
* Use RENAME_NOREPLACE to make sure we don't overwrite any ongoing request
* Reword log messages a bit

2 months agovarious: port manual goto cleanup to CLEANUP_TMPFILE_AT
Mike Yuan [Wed, 4 Feb 2026 01:31:51 +0000 (02:31 +0100)] 
various: port manual goto cleanup to CLEANUP_TMPFILE_AT

2 months agotmpfile-util: do not skip CLEANUP_TMPFILE_AT for AT_FDCWD
Mike Yuan [Wed, 4 Feb 2026 01:15:49 +0000 (02:15 +0100)] 
tmpfile-util: do not skip CLEANUP_TMPFILE_AT for AT_FDCWD

Preparation for later commits.

2 months agoterminal-util: handle the case where no system console is active (#40630)
Mike Yuan [Tue, 10 Feb 2026 22:59:07 +0000 (23:59 +0100)] 
terminal-util: handle the case where no system console is active (#40630)

/dev/console might have no backing driver, in which case
/sys/class/tty/console/active is empty. Unlike get_kernel_consoles()
resolve_dev_console() currently proceeds with empty devnode, resulting
in setup_input() -> acquire_terminal() emitting -EISDIR as we're trying
to open /dev/. Let's catch this and report -ENXIO.

2 months agoTEST-54-CREDS: add test cases for credential refreshing 40093/head
Mike Yuan [Tue, 10 Feb 2026 07:13:39 +0000 (08:13 +0100)] 
TEST-54-CREDS: add test cases for credential refreshing

2 months agoterminal-util: also protect from empty /sys/class/tty/tty0/active 40630/head
Mike Yuan [Tue, 10 Feb 2026 21:21:25 +0000 (22:21 +0100)] 
terminal-util: also protect from empty /sys/class/tty/tty0/active

2 months agoterminal-util: handle the case where no system console is active
Mike Yuan [Fri, 6 Feb 2026 01:07:05 +0000 (02:07 +0100)] 
terminal-util: handle the case where no system console is active

/dev/console might have no backing driver, in which case
/sys/class/tty/console/active is empty. Unlike get_kernel_consoles()
resolve_dev_console() currently proceeds with empty devnode,
resulting in setup_input() -> acquire_terminal() emitting -EISDIR
as we're trying to open /dev/. Let's catch this and report -ENXIO.

2 months agotest-load-fragment: add unit test for RefreshOnReload= parser
Mike Yuan [Tue, 10 Feb 2026 06:34:57 +0000 (07:34 +0100)] 
test-load-fragment: add unit test for RefreshOnReload= parser

2 months agoman: document RefreshOnReload=
Mike Yuan [Mon, 15 Dec 2025 22:58:07 +0000 (23:58 +0100)] 
man: document RefreshOnReload=

2 months agocore/service: if RefreshOnReload= is explicitly enabled, allow reload even without...
Mike Yuan [Sun, 14 Dec 2025 16:55:04 +0000 (17:55 +0100)] 
core/service: if RefreshOnReload= is explicitly enabled, allow reload even without exec/notify-reload

This was originally brought up by @poettering. If the process
loads stuff on demand and flushes them out after each use,
or actively monitors file changes, they can be reloaded
by merely refreshing the resources.

2 months agocore/service: pass credentials to ExecReload*= if refreshed
Mike Yuan [Sun, 14 Dec 2025 13:47:20 +0000 (14:47 +0100)] 
core/service: pass credentials to ExecReload*= if refreshed

Closes #35227

2 months agocore/service: support credential refreshing on reload
Mike Yuan [Sun, 14 Dec 2025 13:46:57 +0000 (14:46 +0100)] 
core/service: support credential refreshing on reload

Closes #21099

2 months agomacro: add 22nd case for IN_SET
Mike Yuan [Mon, 15 Dec 2025 23:02:01 +0000 (00:02 +0100)] 
macro: add 22nd case for IN_SET

Dejavu moment ;)

2 months agocore/service: introduce RefreshOnReload= setting
Mike Yuan [Sun, 14 Dec 2025 17:20:36 +0000 (18:20 +0100)] 
core/service: introduce RefreshOnReload= setting

This allows controlling resources to be refreshed before performing
reload, with one extra benefit that in the future we can permit
"seemless reload"s, i.e. no active signaling is done to the main process
after refreshing get updated. This could come in handy for programs
that loads stuff on demand or watches changes via inotify.

2 months agocore/exec-credential: introduce unit_refresh_credentials()
Mike Yuan [Sun, 14 Dec 2025 13:31:30 +0000 (14:31 +0100)] 
core/exec-credential: introduce unit_refresh_credentials()

2 months agoprocess-util: teach namespace_fork() to optionally use namespace_enter_delegated()
Mike Yuan [Mon, 15 Dec 2025 18:46:59 +0000 (19:46 +0100)] 
process-util: teach namespace_fork() to optionally use namespace_enter_delegated()

2 months agonamespace-util: introduce namespace_enter_delegated()
Mike Yuan [Wed, 17 Dec 2025 11:32:14 +0000 (12:32 +0100)] 
namespace-util: introduce namespace_enter_delegated()

Typically when entering a namespace the userns is handled last,
because we assume our process is more privileged than the userns.
However, that assumption no longer holds for user managers, which
have no privilege over initial userns and all other namespaces
are actually owned by the userns unshared first (in executor).
Hence, let's add another flavor namespace_enter_delegated() to
accommodate that use case.

2 months agocore/exec-credential: only pass needed bits of ExecParameters down in exec_setup_cred...
Mike Yuan [Sun, 14 Dec 2025 07:56:35 +0000 (08:56 +0100)] 
core/exec-credential: only pass needed bits of ExecParameters down in exec_setup_credentials()

No functional change, preparation for credential reloading support,
where we'd operate on Unit rather than ExecParameters.

2 months agocore/exec-credential: avoid duplicate call to hashmap_contains()
Mike Yuan [Sun, 18 Jan 2026 17:32:46 +0000 (18:32 +0100)] 
core/exec-credential: avoid duplicate call to hashmap_contains()

2 months agocore/exec-credential: stop removing empty credentials dir
Mike Yuan [Sat, 13 Dec 2025 16:37:26 +0000 (17:37 +0100)] 
core/exec-credential: stop removing empty credentials dir

Starting from cfbf7538d87023840c5574fa5b0452e5b0f42149 we'd always
install the credentials dir regardless of whether it's empty,
with the correct permissions. Hence the problem stated in the comment
should no longer be a concern. Moreover, this ensures later in
setup_namespace() the mountpoint would be in-place. This is important
for credential reloading as it saves the trouble of remounting
the upper tmpfs as rw again and create the mountpoint.

2 months agocore/exec-credential: treat credentials dir as populated if it's mounted
Mike Yuan [Sat, 13 Dec 2025 17:11:07 +0000 (18:11 +0100)] 
core/exec-credential: treat credentials dir as populated if it's mounted

We should only fall back to the dir_is_empty() check if
it's a plain dir, where we can't reasonably differentiate
populated yet empty vs not set up. Otherwise let's stick
to the existing mount if we're told to reuse it.

Yes, this is a minor compat break, but with the to-be-introduced
credential reloading support it should fulfill the goal of
keeping the passed set of credentials stable better, while
still allowing things to be refreshed when requested.

2 months agosd-daemon: escape special characters in notification logging text
Mike Yuan [Tue, 10 Feb 2026 14:58:06 +0000 (15:58 +0100)] 
sd-daemon: escape special characters in notification logging text

Follow-up for 21eb636aaad28707bd371bdfd721dea66277e1f5

Our sd_notify() protocol uses newline as separator, which
is not suitable for direct logging.

2 months agoshared-forward: sort definitions
Mike Yuan [Tue, 10 Feb 2026 20:53:02 +0000 (21:53 +0100)] 
shared-forward: sort definitions

2 months agobootctl: decouple "list", "unlink", "cleanup"
Lennart Poettering [Mon, 9 Feb 2026 13:20:27 +0000 (14:20 +0100)] 
bootctl: decouple "list", "unlink", "cleanup"

These operations to quite different things, they just share 2 common
funcs. Let's split them out into separate files.

This also splits up verb_list() into separate calls for the three
operations. This actually fixes issues, as for status/list we want
"unpriv" ESP discovery logic, but for the other two we really should
have privileged discovery logic.

This is preparation for adding "bootctl link" later, but this makes
sense either way, I am sure.

2 months agosysupdated: Factor out a common check about job types
Philip Withnall [Mon, 19 Jan 2026 17:15:33 +0000 (17:15 +0000)] 
sysupdated: Factor out a common check about job types

This introduces no functional changes.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2 months agoTwo mkosi fixes (#40625)
Luca Boccassi [Tue, 10 Feb 2026 17:07:11 +0000 (17:07 +0000)] 
Two mkosi fixes (#40625)

2 months agomkosi: Grow the root partition on boot 40625/head
Daan De Meyer [Tue, 10 Feb 2026 15:32:05 +0000 (16:32 +0100)] 
mkosi: Grow the root partition on boot

Let's make sure the root partition takes up all the allocated space
on boot.

2 months agomkosi: Move generic disk partition before root partition
Daan De Meyer [Tue, 10 Feb 2026 15:31:22 +0000 (16:31 +0100)] 
mkosi: Move generic disk partition before root partition

Otherwise we can't grow the root partition.

2 months agoFix order of class/type in resolve man page
Christopher Head [Tue, 10 Feb 2026 01:22:12 +0000 (17:22 -0800)] 
Fix order of class/type in resolve man page

For each RR `ResolveRecord` returns, it returns the class before the
type, not after.

2 months agosysupdate: Split update into acquire and install verbs (#40236)
Luca Boccassi [Tue, 10 Feb 2026 13:11:52 +0000 (13:11 +0000)] 
sysupdate: Split update into acquire and install verbs (#40236)

Using roughly the approach described in
https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/2004#note_2145880.
Basically, copying in-progress downloads to a file/partition with a
predictable prefix, and then moving to a predictable ‘pending’ prefix
when ready to install.

Helps: https://github.com/systemd/systemd/issues/34814

2 months agobootctl: install tweaks (#40622)
Luca Boccassi [Tue, 10 Feb 2026 13:04:48 +0000 (13:04 +0000)] 
bootctl: install tweaks (#40622)

2 months agorepart: Discard only once
Kai Lüke [Thu, 5 Feb 2026 17:51:07 +0000 (18:51 +0100)] 
repart: Discard only once

The indirect discard in mkfs.btrfs on the loop device mapped to the
region on disk can hang and fail the first-boot creation of the rootfs.
Since there already is a discard done we anyway don't need to do it
twice. This might help for most cases to avoid the failure in
mkfs.btrfs.
Keep track if the direct discard worked and then skip the mkfs.btrfs
discard if it did. This still leaves the case where mkfs.btrfs can hang
when the direct discard couldn't succeed and mkfs.btrfs tries again but
since the conditions are rather the same it might be that this case is
not easy to trigger. If the problem still shows up and the kernel won't
be fixed soon we can still disable the mkfs discard for at least btrfs.

2 months agoupdate TODO
Lennart Poettering [Tue, 10 Feb 2026 11:39:13 +0000 (12:39 +0100)] 
update TODO

2 months agobootctl: rearrange if branches in vl_method_install() 40622/head
Lennart Poettering [Tue, 10 Feb 2026 10:47:33 +0000 (11:47 +0100)] 
bootctl: rearrange if branches in vl_method_install()

2 months agobootctl: toughen fd validation in Install() handler
Lennart Poettering [Tue, 10 Feb 2026 10:46:58 +0000 (11:46 +0100)] 
bootctl: toughen fd validation in Install() handler

Let's also check the fd flags. Just in case.

2 months agobootctl: fix varlink IDL for rootDirectory field
Lennart Poettering [Tue, 10 Feb 2026 10:48:25 +0000 (11:48 +0100)] 
bootctl: fix varlink IDL for rootDirectory field

2 months agodiscover-image: restore compatibility with C9S and overlayfs directories (#40616)
Zbigniew Jędrzejewski-Szmek [Tue, 10 Feb 2026 06:56:48 +0000 (07:56 +0100)] 
discover-image: restore compatibility with C9S and overlayfs directories (#40616)

5817c73391b5f3599c50df2c0873b26ea426f848 broke compatibility with CentOS
9 and overlayfs directories, the following fails with -EOPTNOTSUPP:

mount -t overlay overlay -o lowerdir=/tmp/app1:/tmp/rootdir /tmp/overlay
portablectl attach --copy=symlink --now --runtime /tmp/overlay app1

name_to_handle_at() fails both with and without AT_HANDLE_MNT_ID_UNIQUE.

Restore the fallback to path_get_mnt_id_at() that was removed. Fixes
TEST-29-PORTABLE.directory

Follow-up for 5817c73391b5f3599c50df2c0873b26ea426f848

2 months agocatalog: fix grammar
Zbigniew Jędrzejewski-Szmek [Mon, 9 Feb 2026 14:30:03 +0000 (15:30 +0100)] 
catalog: fix grammar

2 months agomkosi: isc-dhcp-server was dropped from debian testing/unstable 40616/head
Luca Boccassi [Mon, 9 Feb 2026 20:03:38 +0000 (20:03 +0000)] 
mkosi: isc-dhcp-server was dropped from debian testing/unstable

2 months agodiscover-image: restore compatibility with C9S and overlayfs directories
Luca Boccassi [Mon, 9 Feb 2026 19:19:27 +0000 (19:19 +0000)] 
discover-image: restore compatibility with C9S and overlayfs directories

5817c73391b5f3599c50df2c0873b26ea426f848 broke compatibility with
CentOS 9 and overlayfs directories, the following fails with -EOPTNOTSUPP:

mount -t overlay overlay -o lowerdir=/tmp/app1:/tmp/rootdir /tmp/overlay
portablectl attach --copy=symlink --now --runtime /tmp/overlay app1

name_to_handle_at() fails both with and without AT_HANDLE_MNT_ID_UNIQUE.

Restore the fallback to path_get_mnt_id_at() that was removed.
Fixes TEST-29-PORTABLE.directory

Follow-up for 5817c73391b5f3599c50df2c0873b26ea426f848

2 months agomeson: guard symlinks in sysconfdir behind install_sysconfidr
nikstur [Sun, 8 Feb 2026 13:22:28 +0000 (14:22 +0100)] 
meson: guard symlinks in sysconfdir behind install_sysconfidr

Symlinks to files inside sysconfdir are now only installed if
ìnstall_sysconfdir=true (which is the default).

If sshconfdir,sshdconfdir,shellprofiledir are not inside sysconfdir and
install_sysconfidr=false, these symlinks are still installed to the
configured directory.

2 months agotest: Add basic tests for path_split_prefix_filename()
Philip Withnall [Mon, 9 Feb 2026 12:13:51 +0000 (12:13 +0000)] 
test: Add basic tests for path_split_prefix_filename()

These aren’t anything comprehensive, but provide some basic assurances
that it’s working correctly. In particular, they test its behaviour when
*both* the prefix and filename components are requested.

Split out from the original version of this function which was part
of #40236.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2 months agojournald: set a lower size limit for FDs from unpriv processes
Luca Boccassi [Thu, 5 Feb 2026 00:39:35 +0000 (00:39 +0000)] 
journald: set a lower size limit for FDs from unpriv processes

Unprivileged processes can send 768M in a FD-based message to journald,
which will be malloc'ed in one go, likely causing memory issues.
Set the limit for unprivileged users to 24M.

Allow coredumps as an exception, since we always allowed storing
up to the 768M max core files in the journal.

Reported on yeswehack.com as #YWH-PGM9780-48

2 months agotest: Expand sysupdate test to cover split acquire/install updates 40236/head
Philip Withnall [Mon, 12 Jan 2026 16:43:46 +0000 (16:43 +0000)] 
test: Expand sysupdate test to cover split acquire/install updates

This essentially means the sysupdate tests are now run twice: once with
a monolithic update (`sysupdate update`) and once with a split update
(`sysupdate acquire; sysupdate install`).

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2 months agosysupdate: Add some more debug output
Philip Withnall [Mon, 12 Jan 2026 16:43:20 +0000 (16:43 +0000)] 
sysupdate: Add some more debug output

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2 months agosysupdate: Add acquire and install verbs
Philip Withnall [Wed, 31 Dec 2025 00:48:54 +0000 (00:48 +0000)] 
sysupdate: Add acquire and install verbs

These expose the two parts of ‘update’, so that update sets can be
acquired (downloaded) and installed (applied) in separate actions at
different times. For example, this could allow a load of update sets to
be acquired when online, and later applied when offline.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: https://github.com/systemd/systemd/issues/34814

2 months agosysupdate: Split the update verb into two parts internally
Philip Withnall [Wed, 31 Dec 2025 00:46:25 +0000 (00:46 +0000)] 
sysupdate: Split the update verb into two parts internally

An ‘acquire’ (download) part, and an ‘install’ (apply) part.

Following commits will expose these as separate verbs and D-Bus methods,
but this commit is the one which rearranges the internals.

If doing an ‘install’, a mirror version of the ‘acquire’ has to happen
first to make sure the transfer’s internal state is correct.

‘Acquire’ can require an internet connection, but ‘install’ will always
work with `--offline` specified.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: https://github.com/systemd/systemd/issues/34814

2 months agosysupdate: Add partial/pending flags to UpdateSet
Philip Withnall [Wed, 31 Dec 2025 00:42:17 +0000 (00:42 +0000)] 
sysupdate: Add partial/pending flags to UpdateSet

This commit adds the flags and some basic formatting/printing of them.
Following commits will integrate them into the update/acquire/install
logic.

`UPDATE_PARTIAL` is set if any of the instances in the `UpdateSet` are
partial, i.e. have been partially downloaded.

`UPDATE_PENDING` is set if any of the instances in the `UpdateSet` are
pending, i.e. have been acquired (downloaded) but not yet installed.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: https://github.com/systemd/systemd/issues/34814

2 months agosysupdate: Factor out temporary path computation for transfers
Philip Withnall [Wed, 31 Dec 2025 00:36:22 +0000 (00:36 +0000)] 
sysupdate: Factor out temporary path computation for transfers

This helper function will be reused in a following commit.

This introduces no functional changes.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: https://github.com/systemd/systemd/issues/34814

2 months agosysupdate: Vacuum partial/pending instances first
Philip Withnall [Wed, 31 Dec 2025 00:05:05 +0000 (00:05 +0000)] 
sysupdate: Vacuum partial/pending instances first

Modify the vacuum implementation to preferentially vacuum partial or
pending transfers first (unless protected) as they are meant to be
fairly transitory, and ones which are hanging around have probably been
forgotten about and/or are out of date.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: https://github.com/systemd/systemd/issues/34814

2 months agosysupdate: Implement acquire and install steps for transfers
Philip Withnall [Wed, 31 Dec 2025 00:02:06 +0000 (00:02 +0000)] 
sysupdate: Implement acquire and install steps for transfers

Instead of using a random temporary path for file transfers, use a
predictable one which indicates whether the transfer is partially
complete or pending installation. Similarly for partitions.

This is another step towards being able to split the ‘update’ step into
‘acquire’ and ‘install’.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: https://github.com/systemd/systemd/issues/34814

2 months agosysupdate: Factor out a vacuum helper function
Philip Withnall [Tue, 30 Dec 2025 23:56:22 +0000 (23:56 +0000)] 
sysupdate: Factor out a vacuum helper function

This will be reused in an upcoming commit.

This commit introduces no functional changes.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: https://github.com/systemd/systemd/issues/34814

2 months agosysupdate: Allow instances to be partial or pending
Philip Withnall [Tue, 30 Dec 2025 23:49:47 +0000 (23:49 +0000)] 
sysupdate: Allow instances to be partial or pending

If we allow target instances to be partial or pending, we can build on
top of this to allow updates to be split into two phases: ‘acquire’ (which
takes an available source instance and copies it (temporarily partial) to
a pending target instance; and ‘install’ (which takes a pending target
instance and installs it as an installed target instance).

This commit introduces a file/directory and partition prefix naming
scheme to identify partial and pending instances.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: https://github.com/systemd/systemd/issues/34814

2 months agosysupdate: Split context_apply() into acquire and install steps
Philip Withnall [Mon, 17 Nov 2025 15:14:19 +0000 (15:14 +0000)] 
sysupdate: Split context_apply() into acquire and install steps

This introduces no functional changes at the moment, but will be used in
upcoming commits.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: https://github.com/systemd/systemd/issues/34814

2 months agokernel-install refactorings (#40610)
Lennart Poettering [Mon, 9 Feb 2026 10:54:36 +0000 (11:54 +0100)] 
kernel-install refactorings (#40610)

This contains the first two commits from #38764. While @daandemeyer
convinced me to base systemd-sysinstall on a new "bootctl link" rather
than "kernel-install", I think the refactorings I prepped as part of the
original work still make a lot of sense on their own, and I hope I
didn't do them for /dev/null.

2 months agotree-wide: symlink well-known Varlink service entry point sockets into /run/varlink...
Lennart Poettering [Mon, 9 Feb 2026 10:54:15 +0000 (11:54 +0100)] 
tree-wide: symlink well-known Varlink service entry point sockets into /run/varlink/registry/ (#40590)

This is generally useful, but is particularly useful in context of
https://github.com/mvo5/varlink-proxy-rs which can expose a set of local
Varlink services via a HTTP bridge. The idea is that the sockets linked
into /run/varlink/registry/ are candidates for being exposed like that.

/cc @mvo5

2 months agopath-util: unify path_extract_filename/directory into path_split_prefix_filename...
Mike Yuan [Mon, 9 Feb 2026 10:03:14 +0000 (11:03 +0100)] 
path-util: unify path_extract_filename/directory into path_split_prefix_filename() (#40608)

2 months agoTwo cleanups (#40587)
Zbigniew Jędrzejewski-Szmek [Mon, 9 Feb 2026 10:02:41 +0000 (11:02 +0100)] 
Two cleanups (#40587)

2 months agohwdb: quote invalid patterns in error messages 40587/head
Zbigniew Jędrzejewski-Szmek [Fri, 6 Feb 2026 14:28:48 +0000 (15:28 +0100)] 
hwdb: quote invalid patterns in error messages

If the pattern is invalid, we don't quite know how it looks, so it's
safer to quote it.

Also simplify the call to sorted().

2 months agoFix wording in two places
Zbigniew Jędrzejewski-Szmek [Fri, 6 Feb 2026 14:24:43 +0000 (15:24 +0100)] 
Fix wording in two places

Noticed this while going through the stable series…
Also update location after 97318131fd06a5bc35454da81dcbbc84f16d9940.

2 months agoupdate TODO 40590/head
Lennart Poettering [Fri, 6 Feb 2026 17:08:07 +0000 (18:08 +0100)] 
update TODO

2 months agotest: add superficial test for list-registry
Lennart Poettering [Fri, 6 Feb 2026 16:13:11 +0000 (17:13 +0100)] 
test: add superficial test for list-registry

2 months agoman: document new varlinkctl feature
Lennart Poettering [Fri, 6 Feb 2026 16:07:14 +0000 (17:07 +0100)] 
man: document new varlinkctl feature

2 months agovarlinkctl: add 'list-registry' command
Lennart Poettering [Fri, 6 Feb 2026 14:04:48 +0000 (15:04 +0100)] 
varlinkctl: add 'list-registry' command

2 months agochase: add new flag CHASE_MUST_BE_SOCKET
Lennart Poettering [Fri, 6 Feb 2026 14:03:23 +0000 (15:03 +0100)] 
chase: add new flag CHASE_MUST_BE_SOCKET

Just like CHASE_MUST_BE_DIRECTORY and CHASE_MUST_BE_REGULAR, but test if
the inode is a socket.

2 months agostat-util: add stat_verify_socket() helper
Lennart Poettering [Fri, 6 Feb 2026 14:02:45 +0000 (15:02 +0100)] 
stat-util: add stat_verify_socket() helper

2 months agounits: symlink well-known Varlink services into /run/varlink/registry/
Lennart Poettering [Fri, 6 Feb 2026 14:04:11 +0000 (15:04 +0100)] 
units: symlink well-known Varlink services into /run/varlink/registry/

So far we didn't provide any concept to enumerate local Varlink
services. Let's change that.

Let's define very light-weight scheme for this: provide a well-known dir
/run/varlink/registry/ where services that implement public interfaces
can link their sockets into. When enumerating services it's thus
sufficient to enumerate inodes in that directory.

The usecase for this is twofold:

1. It's simply very useful to be able to see which public services are
   bound on the local system, for debugging/admin/development purposes.

2. At Amutable we'd like to optionally provide a HTTP-to-Varlink bridge
   on individual nodes, that allows remote peers (after authentication)
   to access local Varlink services. For that it's essential we know the
   list of services and their entrypoints to expose, it would be
   security-wise highly problematic for clients to provide AF_UNIX
   entrypoint paths when connecting. hence: let's instead just have a
   dir with the public stuff, and let's ensure the HTTP-to-Varlink
   bridge simply exposes that stuff, and nothing else.

Non-public interfaces (such as the oomd interfaces between PID 1 and
oomd), and interfaces with multiple implementors (such as the resolved
hook interface, or the metrics collection stuff) should not be linked
in.

This is inspired by the Varlink.org "registry" concept, briefly
explained here:

https://varlink.org/FAQ#how-do-i-find-the-service-which-implements-a-local-interface

Note however that the described Varlink interface is not actually
implemented here, the directory is introduced however in a fashion that
conceptually matches the registry defined there, and would allow us to
implement the registry interface on top of it. (One of the reason the
registry Varlink API is not implemented right now is that the URI format
it relies on is entirely unspecified in the Varlink docs right now. Some
research needs to be done to extract what's implemented in the reference
implementation and to determine how it maps to the Varlink entrypoint
address format systemd's own tooling currently uses)

This primarily installs the symlinks via Symlinks= in unit files and via
a new tmpfiles.d/ drop-in. But since we touch all .socket units relating
to Varlink this also sets the FileDescriptorName= to varlink for each,
just to minimize diffrences and make things work more alike (the
services in questin don't care about the name, so this doesn't change).
In one case we replace a pair of separate sockets for two closely
related varlink services by a socket and a symlink, so that we can
safely use Symlinks= to also install the registry symlinks.

2 months agomountfsd: don't cross mount boundaries when looking for owner of foreign UID owned...
Lennart Poettering [Mon, 9 Feb 2026 09:36:22 +0000 (10:36 +0100)] 
mountfsd: don't cross mount boundaries when looking for owner of foreign UID owned tree (#40578)

2 months agoupdate TODO 40578/head
Lennart Poettering [Thu, 5 Feb 2026 16:00:10 +0000 (17:00 +0100)] 
update TODO

2 months agomountfsd: do not cross mount boundaries when looking for parent of foreign UID range...
Lennart Poettering [Thu, 5 Feb 2026 15:51:56 +0000 (16:51 +0100)] 
mountfsd: do not cross mount boundaries when looking for parent of foreign UID range owned dirs

This is primarily paranoia: it might be possible for unpriv users to set
up mount hierarchies in unexpected ways when using userns. Hence let's
make protections more rigid: when looking for a parent dir of a foreign
UID owned dir tree, refuse to cross mount boundaries.

2 months agostat-util: add statx_verify_directory() helper, similar to stat_verify_directory...
Lennart Poettering [Thu, 5 Feb 2026 15:42:20 +0000 (16:42 +0100)] 
stat-util: add statx_verify_directory() helper, similar to stat_verify_directory() but for statx