Commit Graph
86131 Commits
Author SHA1 Message Date
Mike Yuan b026cb94ae path-util: unify path_extract_filename/directory into path_split_prefix_filename() (#40608) 2026-02-09 11:03:14 +01:00
Zbigniew Jędrzejewski-Szmek df8747806b Two cleanups (#40587) 2026-02-09 11:02:41 +01:00
Zbigniew Jędrzejewski-Szmek 8a70fa901e 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().
2026-02-09 11:01:31 +01:00
Zbigniew Jędrzejewski-Szmek 25860000b6 Fix wording in two places
Noticed this while going through the stable series…
Also update location after 97318131fd.
2026-02-09 11:01:15 +01:00
Lennart Poettering 4a54381d07 mountfsd: don't cross mount boundaries when looking for owner of foreign UID owned tree (#40578) 2026-02-09 10:36:22 +01:00
Lennart Poettering 05bbe4247b update TODO 2026-02-09 10:33:29 +01:00
Lennart Poettering 2557f78c07 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.
2026-02-09 10:33:01 +01:00
Lennart Poettering f5a7247afb stat-util: add statx_verify_directory() helper, similar to stat_verify_directory() but for statx 2026-02-09 10:33:01 +01:00
Lennart Poettering 780f15ee7d mountpoint-util: use xstatx() a bit more 2026-02-09 10:33:01 +01:00
Lennart Poettering 2c756c6964 dirent-util: use xstatx_full() some more 2026-02-09 10:33:01 +01:00
Zbigniew Jędrzejewski-Szmek 15777d6d5c report: many smaller clean-ups/tweaks to systemd-report (#40598)
/cc @keszybz
2026-02-09 10:28:29 +01:00
Daan De Meyer 7d4ea41bd1 bootctl parts of installer PR (#40447)
This contains the "bootctl install" related work from the #38764 split
out, but also includes the preparatory work already split out into
#40446.

I'll rebase this PR once the prep work is merged.

This has a simple CI test already, and has docs
2026-02-09 09:46:39 +01:00
Mike Yuan 8b7e98f183 journal-send: check if $LOG_NAMESPACE denotes our /run/systemd/journal/ is already namespaced properly 2026-02-09 09:41:47 +01:00
Luca Boccassi a2e55fceee docs: note step to update obs workflow file on release 2026-02-09 09:36:53 +01:00
Luca Boccassi 4834014018 README: note that we now have packages built from stable branch too 2026-02-09 09:36:53 +01:00
Mike Gilbert a304f6c9db meson: use printf instead of echo
The echo builtin provided by some shells (mksh) will interpret \x2d as
an escape sequence. This causes meson to fail:

```
test/fuzz/meson.build:93:52: ERROR: File fuzz-unit-file/dm-back-slash.swap does not exist.
```

Bug: https://bugs.gentoo.org/969789
2026-02-09 09:36:26 +01:00
Lennart Poettering 7e8c35ce80 update TODO 2026-02-09 09:33:07 +01:00
Mike Yuan cc9a9d6a15 tree-wide: use path_split_prefix_filename() where appropriate 2026-02-09 09:07:15 +01:00
Mike Yuan 18a8ea3377 path-util: unify path_extract_filename/directory into path_split_prefix_filename() 2026-02-09 09:05:45 +01:00
Mike Yuan 294855953c path-util: drop redundant condition in path_find_last_component()
Follow-up for 3a7ba9f6b9
2026-02-09 09:05:44 +01:00
Mike Yuan 3788ec1b4a snapshot-util: include shared-forward.h 2026-02-09 09:05:44 +01:00
Lennart Poettering dd8c12e5ec oomd: implement a prekill hook (#38584)
When a cgroup is selected for termination, send varlink messages to
hooks registered in `/run/systemd/oomd.prekill-hooks/`.
oomd waits up to `PreKillTimeoutSec=` seconds for response before
proceeding with the kill.
2026-02-09 08:43:13 +01:00
Mike Yuan 595ea7c2e8 docs/INCOMPATIBILITIES: fix typo 2026-02-09 02:36:50 +01:00
Mike Yuan 6801fdda61 mailmap: deduplicate Lennart and Daan @Amutable 2026-02-09 02:36:27 +01:00
Matteo Croce c1bf450fa0 oomd: implement a prekill varlink event
When a cgroup is selected for termination, send varlink messages
to hooks registered in `/run/systemd/oomd.prekill-hooks/`.
oomd waits up to `PreKillHookTimeoutSec=` seconds for response
before proceeding with the kill.
2026-02-09 02:05:57 +01:00
Matteo Croce 67cbfbbf4b Revert "oomd: move check if processes can be killed into oomd_cgroup_kill()"
This reverts commit 332bce5bd7.

The revert is needed because with the PreKill hook, oomd_cgroup_kill()
is not goint to really kill processes but it just creates the callbacks.
So the check is deferred to the real kill.
2026-02-09 02:05:57 +01:00
Daan De Meyer 8fba6e2b40 oomd: Make OomdCGroupContext reference counted
Preparation for adding oomd hooks.
2026-02-09 02:05:57 +01:00
Lennart Poettering 5276ef1548 udev: Introduce uaccess for remote graphical sessions (#38516)
When systemd is compiled with group-render-mode=0660, only the active
seat gets access to the render devices through uaccess. Remote desktop
sessions like gnome-remote-desktop would be left with no hardware
rendering, because those sessions are not associated with a seat.

We solve the issue by granting uaccess to specifically tagged devices on
session start, if the session is marked with
XDG_SESSION_EXTRA_DEVICE_ACCESS.

udev-builtin-uaccess is refactored to grant multiple users access to a
device, taking into account the device's seat and all the active
EXTRA_DEVICE_ACCESS sessions.
2026-02-08 21:41:21 +01:00
Luca Boccassi 8fe50c025b mkosi: always install util-linux-script in Fedora
F41 is EOL, so we can unconditionally install this package, so that we
don't have to add a new version every time a new release is branched

Fixes test issues such as:

TEST-74-AUX-UTILS.sh[1363]: .//usr/lib/systemd/tests/testdata/units/TEST-74-AUX-UTILS.networkctl.sh: line 55: script: command not found
2026-02-08 15:42:43 +01:00
Lennart Poettering 2d34ff822b TODO: add some items about report/metrics 2026-02-07 23:55:23 +01:00
Lennart Poettering e180087038 man: add super basic man page 2026-02-07 23:36:48 +01:00
Lennart Poettering 9b09b11d21 report: rework limits logic
Let's count how many sources we skip, and output that as a summary, and
return an error exit code in this case.

Let's also put a limit on the metrics collected, not just the sources.

Also, our macros that put limits on things are usually called XYZ_MAX,
follow the same scheme here.
2026-02-07 23:30:00 +01:00
Lennart Poettering a7aebb2250 report: don't claim no reporting sockets were found, when it's no metrics that were found
Let's add a proper message about missing sources, and call them
"sources", i.e. take a more high-level view on things.
2026-02-07 23:28:51 +01:00
Lennart Poettering 1b9506601f report: keep track of varlink connections inside of Context object
Let's also move the Varlink connection management into the Context
object. Let's also switch to Set* for it, so that we get get
auto-expanding behaviour.
2026-02-07 23:28:51 +01:00
Lennart Poettering 6c051e84c7 report: move event loop object into Context
It's one of the primary objects that make up the program "context"
conceptually, hence it also should be part of the Context object. This
allows us to just have it available if the Context object is seen.
2026-02-07 23:13:16 +01:00
Lennart Poettering 3317ea84bc report: pass Context as first argument to metrics_call()
Typically the context object should be the first one. And the return
parameters should be the last ones.
2026-02-07 23:13:16 +01:00
Lennart Poettering 9fa9f10088 report: -p is not defined 2026-02-07 23:13:16 +01:00
Lennart Poettering 0ec663a41f report: do not treat an empty report dir as an issue
We should permit that the report varlink dir is created on the fly when
the first socket is bound there. Hence, let's treat a non-existant dir
equivalent to an empty one.

We usually do this in our tree like this, do it here too.
2026-02-07 23:13:16 +01:00
Lennart Poettering 1f8b09dfc6 report: use sd_json_variant_unref_many() 2026-02-07 23:13:16 +01:00
Lennart Poettering 75e1963df1 report: add the usual --json= argument 2026-02-07 23:13:16 +01:00
Yu Watanabe 8d96a18d90 bash-completion/sysext: add missing candidates for --always-refresh
Follow-up for 23115eeaf1.
2026-02-07 12:51:17 +01:00
Yu Watanabe 1f3b407307 daemon-util: downgrade log level on ECONNREFUSED and friends
This partially reverts 36c557f7d4, which
introduced notify_remove_fd() that logs in LOG_DEBUG. However,
notify_remove_fd_warn() is still called other library functions, e.g.
notify_push_fd(), and produces warning message about the failure in
removing fd from fdstore on shutdown.

During shutdown process, we get the following logs:
```
systemd-udevd[370]: Failed to send notify message to '/run/systemd/notify': Connection refused
systemd-udevd[370]: Failed to remove file descriptor "config-serialization" from the store, ignoring: Connection refused
systemd-udevd[370]: Failed to send notify message to '/run/systemd/notify': Connection refused
systemd-udevd[370]: Failed to push serialization fd to service manager: Connection refused
```
Here, the 1st, 3rd, and 4th messages are in LOG_DEBUG, but the 2nd one
was in LOG_WARNING before this commit, and this makes it also in LOG_DEBUG.

Follow-up for 472404aca5.
2026-02-07 00:15:33 +01:00
Nick Rosbrook e28958315f resolvectl: include ifindex when printing link-local DNS server
Historically, resolvectl status has not included the interface
specification for DNS servers with an IPv6 link-local address, since it
is technically somewhat redundant. But, adding this extra bit of
information makes it easier to copy-and-paste to use elsewhere, etc.

For example, the previous output:

 Link 2 (enp34s0)
     Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
          Protocols: +DefaultRoute LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported
 Current DNS Server: fe80::861e:a3ff:feb1:f8e7
        DNS Servers: 192.168.1.12 192.168.1.13 fe80::861e:a3ff:feb1:f8e7
         DNS Domain: lan

now becomes:

 Link 2 (enp34s0)
     Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
          Protocols: +DefaultRoute LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported
 Current DNS Server: fe80::861e:a3ff:feb1:f8e7%2
        DNS Servers: 192.168.1.12 192.168.1.13 fe80::861e:a3ff:feb1:f8e7%2
         DNS Domain: lan
2026-02-07 00:14:37 +01:00
Lennart Poettering a537c5e4b8 bootctl: add comments emphasizing that certain functions do not touch the file read pointer 2026-02-06 23:17:02 +01:00
Lennart Poettering 1dad3b6762 bootctl: add test case for bootctl install via varlink 2026-02-06 23:17:02 +01:00
Lennart Poettering 9b29d38c33 bootctl: return recognizable Varlink error when we cannot determine the boot entry token
When running "bootctl install" on an empty --root= dir, we don't know
which token to use, and the operation will fail. Make sure to return an
explicit error about this.

This introduces a recognizable low-level error for this (EUNATCH), and
then turns this into a recognizable Varlink error.

(I made sure that the old low-level error EINVAL wasn't load-bearing,
and it is safe to change this.)
2026-02-06 23:16:50 +01:00
Lennart Poettering 91b3620b07 bootctl: optionally include backing disk name in efi boot option description 2026-02-06 23:16:49 +01:00
Lennart Poettering 7ee2f6657f bootctl: parse install source via our usual string table helpers 2026-02-06 23:16:00 +01:00
Lennart Poettering aea76373b2 bootctl: add Install() varlink API
Fixes: #11221
2026-02-06 23:15:49 +01:00
Lennart Poettering 38433a6d06 bootctl: rework bootctl-install.c in preparation of varlinkification
This primarily introduces a context object for each operation, so that
we later can instantiate one for each varlink op we execute, and can
safely lifecycle all operation parameters for each subequent call.

This also reworks the root dir handling to be fd based.

This drops explicit CHASE_TRIGGER_AUTOFS from a bunch of chase() calls
that operate within the ESP/XBOOTLDR, while it keeps them in place for the
chase() calls that find the top-level ESP/XBOOTLDR inode. This reflects
the fact that we explicitly support autofs for the ESP/XBOOTLDR itself,
but below it expect no further mounts, just plain VFAT.

This changes behaviour of the interaction of $KERNEL_INSTALL_CONF_ROOT
and --root=: the former will now be taken relative to the host root, and
will no longer be affected by --root=. This follows similar behaviour in
kernel-install, where it is very explicitly documented in the man page
(the bootclt man page does not document this). This is strictly speaking
a compat breakage, but i think a very minor, niche one, and I think the
pain afflicted by this change is probably neglible compare to the
unsystematic behaviour comapred to kernel-install.
2026-02-06 23:15:47 +01:00