Commit Graph
68697 Commits
Author SHA1 Message Date
Lennart Poettering dc7e34b369 repart: downgrade pcrlock pickup log message
This is not relevant in most cases, hence don't mention this all the
time.
2023-11-10 22:53:49 +01:00
Lennart Poettering acdf6bcfdb repart: say on which device we apply things
So far we never mention the device in our output. Let's fix that.
2023-11-10 22:53:49 +01:00
Lennart Poettering a053f801f8 repart: when we copy in blocks, indicate we are doing from an offset
At first I thought when using --copy-from= that it was copying in my
whole disk into a partition instead of just a partition into a
partition.

Let's make the log message clearer and say that we copy starting from an
offset.
2023-11-10 22:53:49 +01:00
Lennart Poettering b7786df093 repart: mention how long it took to copy in data blocks
This is quite interesting information, show it.
2023-11-10 22:53:49 +01:00
Lennart Poettering f3066d635a update TODO 2023-11-10 18:55:22 +01:00
Frantisek Sumsal 17ee59c9c9 fuzz: pass -Dc_args=/-Dcpp_args= to fuzzer targets
Prompted by #29972, because right now it's practically impossible to pass
-fno-sanitize=function to the fuzzer targets without some extensive
sed'ing.

This splits both c_args and cpp_args to separate arguments for
tools/meson-build.sh, because the other way would be to use `eval`, so
the space-separated but quoted strings passed to these options are not
split where they shouldn't, and I'd rather avoid using `eval` if
possible.

