]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 years agotest: test the new srk extraction functionality 29947/head
Lennart Poettering [Wed, 8 Nov 2023 21:46:44 +0000 (22:46 +0100)] 
test: test the new srk extraction functionality

2 years agoman: update --tpm2-device-key= docs to reference the new ways to get the SRK
Lennart Poettering [Wed, 8 Nov 2023 21:36:28 +0000 (22:36 +0100)] 
man: update --tpm2-device-key= docs to reference the new ways to get the SRK

2 years agoanalyze: add "srk" verb to extract current srk from TPM2 chip
Lennart Poettering [Wed, 8 Nov 2023 21:34:24 +0000 (22:34 +0100)] 
analyze: add "srk" verb to extract current srk from TPM2 chip

This is pretty low-level functionality, hence placed in systemd-analyze.
This is useful for working with systemd-cryptenroll --tpm2-device-key=,
as it acquires the SRK without requiring the full tpm2-tss tool set.

2 years agotpm2-setup: also save the SRK to the file system in TPM2_PUBLIC format
Lennart Poettering [Wed, 8 Nov 2023 21:24:33 +0000 (22:24 +0100)] 
tpm2-setup: also save the SRK to the file system in TPM2_PUBLIC format

We already save it in PEM format, also store it TPM2_PUBLIC format next
to it. This is useful for usage with systemd-cryptenroll's
--tpm2-device-key= switch.

2 years agorepart: add missing --tpm2-pcrlock= in --help text
Lennart Poettering [Thu, 9 Nov 2023 10:01:23 +0000 (11:01 +0100)] 
repart: add missing --tpm2-pcrlock= in --help text

Follow-up for: 404aea7815595c1324947ed7f2a7502b17d3cc01

2 years agocore: fix array size in unit_log_resources()
Florian Schmaus [Thu, 9 Nov 2023 07:59:59 +0000 (08:59 +0100)] 
core: fix array size in unit_log_resources()

In 0531bded79dc ("core: include peak memory in unit_log_resources()") new log
messages where added, however the size of the according arrays to hold the
messages was not adjusted.

Fixes: 0531bded79dc ("core: include peak memory in unit_log_resources()")
2 years agoman: document explicitly tha ReadWritePaths= cannot undo superblock read-only settings
Lennart Poettering [Wed, 8 Nov 2023 14:36:43 +0000 (15:36 +0100)] 
man: document explicitly tha ReadWritePaths= cannot undo superblock read-only settings

Fixes: #29266
2 years agoMerge pull request #29949 from mrc0mmand/even-more-ntp-followups
Yu Watanabe [Thu, 9 Nov 2023 06:08:31 +0000 (15:08 +0900)] 
Merge pull request #29949 from mrc0mmand/even-more-ntp-followups

busctl: send READY=1 when we become a monitor

2 years agoMerge pull request #29939 from YHNdnzj/fdopen-independent-mode
Yu Watanabe [Thu, 9 Nov 2023 06:07:11 +0000 (15:07 +0900)] 
Merge pull request #29939 from YHNdnzj/fdopen-independent-mode

basic/fileio: drop O_CREAT in flags passed to fd_reopen

2 years agotest: use Type=notify together with `busctl monitor` 29949/head
Frantisek Sumsal [Wed, 8 Nov 2023 23:00:27 +0000 (00:00 +0100)] 
test: use Type=notify together with `busctl monitor`

Let's use the newly gained feature of `busctl` and start is as a
Type=notify unit, which should make sure the unit is started only after
`busctl` is on the bus listening for messages.

This should help with a race spotted in CIs, where we continued too
early after starting `busctl monitor` and miss the emitted signals:

