1
0
mirror of https://github.com/systemd/systemd synced 2025-10-06 00:13:24 +02:00
Commit Graph

83684 Commits

Author SHA1 Message Date
Yu Watanabe
114c4b95df firewall-util: remove iptables backend
As already announced by 5c68c51045,
let's remove iptables backend of firewall-util through libiptc.
2025-09-19 15:33:15 +09:00
Mike Yuan
b6c8f0ec91 userdb: suppress creation of empty userdb dirs 2025-09-18 22:58:16 +02:00
Luca Boccassi
defa0148b8 units: add missing Documentation=
The initrd units are described in the graphs in the bootup manpage,
so use that one for them.
2025-09-18 21:54:36 +01:00
Lennart Poettering
74c10cfbeb sd-varlink: two small additions (#38994) 2025-09-18 21:34:09 +02:00
Lennart Poettering
86fd19af14 mountfsd: add recognizable error if we pass an fd with unexpected flags 2025-09-18 21:33:41 +02:00
Nick Rosbrook
9fe168a92c basic: validate timezones in get_timezones()
Depending on the packaging of tzdata, /usr/share/zoneinfo/tzdata.zi may
reference zones or links that are not actually present on the system.
E.g. on Debian and Ubuntu, there is a tzdata-legacy package that
contains "legacy" zones and links, but they are still referenced in
/usr/share/zoneinfo/tzdata.zi shipped by the main tzdata package.

Right now, get_timezoes() does not validate timezones when building the
list, which makes the following possible:

 $ timedatectl list-timezones | grep "US/Alaska"
 US/Alaska

 $ timedatectl set-timezone US/Alaska
 Failed to set time zone: Invalid or not installed time zone 'US/Alaska'

which feels buggy. Hence, simply validate timezones in get_timezones()
to avoid listing timezones that are not installed.
2025-09-18 21:33:24 +02:00
Lennart Poettering
818bd1dfa1 mountfsd: uncomment CapabilityBoundingSet= line
Since mountfsd was added in 702a52f4b5 the
caps bounding set line was commented. That's an accident. Fix that. (We
need to add a bunch of caps to the list).
2025-09-18 21:30:51 +02:00
Lennart Poettering
1c9500c2b7 units: explicitly reset TTY before running stuff on console
This adds TTYReset=yes to all units which run directly on the TTY. We
already had this in place for the gettys, but this adds it for the rest
that basically has StandardInput=tty + StandardOutput=tty set.

Originally, for these tools it wasn't necessary to reset the TTY,
because we after all already reset /dev/console very very early on once,
during PID1's early initialization, and hence there's no real reason to
do it again for these early boot services. But that's actually not
right, because since #36666 the TTY we reset from PID 1 is typically
/dev/console but the TTY those services are invoked on is typically the
resolved version of that, i.e. wherever that points. Now you might
think: if one is just an alias to the other, why does it matter to reset
this again? Well, because it's only a half-assed alias, and as it turns
out WIOCSWINSZ is not propagated from one to the other, i.e the terminal
dimesions we initialize for /dev/console don't propagate to whatever
that points to.