Also, this switches the positional arguments we pass to `meson setup`,
as they were in incorrect order (docs say it should be buildir followed
by sourcedir); meson is apparently clever enough to figure this out and
switch the arguments around if necessary, so it didn't complain.
2023-11-10 17:22:08 +00:00
Luca Boccassi be0916f77c Merge pull request #29955 from poettering/repart-seal-key
repart: add --tpm2-seal-key= support, matching the recently added support cryptenroll has
2023-11-10 16:52:00 +00:00
Luca Boccassi d8beda5023 Merge pull request #29947 from poettering/srk-beefup
tpm2: make SRK easily accessible for use with systemd-cryptenroll --tpm2-device-key=
2023-11-10 16:47:46 +00:00
zeroskyx 49a2fe1388 hwdb: Add accelerometer data for Librem11 (#29974) 2023-11-10 22:32:05 +09:00
Luca Boccassi ba8eda568c portablectl: fix detaching when an extension image has been deleted 2023-11-10 12:58:45 +00:00
Daniele Medri 4e3c9c8c0b it.po: updates 2023-11-10 12:55:24 +00:00
Cheng-Chia Tseng b04b9bc0a6 po: Translated using Weblate (Chinese (Traditional) (zh_TW))
Currently translated at 83.7% (190 of 227 strings)

Co-authored-by: Cheng-Chia Tseng <pswo10680@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/zh_TW/
Translation: systemd/main
2023-11-10 11:52:58 +00:00
Frantisek Sumsal 4f3d8def18 test: don't pre-process $KERNEL_APPEND
Let's just rely on the word splitting done by bash instead of messing
with that ourselves, as it's just adding extra complexity to appease one
ShellCheck check. Also, this apparently never worked for the nspawn
stuff anyway, since I forgot to set $IFS to an appropriate value, so it
always put all arguments from $KERNEL_APPEND into a single array item
with an extra newline, which then made systemd sad:

~# readarray arr <<< "foo bar baz"; for i in "${arr[@]}"; do echo "'$i'"; done
'foo bar baz
'
~# make -C test/TEST-45-TIMEDATE/ clean setup run BUILD_DIR=$PWD/build TEST_NO_QEMU=1 KERNEL_APPEND="systemd.log_level=console"
...
~# journalctl -o short-monotonic --no-hostname --file /var/tmp/systemd-tests/systemd-test.XaDX67/system.journal --grep "Failed to parse" -p info --no-pager
[551138.986882] systemd-tmpfiles[21]: Failed to parse log level 'console
[551138.987179] systemd-remount-fs[20]: Failed to parse log level 'console
[551138.993125] systemd-sysusers[23]: Failed to parse log level 'console
[551138.998685] journalctl[29]: Failed to parse log level 'console

Resolves: #29945
2023-11-09 16:31:12 +00:00
Luca Boccassi 2dbfb4f9f2 Merge pull request #29954 from DaanDeMeyer/fix
repart: Fix size round up/round down
2023-11-09 16:30:37 +00:00
Yu Watanabe b5f7d1d550 Merge pull request #29937 from yuwata/network-fix-json-format
network: fix json output
2023-11-09 21:47:37 +09:00
Luca Boccassi 42874983ec Merge pull request #29783 from CodethinkLabs/vmspawn/notify-socket-forward-pr
vmspawn - forward messages to notify socket forward
2023-11-09 12:39:10 +00:00
Antonio Alvarez Feijoo 52c7727f54 bootctl: fix code comment 2023-11-09 12:14:01 +00:00
Frantisek Sumsal a155ef7b65 test: add one missing assertion
This also makes sure the first signal doesn't "spill" over into the
second check.
2023-11-09 12:13:33 +00:00
Lennart Poettering 948a4bb5cf test: test the new srk extraction functionality 2023-11-09 12:50:20 +01:00
Lennart Poettering 342c70da7c man: update --tpm2-device-key= docs to reference the new ways to get the SRK 2023-11-09 12:49:29 +01:00
Lennart Poettering d30693f39b 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.
2023-11-09 12:48:27 +01:00
Lennart Poettering fbe7db47f4 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.
2023-11-09 12:47:24 +01:00
Lennart Poettering fadc7d8cd7 repart: add missing --tpm2-pcrlock= in --help text
Follow-up for: 404aea7815
2023-11-09 11:36:13 +00:00
Lennart Poettering 869996dd89 update TODO 2023-11-09 12:28:37 +01:00
Lennart Poettering 6528563e64 test: make sure --tpm2-device-key= works correctly in repart, too 2023-11-09 12:28:37 +01:00
Lennart Poettering 78fdf0f68b repart: add --tpm2-device-key= to repart, too
This adds what was added to systemd-cryptenroll recently to
systemd-repart too.

Follow-up for: c3a2a681be
2023-11-09 12:27:43 +01:00
Lennart Poettering a4e9f3d3e8 cryptenroll: slightly reorder things
The tpm2_tpm2b_public_from_pem() invocation only makes sense when we
succeed to load the file from disk, hence we might do this together and
safe a conditionalization.
2023-11-09 12:27:43 +01:00
Lennart Poettering a8d8d34bfc tpm2-util: move loading of TPM2B_PUBLIC from disk into tpm2-util.c
No change in behaviour, let's just move this over so that we can reuse
this in repart later (and don't have to export the ugly `sym_` function
pointer for it)
2023-11-09 12:27:43 +01:00
Lennart Poettering 7911b6ca12 repart,cryptenroll: bring tpm2 switches/--help/handling in a single, canonical order
Let's define the same switches and their backing variables in the same
order, and let's make sure the enums and switches are named the same.

No actual code changes.
2023-11-09 12:27:43 +01:00
Daan De Meyer 6563aede88 repart: Fix size round up/round down
Currently, we round minimum sizes up and maximum size down, whereas
it should be the opposite as the current approach means that if the
same size is used for min and max, the min size will end up bigger
than the max size after rounding.
2023-11-09 12:10:53 +01:00
Daan De Meyer 74b45fe43f Set default value for tools tree
This allows overriding it from CLI or previous config file if
required.
2023-11-09 12:10:11 +01:00
Sam Leonard 6b30cad5e9 vmspawn: update man page to include vsock options 2023-11-09 10:36:26 +00:00
Sam Leonard f72a085641 vmspawn: added vsock functionality
also includes cosmetic fixups from: https://github.com/systemd/systemd/pull/29874
2023-11-09 10:36:25 +00:00
Florian Schmaus 8930285234 core: fix array size in unit_log_resources()
In 0531bded79 ("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: 0531bded79 ("core: include peak memory in unit_log_resources()")
2023-11-09 09:59:10 +00:00
Lennart Poettering b6be6a6721 man: document explicitly tha ReadWritePaths= cannot undo superblock read-only settings
Fixes: #29266
2023-11-09 09:39:12 +01:00
Yu Watanabe 0bc649d6b0 Merge pull request #29949 from mrc0mmand/even-more-ntp-followups
busctl: send READY=1 when we become a monitor
2023-11-09 15:08:31 +09:00
Yu Watanabe 6900d90877 Merge pull request #29939 from YHNdnzj/fdopen-independent-mode
basic/fileio: drop O_CREAT in flags passed to fd_reopen
2023-11-09 15:07:11 +09:00
Frantisek Sumsal 730ccf9681 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
2023-11-09 00:00:27 +01:00
Frantisek Sumsal c39a6ab789 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.
2023-11-08 23:57:27 +01:00
Frantisek Sumsal 9a42457bae test: drop some unnecessary quotes 2023-11-08 23:38:28 +01:00
Dan Nicholson 9217255427 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.
2023-11-08 21:29:16 +00:00
Yu Watanabe 425e8065b7 Merge pull request #29932 from yuwata/default-network-cleanups
network: several cleanups for default .network files
2023-11-09 05:15:13 +09:00
Felix Dörre e375bc5fcc 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.
2023-11-09 05:13:27 +09:00
Luca Boccassi 3e433afac9 Merge pull request #29942 from bluca/executor_no_utmp
core: fix build with -Dutmp=false
2023-11-08 20:01:39 +00:00
Luca Boccassi fe7109fc2e Merge pull request #29927 from yuwata/resolve-mdns-fixlets
resolve: several mdns fixlets
2023-11-08 19:56:31 +00:00
Luca Boccassi 98a10e385d Merge pull request #29931 from dtardon/udev-remove-property
udev-manager: actually remove the property
2023-11-08 19:55:45 +00:00
Mike Yuan 6f9677bc7f basic/fileio: drop O_CREAT before passing flags to fd_reopen
Follow-up for 78c21009bf

Fixes #29938
2023-11-09 03:38:14 +08:00
Mike Yuan 05314c9c87 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.
2023-11-09 03:35:56 +08:00
Luca Boccassi 37f16ef072 ci: add -Dutmp=false coverage 2023-11-08 18:41:47 +00:00
Luca Boccassi de3612dbd7 core: fix build with -Dutmp=false 2023-11-08 18:41:47 +00:00