Commit Graph
68617 Commits
Author SHA1 Message Date
Ronan Pigott 7f0dbde467 resolvectl: do not sort domain output
The order of search domains is important information. We shouldn't
obscure it by sorting the search domains when printing.

Fixes: af781878d5 ("resolvectl: sort domain/nta output")
2023-11-08 10:04:35 +00:00
Frantisek Sumsal 4e55082f74 test: retry the property check a couple of times
41e4ce06fe shortened existing sleeps, which resulted in the check being
sometimes done before the property had a chance to update. Let's do what
what we do with the rest of the checks and retry it a couple of times.

Resolves: #29923
2023-11-08 10:03:53 +00:00
Lennart Poettering e3c5842732 Merge pull request #28519 from ddstreet/tpm2_external_seal
Update systemd-cryptenroll to enroll TPM using only public key
2023-11-08 10:28:28 +01:00
Yu Watanabe 9e6d587961 test: set working directory even if it is expected that the command fails
Otherwise, parsing may unexpectedly succeeds but fail to run writing
.network files with permission error.

Follow-up for 6bc5de53e8.
2023-11-08 08:07:27 +01:00
Yu Watanabe d9c4917b9e vmspawn: fix memleak
Fixes CID#1523912.
2023-11-08 07:54:10 +01:00
Yu Watanabe c62345ffc7 tree-wide: fix typo 2023-11-08 14:57:33 +09:00
Yu Watanabe b2622db0df Merge pull request #29910 from yuwata/rapid-commit
dhcp: about rapid commit
2023-11-08 12:20:17 +09:00
Luca Boccassi 9871279cde Merge pull request #29913 from keszybz/vmspawn-ci
Build vmspawn in CI and fix one test failure
2023-11-07 23:35:48 +00:00
Luca Boccassi ee32d7a640 Merge pull request #29915 from mrc0mmand/ntp-followups
timesync: fix PropertiesChanges signals for NTP properties
2023-11-07 22:38:23 +00:00
Zbigniew Jędrzejewski-Szmek 0919dbebb0 vmspawn: add missing include
../src/src/vmspawn/vmspawn-util.c:33:13: error: implicit declaration of function ‘access’; did you mean ‘accept’? [-Werror=implicit-function-declaration]
2023-11-07 22:50:37 +01:00
Luca Boccassi 00666ec71f Merge pull request #6763 from kinvolk/iaguis/no-new-privs
core: allow using seccomp without no_new_privs when unprivileged
2023-11-07 21:34:49 +00:00
Zbigniew Jędrzejewski-Szmek 2b84d62869 meson: enable vmspawn by default in developer mode
This should also implicitly enabled vmspawn in CI. It wasn't passing even the
basic tests, which we didn't see, because it needs to be explicitly enabled.
2023-11-07 21:56:57 +01:00
Zbigniew Jędrzejewski-Szmek 30247ea76e man: many fixes systemd-vmspawn(1)
- version information
- indentation and missing tags
- mkosi and qemu don't need root
2023-11-07 21:56:42 +01:00
Luca Boccassi b485c1bf4e Merge pull request #29914 from yuwata/network-generator
network-generator: several cleanups and follow-ups for dns server handling
2023-11-07 20:51:21 +00:00
Zbigniew Jędrzejewski-Szmek ed739145fb xdg-autostart: downgrade warning for missing executables
On a system with a shared home directory, I'm getting a bunch of warnings:

systemd-xdg-autostart-generator[76]: Exec binary '/usr/bin/flatpak' does not exist: No such file or directory
systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/org.signal.Signal.desktop: not generating unit, error parsing Exec= line: No such file or directory
systemd-xdg-autostart-generator[76]: Exec binary '/usr/bin/flatpak' does not exist: No such file or directory
systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/im.riot.Riot.desktop: not generating unit, error parsing Exec= line: No such file or directory
systemd-xdg-autostart-generator[76]: Exec binary '/usr/libexec/gnome-tweak-tool-lid-inhibitor' does not exist: No such file or directory
systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/ignore-lid-switch-tweak.desktop: not generating unit, error parsing Exec= line: No such file or directory
systemd-xdg-autostart-generator[76]: Exec binary '/usr/bin/flatpak' does not exist: No such file or directory
systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/org.telegram.desktop.desktop: not generating unit, error parsing Exec= line: No such file or directory

