]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
14 months agobasic/build: also include BTF status
Mike Yuan [Sun, 15 Sep 2024 14:04:32 +0000 (16:04 +0200)] 
basic/build: also include BTF status

14 months agocoredump: use _cleanup_(iovec_done) where appropriate
Lennart Poettering [Sun, 15 Sep 2024 14:16:34 +0000 (16:16 +0200)] 
coredump: use _cleanup_(iovec_done) where appropriate

14 months agoMerge pull request #34434 from poettering/bootctl-stub-paths
Yu Watanabe [Mon, 16 Sep 2024 01:41:24 +0000 (10:41 +0900)] 
Merge pull request #34434 from poettering/bootctl-stub-paths

bootctl: expose new stub path efi vars and related

14 months agobootctl: show whether a PE file is an addon in 'booctl kernel-identify'
Lennart Poettering [Tue, 16 Jul 2024 09:27:19 +0000 (11:27 +0200)] 
bootctl: show whether a PE file is an addon in 'booctl kernel-identify'

14 months agohwdb: add Kensington SlimBlade Pro trackball (Bluetooth mode)
Celeste Liu [Sun, 15 Sep 2024 16:31:41 +0000 (00:31 +0800)] 
hwdb: add Kensington SlimBlade Pro trackball (Bluetooth mode)

Wired and 2.4G dongle connectivity is covered by general trackball rule,
but with Bluetooth connectivity Kensington SlimBlade Pro uses the name
"SlimBlade Pro" which doesn't contain "[Tt]rack[Bb]all". We need to
process it specially.

Signed-off-by: Celeste Liu <CoelacanthusHex@gmail.com>
14 months agorepart: Fix log messages in partition_populate_directory()
Daan De Meyer [Sun, 15 Sep 2024 20:01:16 +0000 (22:01 +0200)] 
repart: Fix log messages in partition_populate_directory()

We're not actually populating a filesystem here, we're preparing
to populate a filesystem, so update the log messages accordingly.

14 months agobootctl: also show current/default/oneshot entry literally in output 34434/head
Lennart Poettering [Tue, 16 Jul 2024 07:49:50 +0000 (09:49 +0200)] 
bootctl: also show current/default/oneshot entry literally in output

14 months agobootctl: add --print-loader-path + --print-stub-path
Lennart Poettering [Mon, 15 Jul 2024 16:21:35 +0000 (18:21 +0200)] 
bootctl: add --print-loader-path + --print-stub-path

These are inspired by the existing commands that return the path to the
boot or ESP partitions. However, these new commands show the path to the
boot loader (systemd-boot) or UKI/stub (systemd-stub) that was used on
the current boot. This information is derived from EFI variables.

14 months agoefivars: add helper that reads an fs path from an efi var
Lennart Poettering [Mon, 15 Jul 2024 16:18:35 +0000 (18:18 +0200)] 
efivars: add helper that reads an fs path from an efi var

14 months agobootctl: show stub partition data too in "status" too
Lennart Poettering [Mon, 15 Jul 2024 15:09:53 +0000 (17:09 +0200)] 
bootctl: show stub partition data too in "status" too

14 months agoman/bootup: rename initrd to exitrd at one more place
Mike Yuan [Sun, 15 Sep 2024 16:11:06 +0000 (18:11 +0200)] 
man/bootup: rename initrd to exitrd at one more place

Follow-up for f2c2fa87b6b7a7b3dcce9eeae8ce2a2ab50b60eb

14 months agotest: fix ASAN options in TEST-29-PORTABLE
Luca Boccassi [Sun, 15 Sep 2024 14:19:57 +0000 (16:19 +0200)] 
test: fix ASAN options in TEST-29-PORTABLE

Bash arrays cannot be exported, so we need to redefine it in each
subtest

Follow-up for 680dec33f27d408c94afe654113ba87e3bb8208b

14 months agomkosi: Disable makepkg PKGBUILD linting using the newly added environment variable
Daan De Meyer [Sun, 15 Sep 2024 08:25:06 +0000 (10:25 +0200)] 
mkosi: Disable makepkg PKGBUILD linting using the newly added environment variable

14 months agoMerge pull request #34409 from DaanDeMeyer/boot-fix
Daan De Meyer [Sun, 15 Sep 2024 09:57:57 +0000 (11:57 +0200)] 
Merge pull request #34409 from DaanDeMeyer/boot-fix

boot: Make initrd_prepare() semantically equivalent to combine_initrds()

