Commit Graph
59895 Commits
Author SHA1 Message Date
Yu Watanabe 626f15a4c1 Merge pull request #24730 from yuwata/dissect-image-drop-reference-to-decrypted-image
dissect-image: introduce dissected_image_relinquish()
2022-09-19 05:24:35 +09:00
BerndAdameit a3e03a3f18 man/systemd-run: Refer to man-pages project (man7.org) when citing bash(1) 2022-09-19 00:32:34 +09:00
Yu Watanabe 28f9bcd65a path-util: add examples for path_make_relative() and path_make_relative_parent()
Addresses https://github.com/systemd/systemd/pull/24646#discussion_r973691797.
2022-09-19 00:30:29 +09:00
Yu Watanabe e330f97a89 tree-wide: drop unused reference to DecryptedImage 2022-09-18 23:47:20 +09:00
Yu Watanabe 3044d343dd tree-wide: use dissected_image_relinquish() 2022-09-18 23:47:20 +09:00
Yu Watanabe f906075a15 dissect-image: introduce dissected_image_relinquish() 2022-09-18 23:47:20 +09:00
Daan De Meyer c72aed4c20 Merge pull request #24720 from yuwata/dissect-image-take-reference
dissect-image: make DissectedImage object take reference to DecryptedImage and LoopDevice
2022-09-18 16:08:13 +02:00
Yu Watanabe 8b6a70f699 Merge pull request #24719 from yuwata/dissect-image-dissected-image-new
dissect-image: introduce dissected_image_new()
2022-09-18 22:41:49 +09:00
Yu Watanabe 23d3dfc369 sd-device: refuse block device without subsystem
Previously, even if sd_device_get_subsystem() returns -ENOENT for block
device, we accepted that. This makes the check slightly stricter.
2022-09-18 15:35:56 +02:00
Daan De Meyer 4f0d1cd011 Merge pull request #24691 from yuwata/udev-node-check-existence
udev: check existence of device node
2022-09-18 11:38:56 +02:00
Daan De Meyer a36b572166 Merge pull request #24710 from yuwata/test-50-dissect-cleanups
TEST-50-DISSECT: cleanups
2022-09-18 11:21:30 +02:00
Yu Watanabe 0f75b0c589 dissect-image: free crypt_device object before trying to activate with unique name
Otherwise we get error from libcryptsetup like the following:
systemd[1234]: Cannot use device /dev/loop5 which is in use (already mapped or mounted).
2022-09-18 11:19:33 +02:00
Yu Watanabe a1c3628b19 udev: downgrade log level when device node is already removed
Follow-up for 790da548b0.
2022-09-18 10:51:25 +02:00
Yu Watanabe babd5b08b5 dissect-image: introduce DISSECTED_PARTITION_NULL
Currently, it is not necessary to set partno or architecture in
dissect_image_new(), but just for safety.
Preparation for later commits.
2022-09-18 17:26:22 +09:00
Yu Watanabe 00e295055b dissect-image: split out dissected_image_new()
To make dissect_image() shorter.
No functional changes, just refactoring.
2022-09-18 17:26:22 +09:00
Yu Watanabe 1e63dc4f1c dissect-image: take a reference of LoopDevice into DissectedImage
To make LoopDevice object freed after DissectedImage is freed.
At least currently, this should not change anything. Preparation for
later commits.
2022-09-18 07:56:32 +09:00
Yu Watanabe 36d5eb0bff loop-util: introduce reference counter for LoopDevice 2022-09-18 07:56:32 +09:00
Yu Watanabe ac1e1b5fd7 dissect-image: take reference of DecryptedImage into DissectedImage
No functional changes. Preparation for later commits.
2022-09-18 07:56:32 +09:00
Yu Watanabe 9321ad5118 dissect-image: introduce reference counter for DecryptedImage 2022-09-18 07:56:32 +09:00
Yu Watanabe ea16d7f48e dissect-image: lazily deactivate decrypted DM volumes
The DM block device may be still used by other processes.
2022-09-18 07:27:22 +09:00
Lennart Poettering f578c659c4 measure: rename measure_pcr() to measure_kernel()
Let's say what we actually measure, not what into (which is obvious
anyway).

This is generally more descriptive, but also good for later work that
allows measuring the boot phase too.
2022-09-18 07:27:00 +09:00
Yu Watanabe cf610e1d87 cryptsetup-util: introduce crypt_free_and_replace() 2022-09-18 04:57:10 +09:00
Lennart Poettering 0ea720ca7e Merge pull request #24622 from yuwata/udev-open-with-noctty
udev: open with O_NOCTTY
2022-09-17 19:03:15 +02:00
Zbigniew Jędrzejewski-Szmek eb5b6b7310 Merge pull request #24708 from keszybz/not-available-in-tables
various: use "-" instead of "n/a" in tables
2022-09-17 18:16:42 +02:00
Yu Watanabe d3fcb73678 test-50-dissect: do not fail test on cleanup
These paths are read-only mount points. Hence, we cannot remove the
contents.
2022-09-17 21:36:18 +09:00
Yu Watanabe 759b4b4a2a test-50-dissect: check mount destination instead of mount source
And rebreak long lines.