This isn't really a problem. Let's just print an info message.
2023-11-07 20:47:04 +00:00
Luca Boccassi 13339e72d2 Merge pull request #29909 from keszybz/documentation-cleanup
Two small documentation cleanups
2023-11-07 20:46:13 +00:00
Frantisek Sumsal 9521574cd4 timesync: fix PropertiesChanges signals for NTP properties
As in their current form they didn't work at all:

systemd-timesyncd[190115]: Assertion 's' failed at src/libsystemd/sd-event/sd-event.c:3058, function sd_event_source_set_enabled(). Ignoring.
systemd-timesyncd[190115]: Failed to reenable system ntp server change event source!
systemd-timesyncd[190115]: Failed to enable ntp server defer event, ignoring: Invalid argument

This was also pointed out in the post-merge review [0].

Let's address this together with the rest of the comments, and add
some tests to make sure everything works as it should.

Resolves: #28770
Follow-up to: 8f1c446

[0] https://github.com/systemd/systemd/commit/8f1c4469793f2f0281fdfbc20ba4085e20cdd16f#r124147466
2023-11-07 21:36:59 +01:00
Frantisek Sumsal 41e4ce06fe test: "prettify" the test a bit 2023-11-07 21:36:59 +01:00
Lennart Poettering a338ccaa98 systemctl: grey out legend
The legend is not the primary information, but simply explanatory, hence
grey it out a bit.

This mimics what we do for pcrlock.
2023-11-07 20:07:43 +00:00
Yu Watanabe b86f60bfb3 network-generator: refuse unexpected trailing strings 2023-11-08 04:29:45 +09:00
Yu Watanabe 816c269e55 network-generator: allow to specify both IPv4 and IPv6 DNS servers
Follow-up for 923599523c.
2023-11-08 04:29:45 +09:00
Yu Watanabe 8ae81a1e00 network-generator: add missing assertions 2023-11-08 04:29:45 +09:00
Yu Watanabe 0b0865f509 network-generator: drop unused family argument 2023-11-08 04:29:45 +09:00
Yu Watanabe 13a462b9d5 network-generator: relax requirement for peer address, route destination, and gateway
No functional changes, as the caller already sets them.
2023-11-08 04:29:45 +09:00
Zbigniew Jędrzejewski-Szmek 6527d175cd vmspawn: shorted --help output to fit in 80 columns
I think that "SB" is good enough here, the option name shows the unabbreviated
name.
2023-11-07 18:59:19 +01:00
Yu Watanabe 1fa0a4eff7 network: add [DHCPServer] RapidCommit= setting 2023-11-08 02:42:03 +09:00
Yu Watanabe 538ff0a60a sd-dhcp-server: support rapid commit (RFC4039)
https://datatracker.ietf.org/doc/html/rfc4039
2023-11-08 02:39:59 +09:00
Zbigniew Jędrzejewski-Szmek be57c17625 man: link to new btrfs website for btrfs man pages
https://archive.kernel.org/oldwiki/btrfs.wiki.kernel.org/index.php/Manpage/btrfs(5).html
says "This wiki has been archived and the content is no longer updated."
and redirects to https://btrfs.readthedocs.io/en/latest/btrfs-man5.html.
Let's move all the btrfs links to btrfs.readthedocs.io.
2023-11-07 18:35:04 +01:00
Lennart Poettering 38bf0a2361 Merge pull request #29876 from poettering/kernel-install-all
add "kernel-install list" and "kernel-install add-all"
2023-11-07 18:29:47 +01:00
Dan Streetman 803e95932f test: update TEST-70 with systemd-cryptenroll calculated TPM2 enrollment
Update test to check systemd-cryptenroll --tpm2-device-key= enrollment.
2023-11-07 12:29:36 -05:00
Dan Streetman 57f0786ee0 test: fix env var name of persistent handle used for testing so it is removed after test
The cleanup uses PERSISTENT_HANDLE while the test uses PERSISTENT, so change
the test to use PERSISTENT_HANDLE so it's cleaned up (i.e. removed from the
tpm) after the test.
2023-11-07 12:28:56 -05:00
Dan Streetman c3a2a681be cryptenroll: add support for calculated TPM2 enrollment
Instead of enrolling the local TPM to a luks volume, use the public key from a
TPM to enroll it into the luks volume. This is useful when enrolling a TPM that
is not currently accessible, for example if the TPM is located on a different
system.
2023-11-07 12:20:54 -05:00
Zbigniew Jędrzejewski-Szmek 837667a1b8 NEWS: fix strange line break 2023-11-07 18:18:58 +01:00
Yu Watanabe 089362976c sd-dhcp-client: unconditionally set sd_dhcp_client.request_sent when a packet is sent
If a server replies an ACK for the initial DISCOVER, previously
request_sent was not set, so networkd handle the lease timed out.