14 months agoboot: Make initrd_prepare() semantically equivalent to combine_initrds() 34409/head
Daan De Meyer [Fri, 13 Sep 2024 19:37:20 +0000 (21:37 +0200)] 
boot: Make initrd_prepare() semantically equivalent to combine_initrds()

Currently, trying to boot images with type 1 entries generated by mkosi
with qemu freezes in the kernel EFI stub. I'm not going to pretend I
understand what's going on, but when I reported a similar problem with
UKIs, the fix was to rework the code in combine_initrds() in the stub
to behave like it does today. It seems that same fix was never applied
to systemd-boot's combine_initrds() function, so let's do that now to
fix the freezes I've been seeing trying to boot images with type 1 entries
in qemu.

14 months agoboot: Use TAKE_STRUCT() in one more place
Daan De Meyer [Sun, 15 Sep 2024 08:11:45 +0000 (10:11 +0200)] 
boot: Use TAKE_STRUCT() in one more place

14 months agoMerge pull request #34347 from poettering/uki-with-many-bootctl
Lennart Poettering [Sun, 15 Sep 2024 07:06:58 +0000 (09:06 +0200)] 
Merge pull request #34347 from poettering/uki-with-many-bootctl

bootctl: multi-profile UKI support

14 months agotest: split TEST-29-PORTABLE in subtests
Luca Boccassi [Sat, 14 Sep 2024 19:46:38 +0000 (21:46 +0200)] 
test: split TEST-29-PORTABLE in subtests

The test script is quite long and hard to read. Split it.
Start with one image-based and one directory-based subtest.