[   10.914831] testsuite-45.sh[694]: + systemd-run --unit busctl-monitor.service --service-type=exec busctl monitor --json=short '--match=type='\''signal'\'',sender=org.freedesktop.timesync1,member='\''PropertiesChanged'\'',path=/org/free>
[   11.064365] systemd[1]: Starting busctl-monitor.service...
[   11.064903] systemd[1]: Started busctl-monitor.service.
[   11.065192] testsuite-45.sh[740]: Running as unit: busctl-monitor.service; invocation ID: ee44a9d713c34b9a97e3e7f6f4fffe77
...
[   11.069255] testsuite-45.sh[694]: + timedatectl ntp-servers ntp99 10.0.0.1
[   11.077140] systemd-timesyncd[728]: Network configuration changed, trying to establish connection.
[   11.077461] testsuite-45.sh[694]: + assert_networkd_ntp ntp99 10.0.0.1
...
[   11.087418] testsuite-45.sh[694]: + assert_timesyncd_signal '2023-11-08 16:28:48.861455' LinkNTPServers 10.0.0.1
...
[   11.095543] testsuite-45.sh[694]: + for _ in {0..9}
[   11.095543] testsuite-45.sh[694]: + journalctl -q '--since=2023-11-08 16:28:48.861455' -p info _SYSTEMD_UNIT=busctl-monitor.service --grep .
[   11.193258] systemd-journald[375]: Received client request to sync journal.
[   11.112424] testsuite-45.sh[694]: + sleep .5
[   11.160318] dbus-daemon[465]: [system] Connection :1.56 (uid=0 pid=741 comm="/usr/bin/busctl monitor --json=short --match=type=") became a monitor.

Resolves: #29923

2 years agobusctl: send READY=1 when we become a monitor
Frantisek Sumsal [Wed, 8 Nov 2023 22:57:27 +0000 (23:57 +0100)] 
busctl: send READY=1 when we become a monitor

This is pretty much the same stuff as `resolvectl monitor` does, and
allows us to run `busctl monitor` in a Type=notify unit which ensures
that `busctl` is really listening for messages once the unit is marked
as started.

2 years agotest: drop some unnecessary quotes
Frantisek Sumsal [Wed, 8 Nov 2023 22:38:28 +0000 (23:38 +0100)] 
test: drop some unnecessary quotes

2 years agotest-process-util: Handle unprivileged setrlimit success
Dan Nicholson [Wed, 8 Nov 2023 19:15:22 +0000 (12:15 -0700)] 
test-process-util: Handle unprivileged setrlimit success

Currently test_setpriority_closest assumes that setting RLIMIT_NICE to 30 will
fail if the process is unprivileged. If it succeeds, it assumes that the
process is privileged and setresuid and setresgid will succeed.

However, if RLIMIT_NICE is already >= 30, then setrlimit will succeed even if
the process is unprivileged. Guard against that by checking for permission
errors in setresuid and setresgid and skipping the full test if so.

Fixes #22896.

2 years agoMerge pull request #29932 from yuwata/default-network-cleanups
Yu Watanabe [Wed, 8 Nov 2023 20:15:13 +0000 (05:15 +0900)] 
Merge pull request #29932 from yuwata/default-network-cleanups

network: several cleanups for default .network files

2 years agojournalctl: verify sealed log epochs are continuous
Felix Dörre [Fri, 18 Aug 2023 08:00:40 +0000 (10:00 +0200)] 
journalctl: verify sealed log epochs are continuous

Currently empty epochs are not sealed. This allows an attacker to truncate
a sealed log and continue it without any problems showing when verifying the
log.

This partially addresses CVE-2023-31438. One way to extend this change to
address CVE-2023-31438 completely, would be to verify that there is exactly
one seal per epoch (and not sealing when the epoch has not ended yet).

the change also adds a journal-file flag: HEADER_COMPATIBLE_SEALED_CONTINUOUS
this flag indicates that a journal file is sealed continuously and decides whether
any missing crypto epochs should trigger a warning or an error.

2 years agoMerge pull request #29942 from bluca/executor_no_utmp
Luca Boccassi [Wed, 8 Nov 2023 20:01:39 +0000 (20:01 +0000)] 
Merge pull request #29942 from bluca/executor_no_utmp