This should take no effective change, just refactoring.
2022-09-17 21:36:18 +09:00
Zbigniew Jędrzejewski-Szmek 15b3f7e309 Merge pull request #24670 from keszybz/early-boot-ordering
Early boot ordering
2022-09-17 13:26:51 +02:00
Zbigniew Jędrzejewski-Szmek 7f8afa6dc1 coredumpctl: rename table entry
"Disk Size" could be mistaken for "Size of the Disk".
2022-09-17 13:12:49 +02:00
Zbigniew Jędrzejewski-Szmek 8a9651088f various: use "-" instead of "n/a" in tables
In the context of a table, both would be generally understood to have the same
meaning. "n/a" is a strange beast. It was useful when tables were produced on
the typewriter with "---------" used to separate rows. It is visually more
pleasing to use "-", and there is no risk of it being mistaken for a row
separator.
2022-09-17 13:05:51 +02:00
Daan De Meyer 9bf36477bf Merge pull request #24703 from yuwata/dissect-image-verity-partition-make-fail
dissect-image: make verity_partition() actually fail when all attempts of activation failed
2022-09-17 09:57:20 +02:00
Yu Watanabe ee3455cf11 fd-util: rename CLOSE_AND_REPLACE() -> close_and_replace()
We have free_and_replace() and friends, they are all named with lower
letters, even they are macros, not functions.
For consistency, let's rename CLOSE_AND_REPLACE() with lower letters.

This also mekes the macro used more places.
2022-09-17 09:54:41 +02:00
Yu Watanabe 9972e6d6ed dissect-image: make verity_partition() actually fail when all attempts of activation failed 2022-09-17 05:18:25 +09:00
Yu Watanabe ad361a50fb dissect-image: split out verity_timeout()
To make verity_partition() shorten. No functional changes, just
refactoring.
2022-09-17 05:18:25 +09:00
Yu Watanabe cb19517490 man: explicitly document that "reboot -f" is different from "systemctl reboot -f"
Closes #24696.
2022-09-17 05:15:36 +09:00
Lennart Poettering c941b65075 nspawn: fix two error strings 2022-09-17 05:15:02 +09:00
Dan Streetman 137d162c42 add CAP_LINUX_IMMUTABLE to systemd-machined, so it can handle machinectl read-only requests
Without this, the 'machinectl read-only ...' command always fails.
2022-09-16 19:50:52 +01:00
Yu Watanabe dd35a61caf sd-netlink: unexport sd-netlink
This effectively reverts 84e1001541.

The sd-netlink library has several issues, and we should not export it
without solving them. See issues #24258 and #24124.
2022-09-17 01:31:57 +09:00
Yu Watanabe 54ee1cd69d Merge pull request #24692 from yuwata/dissect-image-fix-memleak
dissect-image: fix memleak
2022-09-17 01:31:32 +09:00
Lennart Poettering d52e1c81b9 update TODO
Seeding RNG via SMBIOS is bad idea, since often measurement of SMBIOS
tables is used for TPM policies, under the assumption SMBIOS remains
static after a certain point.
2022-09-16 16:24:56 +01:00
Lennart Poettering c5be1ceb08 tmpfiles: let's suffix path to dirs with '/' also in log messages 2022-09-17 00:20:24 +09:00
Lennart Poettering 0af7e6ee73 tmpfiles: drop redundant forward declarations 2022-09-17 00:20:10 +09:00
Yu Watanabe ab8e6464b5 Merge pull request #24664 from yuwata/watchdog
watchdog: open /dev/watchdog0 only if it exists
2022-09-17 00:18:53 +09:00
Yu Watanabe e99b370ccb Merge pull request #24688 from yuwata/watchdog-dbus-properties-follow-ups
pid1: follow-ups for watchdog DBus properties
2022-09-17 00:18:05 +09:00
Daniel Braunwarth 43deb1a8dc journalctl: respect --quiet flag during file concistency verification
Fixes #24563.
2022-09-17 00:17:47 +09:00
Yu Watanabe e9fe11090e Merge pull request #24685 from yuwata/uid-range
uid-range: several cleanups
2022-09-17 00:16:07 +09:00
Yu Watanabe 5bf5013fc9 dissect-image: handle all non-negative return values as success
No functional changes, just coding syle update.
2022-09-16 23:11:09 +09:00
Yu Watanabe 041e2edac8 dissect-image: fix memleak on failure 2022-09-16 23:11:09 +09:00
Yu Watanabe 69928b4f15 udev-node: do not create symlink to a non-existing device node
Previously, the stack directory contains empty regular files named with
device ID, and we create sd_device object from the device name.
Hence, we implicitly checked the existence of the device node.

However, now the files in the stack directory are symlink, and we
retrieve the path to the device node and its priority from the symlink.
Hence, the existence of the device node is not checked.
Let's check if the device node is still exist.
2022-09-16 23:08:07 +09:00
Yu Watanabe 13271e2dde udev-node: split out stack_directory_read_one()
No functional changes, just refactoring.
2022-09-16 23:07:31 +09:00
Yu Watanabe a6b7ebaafa watchdog: use /dev/watchdog0 only if it exists
Fixes #24661.
2022-09-16 22:34:37 +09:00