Follow-up for 808b65a087.
2023-11-08 02:18:15 +09:00
Dan Streetman 65883f6c10 tpm2: update test-tpm2 for tpm2_calculate_seal()
Add testing for tpm2_calculate_seal().
2023-11-07 12:00:07 -05:00
Dan Streetman 0a7874ad55 tpm2: add tpm2_calculate_seal() and helper functions
Add functions to calculate a sealed secret object.
2023-11-07 12:00:02 -05:00
Dan Streetman 2d784782bf tpm2: add tpm2_sym_alg_*_string() and tpm2_sym_mode_*_string()
Add functions to convert between alg id and string name for symmetric
algorithms and symmetric encryption modes.
2023-11-07 10:59:44 -05:00
Dan Streetman 2eea1b8f2f tpm2: add test to verify srk templates
Verify the tpm2_get_srk_template() and tpm2_get_best_srk_template() functions
work as expected.
2023-11-07 10:59:44 -05:00
Dan Streetman 788933379d tpm2: allow using tpm2_get_srk_template() without tpm
The SRK templates are defined by specification, so move the check for TPM
support to the tpm2_get_best_srk_template() function, and allow anyone to get
the ECC and RSA templates.

Also add test to verify the SRK templates are correct.
2023-11-07 10:59:44 -05:00
Frantisek Sumsal b2603465d4 coredumpctl: propagate SIGTERM to the debugger process
If we're waiting for the debugger process to exit and receive SIGTERM,
propagate it to all processes in our process group, including the
debugger, so we can follow it up with a proper cleanup.

Resolves: #28772
2023-11-07 15:41:33 +00:00
Yu Watanabe c4efe0e51e sd-dhcp-client: gracefully ignore OFFER with Rapid Commit option
Fixes #29904.
2023-11-07 16:13:54 +01:00
Lennart Poettering 5568043a84 Merge pull request #29907 from poettering/dispatch-uint64_t-as-string
teach json_dispatch_uint64() to parse decimal strings
2023-11-07 16:13:34 +01:00
Lennart Poettering 8353229e10 update CI 2023-11-07 16:08:06 +01:00
Lennart Poettering a6906aa579 update TODO 2023-11-07 16:08:06 +01:00
Lennart Poettering 35f58f8c36 man: document /usr/lib/modules/ paths as recommend copy source for kernel-install 2023-11-07 16:08:06 +01:00
Lennart Poettering 758d14767d kernel-install: make "inspect" work more like "add" regarding omission of parameters
This makes "kernel-install inspect" work more "kernel-install add": if
the version or kernel image is specified as "-" or omitted we'll make it
up.
2023-11-07 16:07:57 +01:00
Lennart Poettering ec1399f567 kernel-install: add add-all verb 2023-11-07 16:07:55 +01:00
Lennart Poettering 9d9e99a8f0 kernel-install: make version/kernel image parameters optional for "add"
Let's make kernel-install a bit easier to use:

If the kernel version is not specified, let's imply "uname -r", so that
we regnerate the entries for the current kernel.

If the kernel image is not specified let's imply using
/usr/lib/modules/$version/vmlinuz, i.e. the location distros like Fedora
drop the kernel into, which we generally recommend people to use.

If the kernel is not found there, don't try to automatically pick the
kernel path, and fail, as before.
2023-11-07 16:07:25 +01:00
Lennart Poettering 658e6cc4ae kernel-install: add command to list installed kernels
This simply dumps the dirs in /usr/lib/modules/ and whether they contain
a vmlinuz binary.
2023-11-07 16:07:05 +01:00
Lennart Poettering 9942f855a9 tree-wide: take in all *our* JSON structures also decimal strings
Let's be friendly in what we accept: whenever we define a JSON
structure, let's also allow decimal strings where we want an integer.

This patch purely replaces JSON_VARIANT_UNSIGNED by
_JSON_VARIANT_TYPE_INVALID in the various JsonDispatch[] tables, so that
we'll happily accept any type in json_dispatch(), so that
json_dispatch_uint64() and related tools can do their thing.

This does not switch over OCI (as a JSON structure not defined by us).
2023-11-07 14:25:40 +01:00