core: fix build with -Dutmp=false

2 years agoMerge pull request #29927 from yuwata/resolve-mdns-fixlets
Luca Boccassi [Wed, 8 Nov 2023 19:56:31 +0000 (19:56 +0000)] 
Merge pull request #29927 from yuwata/resolve-mdns-fixlets

resolve: several mdns fixlets

2 years agoMerge pull request #29931 from dtardon/udev-remove-property
Luca Boccassi [Wed, 8 Nov 2023 19:55:45 +0000 (19:55 +0000)] 
Merge pull request #29931 from dtardon/udev-remove-property

 udev-manager: actually remove the property

2 years agobasic/fileio: drop O_CREAT before passing flags to fd_reopen 29939/head
Mike Yuan [Wed, 8 Nov 2023 17:43:08 +0000 (01:43 +0800)] 
basic/fileio: drop O_CREAT before passing flags to fd_reopen

Follow-up for 78c21009bfcf0758f9c85dc70ac896c8aab6b535

Fixes #29938

2 years agofd-util: refuse O_CREAT in fd_reopen
Mike Yuan [Wed, 8 Nov 2023 17:10:06 +0000 (01:10 +0800)] 
fd-util: refuse O_CREAT in fd_reopen

O_CREAT doesn't make sense for fd_reopen, since we're
working on an already opened fd. Also, in fd_reopen
we don't handle the mode parameter of open(2), which
means we may get runtime error like #29938.

2 years agoci: add -Dutmp=false coverage 29942/head
Luca Boccassi [Wed, 8 Nov 2023 18:41:09 +0000 (18:41 +0000)] 
ci: add -Dutmp=false coverage

2 years agocore: fix build with -Dutmp=false
Luca Boccassi [Wed, 8 Nov 2023 18:39:48 +0000 (18:39 +0000)] 
core: fix build with -Dutmp=false

2 years agoman: document nameserver= option
Michal Sekletar [Wed, 8 Nov 2023 15:29:25 +0000 (16:29 +0100)] 
man: document nameserver= option

2 years agocore: call mac_init from sd-executor
Luca Boccassi [Wed, 8 Nov 2023 15:24:17 +0000 (15:24 +0000)] 
core: call mac_init from sd-executor

Before the split the SELinux database was inherited via CoW. Since
the split we need to reopen it.

Follow-up for bb5232b6a3b8af

2 years agoupdate TODO
Lennart Poettering [Wed, 8 Nov 2023 17:18:00 +0000 (18:18 +0100)] 
update TODO

2 years agoman: fix typo
Yu Watanabe [Wed, 8 Nov 2023 15:09:10 +0000 (00:09 +0900)] 
man: fix typo

Follow-up for a9d54de66d62b1180aef845fae2eabde4968dda5.

2 years agonetwork: make 89-ethernet.network match only physical interfaces 29932/head
Yu Watanabe [Wed, 8 Nov 2023 14:05:09 +0000 (23:05 +0900)] 
network: make 89-ethernet.network match only physical interfaces

For safety. We already add similar condition to a generated one:
c25aa6c8acc6d95eaacae7858a7057907d61a25e

2 years agonetwork: use Kind= instead of Driver=
Yu Watanabe [Wed, 8 Nov 2023 13:59:33 +0000 (22:59 +0900)] 
network: use Kind= instead of Driver=

networkd ignores errors in reading driver through ethtool. The kind of
network interface is retrieved through netlink, and networkd checks
checks many failures. So, using Kind= should be safer.

No functional change, just for safety.

2 years agoudev-manager: mark old_key as unused too 29931/head
David Tardon [Wed, 8 Nov 2023 13:52:43 +0000 (14:52 +0100)] 
udev-manager: mark old_key as unused too