14 months agoload-fragment: terminate the specifier table (#34421)
Ronan Pigott [Sun, 15 Sep 2024 03:21:39 +0000 (20:21 -0700)] 
load-fragment: terminate the specifier table (#34421)

Otherwise an invalid specifier iterates over uninitialized data.

Fixes a bug introduced by 0b40688d1830abc6f59b1f1f67eccd757c23eb09 (v254).

14 months agoMerge pull request #34419 from yuwata/creds
Yu Watanabe [Sun, 15 Sep 2024 03:15:57 +0000 (12:15 +0900)] 
Merge pull request #34419 from yuwata/creds

creds: several follow-ups and cleanups

14 months agoMerge pull request #34405 from poettering/dns-domain-validate-fix
Yu Watanabe [Sat, 14 Sep 2024 18:33:12 +0000 (03:33 +0900)] 
Merge pull request #34405 from poettering/dns-domain-validate-fix

dns-domain: fix validation check for max name

14 months agocreds: move -h/--help and --version to correct section in the help message 34419/head
Yu Watanabe [Sat, 14 Sep 2024 18:21:41 +0000 (03:21 +0900)] 
creds: move -h/--help and --version to correct section in the help message

14 months agocreds: add short comment that has-tpm2 is moved
Yu Watanabe [Sat, 14 Sep 2024 18:20:53 +0000 (03:20 +0900)] 
creds: add short comment that has-tpm2 is moved

Follow-up for 58e359604ffdca12bb4d2c5807b96e070611c0f6.

14 months agocreds: align table
Yu Watanabe [Sat, 14 Sep 2024 18:19:21 +0000 (03:19 +0900)] 
creds: align table

14 months agocreds: drop unnecessary include of build-path.h
Yu Watanabe [Sat, 14 Sep 2024 18:18:32 +0000 (03:18 +0900)] 
creds: drop unnecessary include of build-path.h

Follow-up for 58e359604ffdca12bb4d2c5807b96e070611c0f6.

14 months agoAdd HUAWEI MateBook D 15 AMD ACCEL properties
Matthieu CHARETTE [Sat, 14 Sep 2024 14:36:13 +0000 (16:36 +0200)] 
Add HUAWEI MateBook D 15 AMD ACCEL properties

14 months agoMerge pull request #34401 from poettering/implicit-sigprocmask
Mike Yuan [Sat, 14 Sep 2024 15:47:47 +0000 (17:47 +0200)] 
Merge pull request #34401 from poettering/implicit-sigprocmask

tree-wide: make sigprocmask() changes more automatic

14 months agoAdd ACCEL_MOUNT_MATRIX for Chuwi Hi10 Max.
Gregory Arenius [Fri, 13 Sep 2024 23:13:58 +0000 (16:13 -0700)] 
Add ACCEL_MOUNT_MATRIX for Chuwi Hi10 Max.

14 months agodns-domain: add test case from #34399 34405/head
Lennart Poettering [Fri, 13 Sep 2024 15:45:58 +0000 (17:45 +0200)] 
dns-domain: add test case from #34399

14 months agodns-domain: validate dns domain name max size based on unescaped, not escaped size
Lennart Poettering [Fri, 13 Sep 2024 15:54:06 +0000 (17:54 +0200)] 
dns-domain: validate dns domain name max size based on unescaped, not escaped size

Otherwise we'll consider various domains invalid that really shouldn't
be considered invalid.

Fixes: #34399
14 months agodns-domain: follow our current variable naming style
Lennart Poettering [Fri, 13 Sep 2024 15:43:28 +0000 (17:43 +0200)] 
dns-domain: follow our current variable naming style

14 months agocore: do not fail if ignorable img.v/ vpick dir is empty
Luca Boccassi [Thu, 12 Sep 2024 16:46:04 +0000 (18:46 +0200)] 
core: do not fail if ignorable img.v/ vpick dir is empty

If the vpick directory is configured to be ignored if missing, do not
fail and just skip ahead.

Follow-up for 5e79dd96a88
Follow-up for 622efc544dc

14 months agoupdate TODO 34401/head
Lennart Poettering [Fri, 13 Sep 2024 09:02:42 +0000 (11:02 +0200)] 
update TODO

14 months agotree-wide: make sigprocmask() changes more automatic
Lennart Poettering [Fri, 13 Sep 2024 08:36:59 +0000 (10:36 +0200)] 
tree-wide: make sigprocmask() changes more automatic

This tries to get rid of most manual sigprocmask() changes, in favour
of:

1. The SD_EVENT_SIGNAL_PROCMASK flag to sd_event_add_signal()
2. The sd_event_set_signal_exit() call for handling SIGTERM/SIGINT
3. Move masking of SIGWINCH into ptyfwd, out of nspawn/vmspawn/run

And while we are at it get rid of a bunch of event source fields whose
lifetime is bound to the sd_event object they belong to anyway, and make
use of the "floating" event source feature of sd-event instead.

14 months agoMerge pull request #34402 from keszybz/notes-readme
Luca Boccassi [Fri, 13 Sep 2024 13:19:56 +0000 (15:19 +0200)] 
Merge pull request #34402 from keszybz/notes-readme

Add examples not package/dlopen notes

14 months agodocs/ELF_DLOPEN_METADATA: add detailed example 34402/head
Zbigniew Jędrzejewski-Szmek [Fri, 13 Sep 2024 12:51:25 +0000 (14:51 +0200)] 
docs/ELF_DLOPEN_METADATA: add detailed example

14 months agodocs/ELF_PACKAGE_METADATA: add detailed example
Zbigniew Jędrzejewski-Szmek [Fri, 13 Sep 2024 12:35:43 +0000 (14:35 +0200)] 
docs/ELF_PACKAGE_METADATA: add detailed example

When the spec was initially written, we didn't add good documentation of how to
display the notes, also because there was no good way to display the data
except manually extracting the section to a file and running 'jq' on that. But
the tools have improved, so let's show the users how easy it is to use this
data.

14 months agomkosi: update debian commit reference
Luca Boccassi [Thu, 12 Sep 2024 19:54:55 +0000 (21:54 +0200)] 
mkosi: update debian commit reference

0704bfd93f Use dh-exec for d/systemd-timesyncd.manpages
b668a942e9 Install new sd-stub tmpfiles.d
57aa6890f3 Install new org.freedesktop.timesync1 manpage
63e7fb5a48 Install new shell credentials snippets
3ce727ad45 Update changelog for 256.6-1 release
65e0731d3a Note systemd-cryptsetup package split in NEWS
*   2bd9927f5d Update upstream source from tag 'upstream/256.6'
|\
| * 27c691ac24 New upstream version 256.6
395974bae4 Re-enable utmp support, tmux's autopkgtests require it
685e1c84eb initramfs-tools: ensure rules file exists before invoking chzdev
a454822396 Filter out zdev rules in the initramfs hook (LP: #2044104)
cd0179221d salsa-ci: test the stage1 build profile
55917feab0 Update changelog for 256.5-2 release
f280a3cbf5 Disable utmp support, replaced by wtmpdb
635c5f48dc d/t/upstream: do not pass /var/cache/apt/archives to PackageDirectories

14 months agopo: Translated using Weblate (Finnish)
Ricky Tigg [Thu, 12 Sep 2024 13:43:04 +0000 (15:43 +0200)] 
po: Translated using Weblate (Finnish)

Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Ricky Tigg <ricky.tigg@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fi/
Translation: systemd/main

14 months agoMerge pull request #34392 from poettering/format-util-split
Daan De Meyer [Fri, 13 Sep 2024 07:18:56 +0000 (09:18 +0200)] 
Merge pull request #34392 from poettering/format-util-split

tweaks to networkd sysctl logging

14 months agocatalog: beef up new sysctl message 34392/head
Lennart Poettering [Thu, 12 Sep 2024 15:51:28 +0000 (17:51 +0200)] 
catalog: beef up new sysctl message

Let's make use of the templating logic, to make the entry more useful.

14 months agocatalog: rebreak catalog entry
Lennart Poettering [Thu, 12 Sep 2024 15:51:24 +0000 (17:51 +0200)] 
catalog: rebreak catalog entry

14 months agonetworkd: move sysctl code to use PID_FMT
Lennart Poettering [Thu, 12 Sep 2024 15:46:12 +0000 (17:46 +0200)] 
networkd: move sysctl code to use PID_FMT

Now that format-util.h doesn't pull in net/if.h anymore, we can use it
to format PIDs in the networkd-sysctl.c code.

14 months agobasic: split ifname related calls from format-util.h into format-ifname.h
Lennart Poettering [Thu, 12 Sep 2024 15:39:33 +0000 (17:39 +0200)] 
basic: split ifname related calls from format-util.h into format-ifname.h

This way we don't have to pull in net/if.h into format-util.h.

This is supposed to address https://github.com/systemd/systemd/pull/32212#discussion_r1755639881

No actual code changes, just a .c/.h file split-up.

14 months agominor fixups for #32212
Matteo Croce [Thu, 12 Sep 2024 17:17:24 +0000 (19:17 +0200)] 
minor fixups for #32212

Fix minor post merge comments

14 months agomkosi: Stop applying device groups patch on Arch
Daan De Meyer [Thu, 12 Sep 2024 19:27:03 +0000 (21:27 +0200)] 
mkosi: Stop applying device groups patch on Arch

It stopped applying so let's stop applying it to make CI green again.

14 months agoanalyze: add test for verify exit status with warnings
Ryan Wilson [Wed, 11 Sep 2024 20:51:09 +0000 (13:51 -0700)] 
analyze: add test for verify exit status with warnings

14 months agounits: Order ldconfig.service after systemd-confext.service
Daan De Meyer [Wed, 11 Sep 2024 19:29:25 +0000 (21:29 +0200)] 
units: Order ldconfig.service after systemd-confext.service

The configuration files required by ldconfig could be put into
place by systemd-confext.service (ldconfig only looks in /etc) so
let's order the service after systemd-confext.service to make sure
any config files are in place before the service runs.

14 months agoMerge pull request #34390 from poettering/bus-process-man-tweak
Luca Boccassi [Thu, 12 Sep 2024 18:04:49 +0000 (20:04 +0200)] 
Merge pull request #34390 from poettering/bus-process-man-tweak

man: document that sd_bus_process() only returns otherwise unhandled …

14 months agoMerge pull request #32212 from teknoraver/networkd-sysctl
Lennart Poettering [Thu, 12 Sep 2024 15:28:59 +0000 (17:28 +0200)] 
Merge pull request #32212 from teknoraver/networkd-sysctl

More visibility into systemd-networkd sysctls

14 months agoupdate TODO 34390/head
Lennart Poettering [Thu, 12 Sep 2024 14:18:59 +0000 (16:18 +0200)] 
update TODO

14 months agoman: document that sd_bus_process() only returns otherwise unhandled messages in...
Lennart Poettering [Thu, 12 Sep 2024 12:13:22 +0000 (14:13 +0200)] 
man: document that sd_bus_process() only returns otherwise unhandled messages in *ret_message

14 months agoupdate TODO
Lennart Poettering [Thu, 12 Sep 2024 14:17:42 +0000 (16:17 +0200)] 
update TODO

14 months agoMerge pull request #34388 from poettering/syscall-update
Lennart Poettering [Thu, 12 Sep 2024 13:46:03 +0000 (15:46 +0200)] 
Merge pull request #34388 from poettering/syscall-update

seccomp: update syscall list and categorize new additions a bit

14 months agoMerge pull request #34385 from poettering/man-unify-pcr-key-name
Lennart Poettering [Thu, 12 Sep 2024 13:45:40 +0000 (15:45 +0200)] 
Merge pull request #34385 from poettering/man-unify-pcr-key-name

man: clean up PCR public key filenames in systemd-stub and systemd-measure man pages

14 months agoNEWS: correct/complete some entries
Mike Yuan [Thu, 12 Sep 2024 12:44:19 +0000 (14:44 +0200)] 
NEWS: correct/complete some entries

14 months agoMerge pull request #34386 from keszybz/mkosi-update-helper
Daan De Meyer [Thu, 12 Sep 2024 12:35:17 +0000 (14:35 +0200)] 
Merge pull request #34386 from keszybz/mkosi-update-helper

Mkosi update helper

14 months agoseccomp-util: add recently added new syscalls to various seccomp groups, as appropriate 34388/head
Lennart Poettering [Thu, 12 Sep 2024 12:20:01 +0000 (14:20 +0200)] 
seccomp-util: add recently added new syscalls to various seccomp groups, as appropriate

14 months agosyscalls: run "ninja update-syscalls-*"
Lennart Poettering [Thu, 12 Sep 2024 12:13:45 +0000 (14:13 +0200)] 
syscalls: run "ninja update-syscalls-*"

14 months agoNEWS: the first big batch for v257
Zbigniew Jędrzejewski-Szmek [Thu, 12 Sep 2024 11:25:12 +0000 (13:25 +0200)] 
NEWS: the first big batch for v257

14 months agoanalyze: move "has-tpm2" from systemd-creds to systemd-analyze
Lennart Poettering [Fri, 31 May 2024 10:00:00 +0000 (12:00 +0200)] 
analyze: move "has-tpm2" from systemd-creds to systemd-analyze

The verb s not really specific to credential management, it was always a
bit misplaced. Hence move it to systemd-analyze, where we already have
some general TPM related verbs such as "srk" and "pcrs"

14 months agomkosi: update mkosi commit reference to v24.3-158-g2c9954fa51 34386/head
Zbigniew Jędrzejewski-Szmek [Thu, 12 Sep 2024 08:46:24 +0000 (10:46 +0200)] 
mkosi: update mkosi commit reference to v24.3-158-g2c9954fa51

2c9954fa51 mkosi-initrd: correct `--debug-shell` help output
*   671708a10b Merge pull request #2990 from behrmann/allthemanuals
|\
| * 2671849125 initrd: add --show-documentation option
| * e2238f5dc7 Move show_docs to its own module
| * e366093b1c doc: make documentation command take an argument
* | 9fcff08b34 Update documentation links
* | 113f7f67dd Only write to /etc/machine-id if /etc exists
|/
*   62a610c0e5 Merge pull request #3005 from DaanDeMeyer/mypy
|\
| * 9b569c93bb Don't delete reader in _tempfile() backport
| * 16f4c94930 Mark all class variables as Final
| * ca7021e9a7 Annotate two more variables that need it
| * fec368dd4d Move KeySource.Type out of KeySource
| * ff5f7b06b8 user: Drop lru_cache() for home() and name()
| * 8f7c7b366f Move code backported from cpython upstream to backport.py
| * f66212e9c2 Drop listify()
| * 4293866df2 mypy: Disable allow_redefinition
| * 2700337f11 Fix mypyc warnings in sandbox.py
|/
025483af04 sandbox: Use separate variable name when we change types
*   b04800cd30 Merge pull request #3003 from DaanDeMeyer/initrd
|\
| * fd64be9b60 mkosi-initrd: Ignore gnupg subdirectory
| * 7a8a21f8f6 mkosi-initrd: Only set --cacheonly=metadata when running as root
| * 156880c398 mkosi-initrd: Add --debug-shell argument
|/
*   a32c8f393a Merge pull request #3002 from DaanDeMeyer/cherry-pick
|\
| * 1d8bfabc97 news: add note to change where the manual pages are
| * 8917d65db1 initrd: flatten module into a single file
| * 76085b788a sandbox: flatten module into a single file
| * 9f48afa4a7 cli: add missing completion stubs to pyproject.toml
| * 6e21cceb03 doc: move man pages to resources/man
| * 25d1c6b579 cli: use ellipsis ligature instead of writing out ...
|/
013d9b5595 Move various functions to bootloader.py
508ad85475 Update NEWS.md
f25b8dee6f Simplify package cache dir mirror key
*   dce4c8af51 Merge pull request #2998 from DaanDeMeyer/ci
|\
| * f4934828f7 tests: Show debug messages on console
| * fa3ae22598 ci: Drop machine-id commit timeout drop-in
dba01269de base64 encode mirror if we put it in package cache dir key
364b65f7bb Add 'login' to Debian/Ubuntu/Kali package list
ee07b5b6d2 Bump github/codeql-action from 3.25.15 to 3.26.6

14 months agomkosi: add helper script to update mkosi hash
Zbigniew Jędrzejewski-Szmek [Thu, 12 Sep 2024 08:49:41 +0000 (10:49 +0200)] 
mkosi: add helper script to update mkosi hash

This is very similar to tools/fetch-distro.py. The idea is that we extend the
commit to update the mkosi hash with a git log --pretty=oneline output, so that
the reader can know what changes were actually included.

The motivation is that I'm always wondering what changed in mkosi when I see a
commit updating the hash, and it's nicer to have this information shown
directly in the commit.

The script does _not_ pull changes from upstream, on the assumption that the
person doing the commit always has a fresh checkout and that they tested with
that checkout.

14 months agobootspec: automatically filter non-native UKIs and add-ons when enumerating 34347/head
Lennart Poettering [Fri, 5 Jul 2024 14:17:27 +0000 (16:17 +0200)] 
bootspec: automatically filter non-native UKIs and add-ons when enumerating

14 months agobootspec: process multi-profile UKIs
Lennart Poettering [Fri, 5 Jul 2024 10:11:48 +0000 (12:11 +0200)] 
bootspec: process multi-profile UKIs

14 months agope-binary: add pe_is_native() for checking if PE is native
Lennart Poettering [Fri, 5 Jul 2024 14:15:35 +0000 (16:15 +0200)] 
pe-binary: add pe_is_native() for checking if PE is native

14 months agope-binary: split pe_header_find_section() in two
Lennart Poettering [Fri, 5 Jul 2024 08:31:20 +0000 (10:31 +0200)] 
pe-binary: split pe_header_find_section() in two

This splits out the core part into a new function
pe_section_table_find().

pe_header_find_section() takes a PeHeader as input, while
pe_section_table_find() just takes the section table and its size.

14 months agope-binary: split pe_read_section_data() into two
Lennart Poettering [Fri, 5 Jul 2024 08:15:56 +0000 (10:15 +0200)] 
pe-binary: split pe_read_section_data() into two

This renames pe_read_section_data() to pe_read_section_data_by_name()
and makes pe_read_section_data() a bit more low-level: it takes a header
table entry directly, instead of searching it first by name.

14 months agope-binary: add helper pe_is_addon() for detecting whether we are looking at PE EFI...
Lennart Poettering [Fri, 5 Jul 2024 08:05:59 +0000 (10:05 +0200)] 
pe-binary: add helper pe_is_addon() for detecting whether we are looking at PE EFI add-on

14 months agoman: fix advertised filename of the PCR public key 34385/head
Lennart Poettering [Thu, 12 Sep 2024 07:31:29 +0000 (09:31 +0200)] 
man: fix advertised filename of the PCR public key

14 months agoman: systemd-stub places PCR public key in file 'tpm2-pcr-public-key.pem', stick...
Lennart Poettering [Wed, 11 Sep 2024 16:22:54 +0000 (18:22 +0200)] 
man: systemd-stub places PCR public key in file 'tpm2-pcr-public-key.pem', stick to that name across the board

systemd-stub provides the signing key for TPM2 signed PCR policies in a
file tpm2-pcr-public-key.pem to userspace. Hence, to clarify that this
is the same key as used when signing via "systemd-measure", let's rename
it in the docs like that.

Also rename the private key to tpm2-pcr-private-key.pem, to keep the
symmetry.

With this we should universally stick to this nomenclature:

1. tpm2-pcr-public-key.pem   ← public part of signing key
2. tpm2-pcr-private-key.pem  ← private part of signing key
3. tpm2-pcr-signature.json   ← signature file made with key pair

Inspired by: #34069

14 months agoupdate TODO
Lennart Poettering [Thu, 12 Sep 2024 07:38:27 +0000 (09:38 +0200)] 
update TODO

14 months agonetwork/wireguard: refuse default key if all zero
Mike Yuan [Wed, 11 Sep 2024 19:49:00 +0000 (21:49 +0200)] 
network/wireguard: refuse default key if all zero

Follow-up for fa724cd52c1335d6b3225b74c1a9c801389997ba

We attempt to retrieve default key if eqzero(Wireguard.private_key),
but a all zero default key should be refused too.

14 months agotest-network: add test for sysctl watch 32212/head
Matteo Croce [Mon, 1 Jul 2024 19:58:30 +0000 (21:58 +0200)] 
test-network: add test for sysctl watch

Add a NetworkdSysctlTest class which ensures that networkd correctly
complains when a sysctl file it's handling has been changed externally.

14 months agoemit a warning in networkd if managed sysctls are changed
Matteo Croce [Mon, 1 Jul 2024 19:58:30 +0000 (21:58 +0200)] 
emit a warning in networkd if managed sysctls are changed

Monitor the sysctl set by networkd for writes, if a sysctl is
overwritten with a different value than the one we set, emit a warning.
Writes are detected with an eBPF program attached as BPF_CGROUP_SYSCTL
which reports the sysctl writes only in net/.

The eBPF program only reports sysctl writes from a different cgroup than networkd.
To do this, it uses the `bpf_current_task_under_cgroup_proto()` helper,
which will be available allowed in BPF_CGROUP_SYSCTL from kernel 6.12[1].

Loading a BPF_CGROUP_SYSCTL program requires the CAP_SYS_ADMIN capability,
so drop it just after the program load, whether it loads successfully or not.

Writes are logged but permitted, in future the functionality can be
extended to also deny writes to managed sysctls.

[1] https://lore.kernel.org/bpf/20240819162805.78235-3-technoboy85@gmail.com/

14 months agostore the sysctls set by networkd
Matteo Croce [Mon, 1 Jul 2024 19:58:30 +0000 (21:58 +0200)] 
store the sysctls set by networkd

networkd set several sysctl to set the network configuration. Save their
value so we can check is other processes change them.

14 months agoextend sysctl functions to shadow values
Matteo Croce [Mon, 1 Jul 2024 19:58:30 +0000 (21:58 +0200)] 
extend sysctl functions to shadow values

Pass to all the sysctl_* functions a hashmap which can be used to
optionally save the value written in the sysctl.

14 months agoresolvectl: rework StatusMode handling into a switch/case statement
Lennart Poettering [Wed, 11 Sep 2024 14:08:23 +0000 (16:08 +0200)] 
resolvectl: rework StatusMode handling into a switch/case statement

14 months agoresolvectl: rename shallow destructors …_done()
Lennart Poettering [Wed, 11 Sep 2024 14:06:57 +0000 (16:06 +0200)] 
resolvectl: rename shallow destructors …_done()

14 months agoMerge pull request #34373 from poettering/resolved-dnssd-move-out
Daan De Meyer [Wed, 11 Sep 2024 19:36:24 +0000 (21:36 +0200)] 
Merge pull request #34373 from poettering/resolved-dnssd-move-out

move dnssd configuration file parsing from generic code into dnssd source files

14 months agoresolved: simplify dns_scope_get_n_dns_servers(), don't count each time
Lennart Poettering [Tue, 3 Sep 2024 08:46:52 +0000 (10:46 +0200)] 
resolved: simplify dns_scope_get_n_dns_servers(), don't count each time

14 months agoresolved: use dns_scope_ifindex() at more places
Lennart Poettering [Tue, 3 Sep 2024 08:49:42 +0000 (10:49 +0200)] 
resolved: use dns_scope_ifindex() at more places

And add a mirroring dns_scope_ifname()

14 months agoresolved: simplify initialization of DnsScope
Lennart Poettering [Tue, 3 Sep 2024 08:45:26 +0000 (10:45 +0200)] 
resolved: simplify initialization of DnsScope

14 months agopcrlock: remove empty components from our list
Lennart Poettering [Wed, 11 Sep 2024 09:14:33 +0000 (11:14 +0200)] 
pcrlock: remove empty components from our list

This is a rework of e7a93e75219b22424bab95fe45982f5eef21d581: instead of
handling components with n_variants being zero at every step of the way, we instead
remove it from our list after loading all components, given that such a
component simply makes not sense for the rest of our logic.

14 months agoresolved: use unlinkat() where appropriate
Lennart Poettering [Tue, 3 Sep 2024 08:52:16 +0000 (10:52 +0200)] 
resolved: use unlinkat() where appropriate

14 months agoMerge pull request #34377 from DaanDeMeyer/symlinks
Daan De Meyer [Wed, 11 Sep 2024 19:34:37 +0000 (21:34 +0200)] 
Merge pull request #34377 from DaanDeMeyer/symlinks

repart: Add MakeSymlinks=

14 months agoresolvectl: show DefaultRoute state in per-link DNS staus info too
Lennart Poettering [Wed, 11 Sep 2024 14:11:43 +0000 (16:11 +0200)] 
resolvectl: show DefaultRoute state in per-link DNS staus info too

14 months agopcrlock: correct --help text regarding recovery pin
Lennart Poettering [Wed, 11 Sep 2024 15:13:09 +0000 (17:13 +0200)] 
pcrlock: correct --help text regarding recovery pin

Fixes: #33917
14 months agocryptenroll: don't try to get PCR bank if we know the device key
Lennart Poettering [Wed, 11 Sep 2024 15:28:43 +0000 (17:28 +0200)] 
cryptenroll: don't try to get PCR bank if we know the device key

If we operate in "offline" mode, i.e. know the device key, then we will
not have a TPM2 connection, hence don't try to read the PCR bank to use form
it.

We don't need it anyway because we are not going to test unseal things.

Fixes: #33855
14 months agorepart: Add MakeSymlinks= 34377/head
Daan De Meyer [Wed, 11 Sep 2024 15:11:45 +0000 (17:11 +0200)] 
repart: Add MakeSymlinks=

Similar to MakeDirectories=, but creates symlinks in the filesystem.

14 months agorepart: Add missing parameter comment
Daan De Meyer [Wed, 11 Sep 2024 16:44:44 +0000 (18:44 +0200)] 
repart: Add missing parameter comment

14 months agorepart: Fix memory corruption
Daan De Meyer [Wed, 11 Sep 2024 15:51:20 +0000 (17:51 +0200)] 
repart: Fix memory corruption

14 months ago hwdb.d/60-keyboard.hwdb: add Clevo mic mute quirk for V5x iGPU, NV41PZ
Filip Lewiński [Fri, 30 Aug 2024 07:38:46 +0000 (09:38 +0200)] 
 hwdb.d/60-keyboard.hwdb: add Clevo mic mute quirk for V5x iGPU, NV41PZ

Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
14 months agoudev: allow persistent storage rules for zram devices
Karel Zak [Wed, 11 Sep 2024 09:27:09 +0000 (11:27 +0200)] 
udev: allow persistent storage rules for zram devices

The /dev/zramN devices can be used as regular block devices. They are
typically used for swap areas, but it would be beneficial to have
LABEL and UUID in the udev database to make it more user-friendly for
tools such as lsblk or mount (if used with other filesystems).

14 months agoresolved: move dnssd parsers to resolved-dnssd.c 34373/head
Lennart Poettering [Tue, 3 Sep 2024 14:05:48 +0000 (16:05 +0200)] 
resolved: move dnssd parsers to resolved-dnssd.c

Let's keep only the parsers for the main config in resolved-conf.c

14 months agoresolved: move resolved_dnssd_gperf_lookup() prototype definition to resolved-dnssd.h
Lennart Poettering [Tue, 3 Sep 2024 11:11:51 +0000 (13:11 +0200)] 
resolved: move resolved_dnssd_gperf_lookup() prototype definition to resolved-dnssd.h

14 months agorepart: Reuse partition_needs_populate() more
Daan De Meyer [Wed, 11 Sep 2024 14:36:47 +0000 (16:36 +0200)] 
repart: Reuse partition_needs_populate() more

14 months agoman: fix help text for systemd-creds tool's "list" verb
Lennart Poettering [Wed, 11 Sep 2024 08:55:52 +0000 (10:55 +0200)] 
man: fix help text for systemd-creds tool's "list" verb

I guess this was copy/pasted from sysupdate? Weird though. Fix it. And
also reword "cat" help text to make it more precise.

14 months agopcrlock: log if we generate an "empty" policy
Lennart Poettering [Wed, 11 Sep 2024 09:44:02 +0000 (11:44 +0200)] 
pcrlock: log if we generate an "empty" policy

Such a policy won't provide any protection, but it's still entirely fine
to have it like this in various contexts, for example at OS install
time, to allocate the nvindex and reference it in enrollments. However,
it does deserve mention, hence log about it at LOG_NOTICE level.

This is based on a similar patch by Arnaud Patard
<arnaud.patard@collabora.com> proposed at #33663.

14 months agoman: Correct flag description of systemd-cat
sinus-x [Mon, 9 Sep 2024 19:06:58 +0000 (21:06 +0200)] 
man: Correct flag description of systemd-cat

It is not true that "no string" is written to journal; the binary
name is used when run via `systemd-cat command`, or `cat` is used
when run via `command | systemd-cat`.