One option to address that would be to immediately propagate this down
ourselves (or to fix the kernel for it), but it felt safer to simply do
the reset again before the use, after all these one one-off services,
and there's no point in optimizing much here. Moreover, its probably
safer to give the guarantee that when the firstboot stuff (which after
all queries for pws to set) runs it definitely certainly guaranteed has
a properly reset terminal.
2025-09-18 21:30:31 +02:00
Mike Yuan
f390e6b708 systemd-boot-update.service & zsh: replace --no-variables with --variables= (#39011) 2025-09-18 19:57:42 +02:00
Lennart Poettering
b0d63f6059 Bump required minimum version of libfido2 to 1.5.0 (#38975)
Major distributions already have libfido2 >= 1.12.0. Let's bump the
required minimum version to 1.5.0, which provides FIDO_ERR_UV_BLOCKED.

Note, libfido2 1.5.0 was released on 2020-09-01.

See also #38608.
2025-09-18 17:59:44 +02:00
Lennart Poettering
265b3fbd52 btrfs-util: try unlinkat(AT_REMOVEDIR) before resorting to btrfs ioctls
An empty btrfs subvolume can always be removed without privs, hence try
to use unlinkat() first.
2025-09-18 17:58:56 +02:00
nl6720
fea2518a71 zsh: replace bootctl --no-variables with --variables=
bbeeea4362 replaced the option in bootctl.
2025-09-18 17:00:57 +03:00
nl6720
8ec3e769b5 systemd-boot-update.service: replace --no-variables with --variables=no
bbeeea4362 replaced the option in bootctl,
so systemd-boot-update.service should follow.
2025-09-18 17:00:49 +03:00
Lennart Poettering
2bbfbe4089 man: run update-man-rules 2025-09-18 15:56:11 +02:00
Lennart Poettering
cba8c099a9 sd-varlink: optionally handle SIGTERM/SIGINT explicitly in simple varlink event loop 2025-09-18 15:56:11 +02:00
Lennart Poettering
04e2cb8928 sd-varlink: add api for resetting timeout to default
We currently don't expose the literal default time-out as API. Let's at
least provide users with a way to reset the time-out to the default.
2025-09-18 15:56:11 +02:00
Lennart Poettering
07345762c8 meson: downgrade dep on libgcrypt
We don't link against libgcrypt anymore, we use dlopen()
2025-09-18 15:51:01 +02:00
Lennart Poettering
f20508da71 pull-job: fix include order 2025-09-18 15:29:42 +02:00
Mike Yuan
145649188a sd-json: two small tweaks (#38980) 2025-09-18 14:16:45 +02:00
Zbigniew Jędrzejewski-Szmek
3b54efe78e Change symlinks params to target & linkpath
This is what the symlinkat.2 man page uses.

The old naming with 'to' and 'from', where 'to' is the symlink name
and 'from' is the symlink target is very confusing.

Follow-up for 892838911b.
2025-09-18 12:36:50 +01:00
Andreas Schneider
3b3af5d020 man: Point to the nss-systemd manpage for more details. 2025-09-18 13:29:33 +02:00
Luca Boccassi
e0f863641a meson tweaklets (#38978) 2025-09-18 11:00:19 +01:00
Kai Wohlfahrt
9ba0fd9293 Fix path in docs for local pcrlock.d directory 2025-09-18 10:59:12 +01:00
Luca Boccassi
407e8ab86c kernel-install: version sort listed kernels (#38983) 2025-09-18 10:58:37 +01:00
Jörg Behrmann
60e36dda6e man: change lexical to lexicographic
This changes the instances of lexical to lexicographic, thus making it easier
to grep for instances of lexicographic order, since there's only one variant of
the word to consider.

Lexicographic is chosen since there are slightly fewer instances of lexical and
lexicographic seems a better fit than lexical after checking a few
dictionaries.

The words lexical, lexicographic, and lexicographical are synonyms in
computing, meaning an alphabetical order. Both the Oxford dictionary and
Merriam-Webster make no distinction between lexicographic and lexicographical,
with only Wiktionary adding a more precise meaning of

    Meeting lexicographical standards or requirements; worthy of being included
    in a dictionary. [1]

Since, outside of computing, lexicographic(al) has the more specific meaning
pertaining to lexicography, i.e. the editing or making of dictionaries [2], and
lexical only has this as a secondary meaning after its linguistic meaning [3],
lexicographic fits the meaning of including and ordering entries better.

[1] https://en.wiktionary.org/wiki/lexicographical#English
[2] https://www.merriam-webster.com/dictionary/lexicographic
[3] https://www.oed.com/dictionary/lexical_adj
2025-09-18 10:57:38 +01:00
Lennart Poettering
435bef5d05 kernel-install: when listing kernels sort them by version 2025-09-18 09:31:35 +02:00
Lennart Poettering
9e9fbaa620 format-table: add TABLE_VERSION cell type
This is exactly like TABLE_STRING, with one exception: it sorts via
strverscmp_improved().
2025-09-18 09:31:35 +02:00
Lennart Poettering
8c7c808f84 sd-json: allow sd_json_dispatch() accept NULL pointers and treat them like empty objects 2025-09-18 09:15:05 +02:00
Lennart Poettering
6be5b61238 sd-json: make sure JSON_BUILD_STRING_UNDERSCORIFY() maps + to _, too
This is ultimately preparation for making systemd-creds's --with-key=
switch also accessible via Varlink, because it uses "+" inside an the
enum name. It makes sense to to allow this generally however.
2025-09-18 09:14:11 +02:00
Lennart Poettering
5d64216fc2 meson: sort components 2025-09-18 08:55:52 +02:00
Lennart Poettering
e1e1ef09f9 meson: fail build when encountering unused variables 2025-09-18 08:55:52 +02:00
Yu Watanabe
0c25f8fd0b sd-boot: allow configuration of log levels (#38701)
This allows for more liberal usage of logging functionality as messages
will no longer always show up on screen, regardless of urgency. The log
level to use can be configured through an SMBIOS type 11 string
(`io.systemd.boot.loglevel=`) or by using the `log-level` option in
loader.conf. Valid values are debug, info, notice, warning, err, crit,
alert, and emerg. By default, info will be used.
2025-09-18 12:06:48 +09:00
Yu Watanabe
6f1bc004e9 basic/efivars: read EFI variables using one read(), not two (#38864)
In https://github.com/systemd/systemd/issues/38842 it is reported that
we're again having trouble accessing EFI variables:
```
  [  292.212415] H (udev-worker)[253]: Reading EFI variable /sys/firmware/efi/efivars/LoaderDevicePartUUID-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f.
  ...
  [  344.397961] H (udev-worker)[253]: Detected slow EFI variable read access on LoaderDevicePartUUID-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f: 52.185510s
```

We don't know what causes the slowdown, but it seems reasonable to avoid
unnecessary read() calls. We would read the 4-byte attr first, and then
the actual value later. But our code always reads the value (and
discards the attr in all cases except one, when _writing_ the variable),
so let's optimize for the case where we read the value and read the
whole contents in one read().
2025-09-18 12:03:30 +09:00
Yu Watanabe
46869e32cd resolve: two cleanups for varlink method (#38467) 2025-09-18 11:57:04 +09:00
Luca Boccassi
773a7d9a4e mount-util: support 'atime' family of mount options for fsmount() 2025-09-18 11:54:39 +09:00
Tobias Heider
f405165065 stub: fix file path handling for loaded kernel
- Actually pass the new memory file path to parent_loaded_image->FilePath
- Restore old parent_loaded_image if Linux returns
- Pass the same kernel_file_path in load_via_boot_services path
- s/Re-use/Patch in comment explaining what we are doing

Fixes #38566
2025-09-18 11:40:43 +09:00
Yu Watanabe
f871c20bad systemd-repart: add encryption configs into repart.d/* (#38052)
As explained in https://github.com/systemd/systemd/issues/37892, it
would be nice to define per-partition PCRs/key file to use.

The global default config will be still defined as cmdline options, and
`TPM2PCRs=` and `KeyFile=` will be overriden by them.
2025-09-18 11:02:38 +09:00
Yu Watanabe
794f12c778 vmspawn: fix error handling
Follow-up for 9b5ba882bd.
2025-09-18 10:43:36 +09:00
Yu Watanabe
d8b60944f5 Bump required minimum version of libfido2 to 1.5.0
Major distributions already have libfido2 >= 1.12.0.
Let's bump the required minimum version to 1.5.0, which provides
FIDO_ERR_UV_BLOCKED.

Note, libfido2 1.5.0 was released on 2020-09-01.

See also #38608.
2025-09-18 09:29:29 +09:00
Yu Watanabe
c6e6c85f83 test: several random cleanups and fixlets (#38877) 2025-09-18 09:13:17 +09:00
Yu Watanabe
600c757b5f resolve/varlink: use sd_json_dispatch_const_string() at more places 2025-09-18 09:07:36 +09:00
Yu Watanabe
6c135f7ace resolve/varlink: replace json_dispatch_address() with json_dispatch_byte_array_iovec() 2025-09-18 09:06:48 +09:00
Yu Watanabe
a55f64edc0 sysupdate: use conf_files_list_strv_full() where possible (#38198) 2025-09-18 08:56:23 +09:00
Felix Pehla
b3f3ce28f8 sd-boot: allow setting the log level through loader.conf
Allow configuring the log level used by sd-boot by setting
`log-level=<level>` in loader.conf. `info` is used by default.
2025-09-18 08:54:52 +09:00
Felix Pehla
0ce83b8a57 sd-boot: allow setting the log level through SMBIOS 11
Allow configuring the log level used by sd-boot by setting
`io.systemd.boot.loglevel=<level>` as SMBIOS type 11 string.
`info` is used if unset.
2025-09-18 08:54:52 +09:00
Felix Pehla
4f35d74998 sd-boot: allow setting the maximum log level 2025-09-18 08:54:52 +09:00
Felix Pehla
419e4dc450 sd-boot: efi-log: use log levels internally
Change log_internal() to receive a log level from which a text color is
derived, rather than the text color directly, and adjust various log_*
macros to use them internally.
2025-09-18 08:54:52 +09:00
Mike Yuan
9bec72c94f core/exec-credential: use CLEANUP_TMPFILE_AT 2025-09-18 08:53:43 +09:00
Govind Venugopal
d64720bbe7 Feature/homectl recovery key update (#38702)
Implements the ability to add recovery keys to existing user accounts
via homectl update --recovery-key=yes. Previously, recovery keys could
only be configured during initial user creation, requiring users to
recreate their entire home directory to add recovery keys later.

Fixes: #23602
2025-09-18 08:49:26 +09:00
Franck Bui
204c34040a units: don't force the loading of the loop and dm_mod modules in systemd-repart.service
This avoids loading the aforementioned modules when systemd-repart is skipped
during the boot process, which is the case most of the time.
2025-09-18 08:46:34 +09:00