2 years agoresolve/mdns: silently ignore Known-Answers only packets 29927/head
Yu Watanabe [Wed, 8 Nov 2023 12:37:04 +0000 (21:37 +0900)] 
resolve/mdns: silently ignore Known-Answers only packets

2 years agoresolve/mdns: allow mDNS queries with truncation flag
Yu Watanabe [Wed, 8 Nov 2023 12:35:12 +0000 (21:35 +0900)] 
resolve/mdns: allow mDNS queries with truncation flag

If the query has many Known-Answers records, then the truncation flag is
set.

Fixes #29168.

2 years agoresolve: tweak logs about truncation
Yu Watanabe [Wed, 8 Nov 2023 12:23:19 +0000 (21:23 +0900)] 
resolve: tweak logs about truncation

2 years agoudev-manager: actually remove the property
David Tardon [Wed, 8 Nov 2023 13:41:28 +0000 (14:41 +0100)] 
udev-manager: actually remove the property

AFAICT there's no reason to keep removed entries in the Hashmap
(although it doesn't break anything either). The only use of this
hashmap is in udev_rule_apply_token_to_event(), which just retrieves the
value using hashmap_get(), hence there's no difference there between an
existing entry with a NULL value and a missing entry.

2 years agoMerge pull request #29926 from poettering/man-fixes
Lennart Poettering [Wed, 8 Nov 2023 13:32:34 +0000 (14:32 +0100)] 
Merge pull request #29926 from poettering/man-fixes

Various documentation fixes

2 years agoupdate TODO 29926/head
Lennart Poettering [Wed, 8 Nov 2023 11:00:19 +0000 (12:00 +0100)] 
update TODO

2 years agoman: document that changing --uid= doesn't work
Lennart Poettering [Wed, 8 Nov 2023 10:57:44 +0000 (11:57 +0100)] 
man: document that changing --uid= doesn't work

Fixes: #28982
2 years agoman: document that Domains=local bind the domain to unicast DNS, not mDNS
Lennart Poettering [Wed, 8 Nov 2023 10:52:53 +0000 (11:52 +0100)] 
man: document that Domains=local bind the domain to unicast DNS, not mDNS

Fixes: #28983
2 years agoservice: say explicitly that people should not use different NonBlocking= settings...
Lennart Poettering [Wed, 8 Nov 2023 10:35:35 +0000 (11:35 +0100)] 
service: say explicitly that people should not use different NonBlocking= settings if they share socket units between multiple service units

Fixes: #29600
2 years agoman: explicitly document compat guarantees of cryptenroll vs. cryptsetup
Lennart Poettering [Wed, 8 Nov 2023 10:21:53 +0000 (11:21 +0100)] 
man: explicitly document compat guarantees of cryptenroll vs. cryptsetup

Fixes: #29743
2 years agoresolve/mdns: split out mdns_make_dummy_packet()
Yu Watanabe [Wed, 8 Nov 2023 11:55:50 +0000 (20:55 +0900)] 
resolve/mdns: split out mdns_make_dummy_packet()

Then, this fixes the following issues:
- if dns_packet_append_zone() for other transaction is failed with
  EMSGSIZE, the previously added key was not removed,
- if dns_transaction_prepare() for other transaction returns 0, then
  we restated the loop without dropping previously appended keys, which
  might not be necessary any more.

2 years agoresolve/mdns: do not append packets without records
Yu Watanabe [Wed, 8 Nov 2023 11:53:39 +0000 (20:53 +0900)] 
resolve/mdns: do not append packets without records

Previously, if we have only max_rr cached entries, then an empty packet
is appended.

Prompted by #29168.

2 years agoman,doc: document some aspects of user record management/homed a bit better
Lennart Poettering [Wed, 8 Nov 2023 10:11:22 +0000 (11:11 +0100)] 
man,doc: document some aspects of user record management/homed a bit better

Fixes: #29759
2 years agoman: be even clearer that tmpfiles user/group/mode are applied on existing inodes
Lennart Poettering [Wed, 8 Nov 2023 09:56:07 +0000 (10:56 +0100)] 
man: be even clearer that tmpfiles user/group/mode are applied on existing inodes

I think it was clear already, but let's be even clearer.

Fixes: #29774
2 years agoman: update COREDUMP_xyz journal fields docs
Lennart Poettering [Wed, 8 Nov 2023 09:48:41 +0000 (10:48 +0100)] 
man: update COREDUMP_xyz journal fields docs

This completes/corrects the documentation for the following fields:

    COREDUMP_CGROUP= - doc where wrong, actually covered COREDUMP_PROC_CGROUP=
    COREDUMP_CMDLINE= → undocumented so far
    COREDUMP_PROC_CGROUP= → docs where there but incorrectly assigned to COREDUMP_CGROUP=
    COREDUMP_PROC_AUXV= → undocumented so far
    COREDUMP_SESSION= → undocumented so far

Fixes: #29832
2 years agoman: add missing unit file section name to example
Lennart Poettering [Wed, 8 Nov 2023 09:31:55 +0000 (10:31 +0100)] 
man: add missing unit file section name to example

Fixes: #29917
2 years agoMerge pull request #29921 from yuwata/sd-dhcp-client-timestamp
Luca Boccassi [Wed, 8 Nov 2023 10:55:11 +0000 (10:55 +0000)] 
Merge pull request #29921 from yuwata/sd-dhcp-client-timestamp

dhcp: further cleanups for timestamp

2 years agoresolvectl: do not sort domain output
Ronan Pigott [Tue, 7 Nov 2023 22:05:02 +0000 (15:05 -0700)] 
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: af781878d598 ("resolvectl: sort domain/nta output")
2 years agotest: retry the property check a couple of times
Frantisek Sumsal [Wed, 8 Nov 2023 08:13:45 +0000 (09:13 +0100)] 
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

2 years agoMerge pull request #28519 from ddstreet/tpm2_external_seal
Lennart Poettering [Wed, 8 Nov 2023 09:28:28 +0000 (10:28 +0100)] 
Merge pull request #28519 from ddstreet/tpm2_external_seal

Update systemd-cryptenroll to enroll TPM using only public key

2 years agosd-dhcp-client,-server: set timestamp based on the time when received a packet 29921/head
Yu Watanabe [Wed, 8 Nov 2023 04:49:03 +0000 (13:49 +0900)] 
sd-dhcp-client,-server: set timestamp based on the time when received a packet

It seems that RFC does not say anything about the timestamp of lease
we should use: time that the client sent a request or received a reply.
In DHCPv6 client and NDisc, we use a timestamp that we receive a packet,
rather than we sent something. So, let's consistently use the same
logic for DHCPv4 client.

By using the logic, we will hopefully not forget to set timestamp again,
which is fixed by 089362976c2a653a77f942bfeb3f61d0e180f078.

2 years agosd-dhcp-client: move packet size check to dhcp_packet_verify_headers()
Yu Watanabe [Wed, 8 Nov 2023 04:15:00 +0000 (13:15 +0900)] 
sd-dhcp-client: move packet size check to dhcp_packet_verify_headers()

No functional change.

2 years agosd-dhcp-client: split out client_verify_message_header()
Yu Watanabe [Wed, 8 Nov 2023 04:04:59 +0000 (13:04 +0900)] 
sd-dhcp-client: split out client_verify_message_header()

This is not necessary to be called when a packet is received through the
RAW socket, but should not hurt anything.

2 years agotest: set working directory even if it is expected that the command fails
Yu Watanabe [Wed, 8 Nov 2023 03:16:26 +0000 (12:16 +0900)] 
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 6bc5de53e8410fdec817300185b7ad72cd7775dd.

2 years agovmspawn: fix memleak
Yu Watanabe [Wed, 8 Nov 2023 05:54:17 +0000 (14:54 +0900)] 
vmspawn: fix memleak

Fixes CID#1523912.

2 years agotree-wide: fix typo
Yu Watanabe [Wed, 8 Nov 2023 05:57:33 +0000 (14:57 +0900)] 
tree-wide: fix typo

2 years agosd-dhcp-client: make client_handle_message() propagate critical error
Yu Watanabe [Wed, 8 Nov 2023 03:56:57 +0000 (12:56 +0900)] 
sd-dhcp-client: make client_handle_message() propagate critical error

Then, stop client in the caller side.

This also makes
- ignore all errors except for resource errors like OOM when FORCERENEW
  is received,
- trigger assertion when an message received even if the client is
  stopped.

This should not change any functionality. Just refactoring.

2 years agoMerge pull request #29910 from yuwata/rapid-commit
Yu Watanabe [Wed, 8 Nov 2023 03:20:17 +0000 (12:20 +0900)] 
Merge pull request #29910 from yuwata/rapid-commit

dhcp: about rapid commit

2 years agoMerge pull request #29913 from keszybz/vmspawn-ci
Luca Boccassi [Tue, 7 Nov 2023 23:35:48 +0000 (23:35 +0000)] 
Merge pull request #29913 from keszybz/vmspawn-ci

Build vmspawn in CI and fix one test failure

2 years agoMerge pull request #29915 from mrc0mmand/ntp-followups
Luca Boccassi [Tue, 7 Nov 2023 22:38:23 +0000 (22:38 +0000)] 
Merge pull request #29915 from mrc0mmand/ntp-followups

timesync: fix PropertiesChanges signals for NTP properties

2 years agovmspawn: add missing include 29913/head
Zbigniew Jędrzejewski-Szmek [Tue, 7 Nov 2023 21:50:37 +0000 (22:50 +0100)] 
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]

