Commit Graph
85869 Commits
Author SHA1 Message Date
Lennart Poettering 65a6da9c96 conf-files: add flag so that we don't always prefix returned paths with the root dir path used
This is useful in tools such as system-repart where we show the
definition file paths a lot in our output, but if prefixed with the root
path we'd show a temporary mount dir when operating on a image file.
Hence, let's drop the prefix here, and show only the path within the
image.
2026-01-25 20:51:50 +01:00
Lennart Poettering 8a4f856977 conf-files: rename .name field to .filename to make clearer what precisely it is the name of 2026-01-25 20:51:50 +01:00
Lennart Poettering 9b116a0871 boot-entry: plug through XAT_FDROOT 2026-01-25 20:51:50 +01:00
Lennart Poettering 64ef947022 os-util: support XAT_FDROOT everywhere 2026-01-25 20:51:50 +01:00
Lennart Poettering 6ecfa12af0 conf-files: add support for root_fd based operation
Let's make sure we can safely load configuration files based on a root
fd, including XAT_FDROOT.

(While we are at it, always pass path to root fs before fd to root fs,
following our recently updated CODING_STYLE)
2026-01-25 20:51:50 +01:00
Lennart Poettering 17ade5b2af sd-id128-util: allow XAT_FDROOT pass through in id128_get_machine_at() 2026-01-25 20:51:50 +01:00
Mike Yuan a8b099d663 sd-event: unpoison memory returned by epoll_pwait2() (#40464)
Fixes #40455

Alternative to #40463
Closes #40463
2026-01-25 00:50:18 +01:00
Lennart Poettering 3775fab341 CODING_STYLE: suggest a clear order for func params that combine fd and path 2026-01-24 20:52:00 +01:00
Lennart Poettering ca088266bc loop-util: when open_flags is unspecified derive it from passed in fd 2026-01-24 20:51:45 +01:00
Mike Yuan cc94dca5bc sd-event: use FOREACH_ARRAY 2026-01-24 18:51:21 +01:00
Mike Yuan 21ebcb5814 sd-event: unpoison memory returned by epoll_pwait2()
Our fuzzer CI recently got bumped to Ubuntu 24.04 with
glibc >= 2.35. Apparently msan is not happy with the new
epoll_pwait2(), hence explicitly mark the memory region
as initialized.

Fixes #40455
Alternative to #40463
2026-01-24 18:36:24 +01:00
Mike Yuan 1b2ad38b2b README: add epoll_pwait2() to the list of kernel APIs 2026-01-24 18:28:24 +01:00
Mike Yuan 5ad66a9b72 units/meson.build: rebreak lines 2026-01-24 18:07:15 +01:00
Luca Boccassi c644e9e6e6 mkosi: fix debian/ubuntu/suse builds
Follow-up for 072e72424b
2026-01-24 16:12:09 +01:00
Luca Boccassi c4fd3043ff mkosi: workaround autovt removal in SUSE spec
Follow-up for 072e72424b
2026-01-24 13:24:58 +00:00
Luca Boccassi acd5fd0a6d mkosi: update debian commit reference to 6f4d90be5cb4075954f0a36653105e586a9a1fa9
* 6f4d90be5c Do not install autovt@ for upstream builds
* 8cc28a6b82 Install new files for upstream build
* 0d15255073 Use deb-systemd-invoke to reexec instead of manual calls
* db04e5fa0b Use dh_installsystemd to handle journald and networkd
* d8756a4c82 Use dh_installsystemd more to manage units
* 40b23b0d5d d/tests: drop tests-in-lxd
* 5821c5a350 d/control: have systemd-boot depend on efibootmgr for amd64 and arm64 only

Follow-up for 072e72424b
2026-01-24 13:19:56 +00:00
Zbigniew Jędrzejewski-Szmek 072e72424b units/getty@.service: use [Install]Alias= instead of static alias
In Fedora, kmsconvt@.service is starting to be used instead of getty@.service
to have nicer font handling. This means that we need the autovt@.service alias
point to the new unit. So far the alias was done through a static symlink
because there was little reason to change it. Let's use [Install] instead so
the decision which implementation to use can be made after installation.

https://bugzilla.redhat.com/show_bug.cgi?id=2429626
https://fedoraproject.org/wiki/Changes/UseKmsconVTConsole
2026-01-24 13:19:08 +01:00
Lennart Poettering a2bf4b5da9 tivial journal fixlets (#40448) 2026-01-24 13:18:31 +01:00
Lennart Poettering c5761f352b mountfsd: improve logging 2026-01-24 13:18:15 +01:00
Mike Yuan 0f22a0918d run: remove unused enum values for getopt_long() 2026-01-24 13:18:00 +01:00
Mike Yuan afc5d175a2 core/exec-invoke: switch PRIVATE_USERS_FULL to direct "0 0 UINT32_MAX" mapping (#40445) 2026-01-24 00:04:30 +01:00
Lennart Poettering 1efc263433 journal: do not use typecasts for range checks 2026-01-23 22:51:29 +01:00
Lennart Poettering 3f74a81f65 journal: some whitespace fixes 2026-01-23 22:51:29 +01:00
Lennart Poettering 89e94f6369 update TODO 2026-01-23 22:19:18 +01:00
Mike Yuan 24c73c7920 core/exec-invoke: switch PRIVATE_USERS_FULL to direct "0 0 UINT32_MAX" mapping
This was intended for v259. Let's get it done now, in v260.
2026-01-23 19:29:48 +01:00
Mike Yuan 6ed05d6414 core/exec-invoke: group setup_private_users*() together 2026-01-23 18:48:31 +01:00
Mike Yuan cf54b1ea57 pam_systemd: remove handling of obsolete "existing" attr from CreateSession() call (#40432) 2026-01-23 17:50:44 +01:00
Derek J. Clark a68c8d9ac2 hwdb: Update Lenovo Legion Go Models
- Different BIOS versions of the Legion Go 2 can init the keyboard
  device as set 1 (appears as raw set 2) or as set 2 (appears as
  translated set 2). Add the Legion Go 2 to the Translated list.
- While at it, specify the models in a more verbose manner for
  posterity.

Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
2026-01-24 00:46:19 +09:00
Peter Oliver af718e0535 ansi-color: new option SYSTEMD_COLORS=auto-16/auto-256/auto-24bit (#40303)
Setting SYSTEMD_COLORS=auto-16 is like SYSTEMD_COLORS=16 if output is to
a non-dumb TTY, and like SYSTEMD_COLORS=no otherwise.

Relates to
https://github.com/systemd/systemd/issues/15498#issuecomment-1682025186
2026-01-23 13:54:31 +01:00
Lennart Poettering fa41ce1142 hostnamed: after unescaping fancy name, validate it's valid UTF-8
The fancy name could contain arbitrary bytes, in escaped fashion. Before
using it, let's validate that this contains only valid UTF-8.

(Note that D-Bus might kick us off the bus if we don't ensure everything
we send around is UTF-8).

(While we are at it, do the same in PID 1, even though it's not that
important there)

Addresses this issue found by @YHNdnzj:

https://github.com/systemd/systemd/pull/40367#discussion_r2714614301

Follow-up for: #40367
2026-01-23 13:35:43 +01:00
Antonio Alvarez Feijoo 236033fd48 man/fstab-generator: correct root= options
Remove duplicate "fstab" option, and add missing "tmpfs" and "bind:" options.
2026-01-23 13:29:31 +01:00
Mike Yuan 2a2b5f8091 pam_systemd: remove handling of obsolete "existing" attr from CreateSession() call
Follow-up for b80120c4cb

After the mentioned commit, logind returns an error if the process
already lives in a session, and register_session() short-circuits
without setting systemd.existing flag. Hence systemd.existing
is either false or unset for pam_sm_close_session(), making
the whole logic effectively NOP. Kill it with fire.
2026-01-22 20:49:38 +01:00
Mike Yuan 5d2e9c2ad0 hostnamed: use INDEXES_TO_MASK where appropriate
Addresses https://github.com/systemd/systemd/pull/40367#discussion_r2714368627
2026-01-22 20:49:38 +01:00
Franck Bui 49f7149947 pam_systemd: fix regression introduced in v258 by preserving the FIFO fd
Upstream commit 3180c4d introduced a version incompatibility between
pam_systemd.so v258 and logind v257. This is problematic because such version
mismatches can occur in practice: logind still cannot be restarted during a
systemd package upgrade (it's a long-standing limitation, see
https://github.com/systemd/systemd/issues/17308).

When pam_systemd requests a new session, logind v257 returns a FIFO
fd. pam_systemd.so v258 ignores this fd and closes it. logind interprets the
closure as the session leader exiting and immediately terminates the session.

This patch partially reverts commit 3180c4d and restores the handling of the
FIFO fd in pam_systemd. The change is limited to the D-Bus APIs, since the
varlink API was only introduced in logind v258.

Follow-up for 3180c4d461.
2026-01-22 19:13:13 +01:00
Daan De Meyer b61aeeb315 meson: Drop minimum meson version required for clang-tidy 2026-01-22 13:33:35 +09:00
Lennart Poettering 0910cb9324 os-release: add a new FANCY_NAME= field to /etc/os-release, similar to PRETTY_NAME, that may carry ansi sequences + more unicode chars (#40367)
It's sometimes useful include non-ascii unicode chars in an os name, and
give it some ansi coloring. Since we usualy don't want to show that,
introduce a new field for it, and show it at boot and in thostnamectl
only, with safe fallbacks if colors/emojis are not available.
2026-01-21 23:57:39 +01:00
Mike Yuan e9a1271a0c units/systemd-portabled: enable NoNewPrivileges=
As with all other daemons we ship.
2026-01-21 23:13:09 +01:00
Daan De Meyer a08cee5084 mountfsd: Make singleFileSystem non-nullable
It's always set, so no need to be nullable.
2026-01-21 23:12:47 +01:00
Lennart Poettering 1dab8472e0 hostnamectl: show fancy name if available 2026-01-21 21:32:49 +01:00
Lennart Poettering 955446d2e4 hostnamed: expose fancy OS name as a field 2026-01-21 21:32:49 +01:00
Lennart Poettering d6749f35ae pid1: show fancy name field at boot, if specified 2026-01-21 21:32:49 +01:00
Lennart Poettering a01cd5bed3 man: introduce FANCY_NAME field 2026-01-21 21:32:49 +01:00
Lennart Poettering f42dc5ea18 format-table: add new string cell type that accepts ANSI sequences
For various usecases it's useful that we can embed ANSI sequences in
cells of tables. For example, I hope we can eventually switch "systemctl
status" output to use the table formatter, and multiple of its fields
contain ANSI sequences (since they pack multiple different pieces
information into the same field, and highlight parts of it to
communicate relevance of distinct parts).

Add a distinct cell type for this, which gets special processing when we
output to a terminal that doesn't support ANSI sequences, and to JSON:
we strip the sequences.
2026-01-21 21:32:49 +01:00
Mike Yuan adcc87f802 Trivial follow-ups for recently merged PRs (#40417) 2026-01-21 19:54:32 +01:00
Daan De Meyer b58a45e96a portable: Enable unpriv operation (#40091)
This does not yet support directory images properly
as systemd itself does not support unpriv directory
images properly yet.
2026-01-21 16:46:53 +01:00
Mike Yuan 13c0351ba4 fdset: do not call fd_get_path() if debug logging is off
Follow-up for 89065ada83
2026-01-21 15:55:06 +01:00
Yu Watanabe 68c7004236 network/dhcp4: send release message before stopping the client
Otherwise, the socket is already closed and sending release will be
anyway skipped.

With this patch, release message is sent before stopping the client.
```
Jan 20 18:29:41 systemd[1]: Stopping systemd-networkd.service - Network Management...
Jan 20 18:29:41 systemd-networkd[3821255]: wlp59s0: DHCPv4 client: RELEASE
Jan 20 18:29:41 systemd-networkd[3821255]: wlp59s0: DHCPv4 client: STOPPED
Jan 20 18:29:41 systemd-networkd[3821255]: wlp59s0: DHCP lease lost
```

Fixes #39299.
2026-01-21 15:50:35 +01:00
Mike Yuan 1886047e59 fdset: sort includes 2026-01-21 15:49:58 +01:00
Mike Yuan 382382a6eb sysupdate-resource: on hash mismatch the best before marker is not ignored
Hence use a less ambiguous wording.

Follow-up for d0badc0a61
Addresses https://github.com/systemd/systemd/pull/40393#discussion_r2709953179
2026-01-21 15:48:14 +01:00
Daan De Meyer 824fcb95c9 portable: Enable unpriv operation
This does not yet support directory images properly
as systemd itself does not support unpriv directory
images properly yet.

The user profiles are a copy of the system profiles but without
DynamicUser=yes (can't be used by user managers) and without
ProtectHome=yes (this masks /home which breaks StateDirectory= which
is lcoated inside /home)
2026-01-21 15:09:46 +01:00