2 years agoMerge pull request #6763 from kinvolk/iaguis/no-new-privs
Luca Boccassi [Tue, 7 Nov 2023 21:34:49 +0000 (21:34 +0000)] 
Merge pull request #6763 from kinvolk/iaguis/no-new-privs

core: allow using seccomp without no_new_privs when unprivileged

2 years agomeson: enable vmspawn by default in developer mode
Zbigniew Jędrzejewski-Szmek [Tue, 7 Nov 2023 20:51:40 +0000 (21:51 +0100)] 
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.

2 years agoman: many fixes systemd-vmspawn(1)
Zbigniew Jędrzejewski-Szmek [Tue, 7 Nov 2023 20:36:46 +0000 (21:36 +0100)] 
man: many fixes systemd-vmspawn(1)

- version information
- indentation and missing tags
- mkosi and qemu don't need root

2 years agoMerge pull request #29914 from yuwata/network-generator
Luca Boccassi [Tue, 7 Nov 2023 20:51:21 +0000 (20:51 +0000)] 
Merge pull request #29914 from yuwata/network-generator

network-generator: several cleanups and follow-ups for dns server handling

2 years agoxdg-autostart: downgrade warning for missing executables
Zbigniew Jędrzejewski-Szmek [Tue, 7 Nov 2023 16:50:51 +0000 (17:50 +0100)] 
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.

2 years agoMerge pull request #29909 from keszybz/documentation-cleanup
Luca Boccassi [Tue, 7 Nov 2023 20:46:13 +0000 (20:46 +0000)] 
Merge pull request #29909 from keszybz/documentation-cleanup

Two small documentation cleanups

2 years agotimesync: fix PropertiesChanges signals for NTP properties 29915/head
Frantisek Sumsal [Tue, 7 Nov 2023 12:16:05 +0000 (13:16 +0100)] 
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

2 years agotest: "prettify" the test a bit
Frantisek Sumsal [Tue, 7 Nov 2023 13:35:06 +0000 (14:35 +0100)] 
test: "prettify" the test a bit

2 years agosystemctl: grey out legend
Lennart Poettering [Tue, 7 Nov 2023 16:34:08 +0000 (17:34 +0100)] 
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.

2 years agonetwork-generator: refuse unexpected trailing strings 29914/head
Yu Watanabe [Tue, 7 Nov 2023 19:28:02 +0000 (04:28 +0900)] 
network-generator: refuse unexpected trailing strings

2 years agonetwork-generator: allow to specify both IPv4 and IPv6 DNS servers
Yu Watanabe [Tue, 7 Nov 2023 19:09:48 +0000 (04:09 +0900)] 
network-generator: allow to specify both IPv4 and IPv6 DNS servers

Follow-up for 923599523c10d8897551e081e6b00cd8002309c3.

2 years agonetwork-generator: add missing assertions
Yu Watanabe [Tue, 7 Nov 2023 18:56:53 +0000 (03:56 +0900)] 
network-generator: add missing assertions

2 years agonetwork-generator: drop unused family argument
Yu Watanabe [Tue, 7 Nov 2023 18:54:50 +0000 (03:54 +0900)] 
network-generator: drop unused family argument

2 years agonetwork-generator: relax requirement for peer address, route destination, and gateway
Yu Watanabe [Tue, 7 Nov 2023 18:49:12 +0000 (03:49 +0900)] 
network-generator: relax requirement for peer address, route destination, and gateway

No functional changes, as the caller already sets them.

2 years agovmspawn: shorted --help output to fit in 80 columns
Zbigniew Jędrzejewski-Szmek [Tue, 7 Nov 2023 17:54:38 +0000 (18:54 +0100)] 
vmspawn: shorted --help output to fit in 80 columns

I think that "SB" is good enough here, the option name shows the unabbreviated
name.

2 years agonetwork: add [DHCPServer] RapidCommit= setting 29910/head
Yu Watanabe [Tue, 7 Nov 2023 16:33:43 +0000 (01:33 +0900)] 
network: add [DHCPServer] RapidCommit= setting

2 years agosd-dhcp-server: support rapid commit (RFC4039)
Yu Watanabe [Tue, 7 Nov 2023 16:27:46 +0000 (01:27 +0900)] 
sd-dhcp-server: support rapid commit (RFC4039)

https://datatracker.ietf.org/doc/html/rfc4039

2 years agoman: link to new btrfs website for btrfs man pages 29909/head
Zbigniew Jędrzejewski-Szmek [Tue, 7 Nov 2023 17:14:33 +0000 (18:14 +0100)] 
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.

2 years agoMerge pull request #29876 from poettering/kernel-install-all
Lennart Poettering [Tue, 7 Nov 2023 17:29:47 +0000 (18:29 +0100)] 
Merge pull request #29876 from poettering/kernel-install-all

add "kernel-install list" and "kernel-install add-all"

2 years agotest: update TEST-70 with systemd-cryptenroll calculated TPM2 enrollment 28519/head
Dan Streetman [Tue, 25 Jul 2023 00:04:28 +0000 (20:04 -0400)] 
test: update TEST-70 with systemd-cryptenroll calculated TPM2 enrollment

Update test to check systemd-cryptenroll --tpm2-device-key= enrollment.

2 years agotest: fix env var name of persistent handle used for testing so it is removed after...
Dan Streetman [Tue, 7 Nov 2023 17:18:08 +0000 (12:18 -0500)] 
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.

2 years agocryptenroll: add support for calculated TPM2 enrollment
Dan Streetman [Fri, 21 Jul 2023 19:49:16 +0000 (15:49 -0400)] 
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.

2 years agoNEWS: fix strange line break
Zbigniew Jędrzejewski-Szmek [Tue, 7 Nov 2023 16:58:51 +0000 (17:58 +0100)] 
NEWS: fix strange line break

2 years agosd-dhcp-client: unconditionally set sd_dhcp_client.request_sent when a packet is...
Yu Watanabe [Tue, 7 Nov 2023 17:14:59 +0000 (02:14 +0900)] 
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 808b65a08729caa268efd57c478285ee4912d5a3.

2 years agotpm2: update test-tpm2 for tpm2_calculate_seal()
Dan Streetman [Tue, 3 Oct 2023 14:25:19 +0000 (10:25 -0400)] 
tpm2: update test-tpm2 for tpm2_calculate_seal()

Add testing for tpm2_calculate_seal().

2 years agotpm2: add tpm2_calculate_seal() and helper functions
Dan Streetman [Wed, 28 Jun 2023 15:46:31 +0000 (11:46 -0400)] 
tpm2: add tpm2_calculate_seal() and helper functions

Add functions to calculate a sealed secret object.

2 years agotpm2: add tpm2_sym_alg_*_string() and tpm2_sym_mode_*_string()
Dan Streetman [Mon, 6 Nov 2023 18:40:11 +0000 (13:40 -0500)] 
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.

2 years agotpm2: add test to verify srk templates
Dan Streetman [Tue, 3 Oct 2023 14:25:19 +0000 (10:25 -0400)] 
tpm2: add test to verify srk templates

Verify the tpm2_get_srk_template() and tpm2_get_best_srk_template() functions
work as expected.

2 years agotpm2: allow using tpm2_get_srk_template() without tpm
Dan Streetman [Tue, 3 Oct 2023 14:25:19 +0000 (10:25 -0400)] 
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.

2 years agocoredumpctl: propagate SIGTERM to the debugger process
Frantisek Sumsal [Tue, 7 Nov 2023 11:06:02 +0000 (12:06 +0100)] 
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

2 years agosd-dhcp-client: gracefully ignore OFFER with Rapid Commit option
Yu Watanabe [Tue, 7 Nov 2023 13:41:37 +0000 (22:41 +0900)] 
sd-dhcp-client: gracefully ignore OFFER with Rapid Commit option

Fixes #29904.

2 years agoMerge pull request #29907 from poettering/dispatch-uint64_t-as-string
Lennart Poettering [Tue, 7 Nov 2023 15:13:34 +0000 (16:13 +0100)] 
Merge pull request #29907 from poettering/dispatch-uint64_t-as-string

teach json_dispatch_uint64() to parse decimal strings

2 years agoupdate CI 29876/head
Lennart Poettering [Tue, 7 Nov 2023 14:58:32 +0000 (15:58 +0100)] 
update CI

2 years agoupdate TODO
Lennart Poettering [Tue, 7 Nov 2023 11:14:30 +0000 (12:14 +0100)] 
update TODO

2 years agoman: document /usr/lib/modules/ paths as recommend copy source for kernel-install
Lennart Poettering [Mon, 6 Nov 2023 11:03:03 +0000 (12:03 +0100)] 
man: document /usr/lib/modules/ paths as recommend copy source for kernel-install

2 years agokernel-install: make "inspect" work more like "add" regarding omission of parameters
Lennart Poettering [Mon, 6 Nov 2023 17:25:46 +0000 (18:25 +0100)] 
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.

2 years agokernel-install: add add-all verb
Lennart Poettering [Mon, 6 Nov 2023 10:34:11 +0000 (11:34 +0100)] 
kernel-install: add add-all verb

2 years agokernel-install: make version/kernel image parameters optional for "add"
Lennart Poettering [Mon, 6 Nov 2023 09:47:10 +0000 (10:47 +0100)] 
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.

2 years agokernel-install: add command to list installed kernels
Lennart Poettering [Mon, 6 Nov 2023 09:30:58 +0000 (10:30 +0100)] 
kernel-install: add command to list installed kernels

This simply dumps the dirs in /usr/lib/modules/ and whether they contain
a vmlinuz binary.

2 years agotree-wide: take in all *our* JSON structures also decimal strings 29907/head
Lennart Poettering [Tue, 7 Nov 2023 13:17:10 +0000 (14:17 +0100)] 
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).