]>
git.ipfire.org Git - thirdparty/systemd.git/log
Daan De Meyer [Mon, 19 Sep 2022 18:26:15 +0000 (20:26 +0200)]
repart: Add squashfs support
To make this work, we have to set up everything in a temporary
directory tree that we can pass to mksquashfs as a single directory.
To make the most common scenario more efficient, we skip the temporary
setup directory if we only get a single source tree destined to root
in the squashfs filesystem.
Daan De Meyer [Mon, 19 Sep 2022 18:24:55 +0000 (20:24 +0200)]
shared: Add squashfs support to make_filesystem()
The caveat is that the caller has to provide a source directory
to initialize the squashfs filesystem from.
Daan De Meyer [Mon, 19 Sep 2022 17:42:13 +0000 (19:42 +0200)]
repart: Rename fs to root in do_copy_files() and do_make_directories()
Preparation for future commits
Yu Watanabe [Tue, 20 Sep 2022 00:04:54 +0000 (09:04 +0900)]
udev: use block_device_is_whole_disk()
No functional changes, just refactoring.
Note, this also makes synthesize_change() propagate the error from
synthesize_change_one(). However, the caller of synthesize_change()
ignores the failure anyway, hence the change does not take any effect.
Yu Watanabe [Tue, 20 Sep 2022 00:26:50 +0000 (09:26 +0900)]
sd-device: use fd_reopen() at one more place
It provides recognizable error if /proc is not mounted.
William Roberts [Mon, 19 Sep 2022 18:50:03 +0000 (13:50 -0500)]
cryptsetup: use TPM flags over bool
This works becuase TPM2_FLAGS_USE_PIN is 1 and bool is a 1 so the bits
line up as expected, however if for some reason flags change values and
for clarity check if the boolean indicates this flag and pass the flag
value.
Signed-off-by: William Roberts <william.c.roberts@intel.com>
Yu Watanabe [Mon, 19 Sep 2022 14:40:34 +0000 (23:40 +0900)]
meson: make several tests run sequentially
Follow-up for
f93ba375301e43900f1fe5a93a2b33b1efcc73e0 .
Yu Watanabe [Mon, 19 Sep 2022 16:43:00 +0000 (01:43 +0900)]
Merge pull request #24744 from yuwata/mkdir-chase-symlinks
mkdir: chase_symlinks_and_stat() does not return 0
Daan De Meyer [Mon, 19 Sep 2022 15:06:38 +0000 (17:06 +0200)]
Merge pull request #24731 from yuwata/sd-device-opendir
sd-device: introduce device_opendir()
Yu Watanabe [Thu, 25 Aug 2022 22:19:59 +0000 (07:19 +0900)]
test: add more test cases for mkdir_p_safe() and mkdir_p_root()
Yu Watanabe [Thu, 25 Aug 2022 22:50:32 +0000 (07:50 +0900)]
Yu Watanabe [Mon, 19 Sep 2022 13:51:13 +0000 (22:51 +0900)]
Merge pull request #24742 from keszybz/hwdb-252
hwdb update for v252-rc1
Lennart Poettering [Fri, 16 Sep 2022 21:42:05 +0000 (23:42 +0200)]
tpm2-util: make tpm2_pcr_bank_from_string() case-insensitive
This way we can use it directly in measure.c, and thus remove a bit of
redundant code.
OpenSSL prefers uppercasing the MD names, others don't hence let's be
lenient here.
Yu Watanabe [Sun, 18 Sep 2022 22:36:09 +0000 (07:36 +0900)]
udev: use device_opendir()
Yu Watanabe [Sun, 18 Sep 2022 22:08:59 +0000 (07:08 +0900)]
sd-device: use device_opendir()
Yu Watanabe [Mon, 29 Aug 2022 20:23:05 +0000 (05:23 +0900)]
sd-device: introduce device_opendir()
Zbigniew Jędrzejewski-Szmek [Thu, 18 Aug 2022 08:47:36 +0000 (10:47 +0200)]
hwdb: run "update-hwdb-autosuspend"
Zbigniew Jędrzejewski-Szmek [Mon, 19 Sep 2022 10:26:33 +0000 (12:26 +0200)]
hwdb: run "update-hwdb"
As usual, it seems to be mostly additions and corrections. Sadly, it seems a
bit of mojibake has crept in in various places. But it's hard to correct, in
particular because it's hard to detect all cases automatically. I think we can
ignore this for now.
When I run this a few weeks ago, ma-large.txt was gutted and 20-OUI.hwdb was
siginificantly smaller. For whatever reasons, it's back to normal now.
Yu Watanabe [Sun, 18 Sep 2022 22:34:49 +0000 (07:34 +0900)]
udev: use sd_device_get_sysattr_value()
No functional changes, just refactoring.
Yu Watanabe [Sun, 18 Sep 2022 22:32:44 +0000 (07:32 +0900)]
udev: use faccessat()
No functional changes, just refactoring.
Yu Watanabe [Sun, 18 Sep 2022 22:04:37 +0000 (07:04 +0900)]
sd-device: re-implement device_sysattrs_read_all() without recursion
Yu Watanabe [Sun, 18 Sep 2022 22:23:30 +0000 (07:23 +0900)]
sd-device: use faccessat()
No functional changes, just refactoring.
Yu Watanabe [Sun, 18 Sep 2022 22:08:13 +0000 (07:08 +0900)]
sd-device: use fstatat()
No functional changes, just refactoring.
Yu Watanabe [Sun, 18 Sep 2022 22:03:21 +0000 (07:03 +0900)]
sd-device: use path_hash_ops to store sysattrs
As the stored values are actually path. Just for safety.
This also drops unnecessary duplication of path.
Jörg Thalheim [Fri, 16 Sep 2022 12:41:58 +0000 (14:41 +0200)]
also provide credentials in ExecStartPre
Systemd's credential interface is not yet natively supported by all
programs yet. Hence it's often required to run scripts to massage
secrets in the way the programs expect it.
This commit allows the ExecStartPre commands to access credentials.
Fixes https://github.com/systemd/systemd/issues/19604
Yu Watanabe [Fri, 15 Apr 2022 02:13:29 +0000 (11:13 +0900)]
test: add testcase for link priority
Yu Watanabe [Sun, 18 Sep 2022 20:25:58 +0000 (05:25 +0900)]
Merge pull request #24646 from yuwata/udev-node-symlink_atomic
udev: introduce symlink_atomic_full() and use it
Yu Watanabe [Sun, 18 Sep 2022 20:25:09 +0000 (05:25 +0900)]
Merge pull request #24725 from yuwata/blockdev-util-introduce-block_device_get_whole_disk
blockdev-util: introduce block_device_get_whole_disk()
Yu Watanabe [Sun, 18 Sep 2022 20:24:35 +0000 (05:24 +0900)]
Merge pull request #24730 from yuwata/dissect-image-drop-reference-to-decrypted-image
dissect-image: introduce dissected_image_relinquish()
BerndAdameit [Sun, 18 Sep 2022 10:20:32 +0000 (12:20 +0200)]
man/systemd-run: Refer to man-pages project (man7.org) when citing bash(1)
Yu Watanabe [Sun, 18 Sep 2022 14:19:13 +0000 (23:19 +0900)]
path-util: add examples for path_make_relative() and path_make_relative_parent()
Addresses https://github.com/systemd/systemd/pull/24646#discussion_r973691797.
Yu Watanabe [Sun, 11 Sep 2022 15:07:17 +0000 (00:07 +0900)]
tree-wide: drop unused reference to DecryptedImage
Yu Watanabe [Sun, 11 Sep 2022 14:42:01 +0000 (23:42 +0900)]
tree-wide: use dissected_image_relinquish()
Yu Watanabe [Sun, 11 Sep 2022 14:23:22 +0000 (23:23 +0900)]
dissect-image: introduce dissected_image_relinquish()
Yu Watanabe [Sun, 18 Sep 2022 14:32:21 +0000 (23:32 +0900)]
udev: do not ignore -ENOENT from sd_device_get_devname() for block device
We already checked that the sd_device object 'dev' is for a whole block
device. So, -ENOENT should not be triggeered here, and if it is, there
exists something spurious. Hence we should not ignore the failure.
Yu Watanabe [Sun, 18 Sep 2022 04:24:12 +0000 (13:24 +0900)]
udev: use block_device_get_whole_disk()
This should not change anything effectively.
Yu Watanabe [Mon, 11 Apr 2022 03:18:13 +0000 (12:18 +0900)]
udev-node: use symlink_atomic_full_label() to create devlink
If the filename of a device symlink is too long, then the temporary
filename may become invalid, and we fail to create symlink.
The function `tempfn_random()` used in symlink_atomic_full() generates
a safe temporary filename.
Note that, thanks to the PR #23043, now only one worker can handle
the same symlink simultaneously. Hence, the device ID based temporary
filename is not necessary.
Daan De Meyer [Sun, 18 Sep 2022 14:08:13 +0000 (16:08 +0200)]
Merge pull request #24720 from yuwata/dissect-image-take-reference
dissect-image: make DissectedImage object take reference to DecryptedImage and LoopDevice
Yu Watanabe [Sun, 18 Sep 2022 13:48:53 +0000 (22:48 +0900)]
blockdev-util: change return value when a partition device is passed to partition_enumerator_new()
To make it consistent what returned by block_device_get_whole_disk().
Yu Watanabe [Sun, 18 Sep 2022 07:25:40 +0000 (16:25 +0900)]
blockdev-util: introduce block_device_get_whole_disk()
Yu Watanabe [Sun, 18 Sep 2022 07:18:53 +0000 (16:18 +0900)]
blockdev-util: split-out block_device_is_whole_disk()
No functional changes, just preparation for later commits.
Yu Watanabe [Sun, 18 Sep 2022 13:41:49 +0000 (22:41 +0900)]
Merge pull request #24719 from yuwata/dissect-image-dissected-image-new
dissect-image: introduce dissected_image_new()
Yu Watanabe [Sun, 18 Sep 2022 00:03:05 +0000 (09:03 +0900)]
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.
Daan De Meyer [Sun, 18 Sep 2022 09:38:56 +0000 (11:38 +0200)]
Merge pull request #24691 from yuwata/udev-node-check-existence
udev: check existence of device node
Daan De Meyer [Sun, 18 Sep 2022 09:21:30 +0000 (11:21 +0200)]
Merge pull request #24710 from yuwata/test-50-dissect-cleanups
TEST-50-DISSECT: cleanups
Yu Watanabe [Sat, 17 Sep 2022 00:01:46 +0000 (09:01 +0900)]
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).
Yu Watanabe [Sat, 17 Sep 2022 21:03:14 +0000 (06:03 +0900)]
udev: downgrade log level when device node is already removed
Follow-up for
790da548b0c37af60aed2f46867ba3885ea78718 .
Yu Watanabe [Fri, 9 Sep 2022 22:05:12 +0000 (07:05 +0900)]
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.
Yu Watanabe [Fri, 9 Sep 2022 20:41:09 +0000 (05:41 +0900)]
dissect-image: split out dissected_image_new()
To make dissect_image() shorter.
No functional changes, just refactoring.
Yu Watanabe [Sun, 11 Sep 2022 13:46:39 +0000 (22:46 +0900)]
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.
Yu Watanabe [Sun, 11 Sep 2022 13:41:03 +0000 (22:41 +0900)]
loop-util: introduce reference counter for LoopDevice
Yu Watanabe [Sun, 11 Sep 2022 14:08:25 +0000 (23:08 +0900)]
dissect-image: take reference of DecryptedImage into DissectedImage
No functional changes. Preparation for later commits.
Yu Watanabe [Sun, 11 Sep 2022 14:07:29 +0000 (23:07 +0900)]
dissect-image: introduce reference counter for DecryptedImage
Yu Watanabe [Wed, 14 Sep 2022 02:48:16 +0000 (11:48 +0900)]
dissect-image: lazily deactivate decrypted DM volumes
The DM block device may be still used by other processes.
Lennart Poettering [Sat, 17 Sep 2022 13:20:32 +0000 (15:20 +0200)]
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.
Yu Watanabe [Fri, 16 Sep 2022 18:24:26 +0000 (03:24 +0900)]
cryptsetup-util: introduce crypt_free_and_replace()
Lennart Poettering [Sat, 17 Sep 2022 17:03:15 +0000 (19:03 +0200)]
Merge pull request #24622 from yuwata/udev-open-with-noctty
udev: open with O_NOCTTY
Zbigniew Jędrzejewski-Szmek [Sat, 17 Sep 2022 16:16:42 +0000 (18:16 +0200)]
Merge pull request #24708 from keszybz/not-available-in-tables
various: use "-" instead of "n/a" in tables
Yu Watanabe [Sat, 17 Sep 2022 12:27:31 +0000 (21:27 +0900)]
test-50-dissect: do not fail test on cleanup
These paths are read-only mount points. Hence, we cannot remove the
contents.
Yu Watanabe [Sun, 11 Sep 2022 15:37:01 +0000 (00:37 +0900)]
test-50-dissect: check mount destination instead of mount source
And rebreak long lines.
This should take no effective change, just refactoring.
Zbigniew Jędrzejewski-Szmek [Sat, 17 Sep 2022 11:26:51 +0000 (13:26 +0200)]
Merge pull request #24670 from keszybz/early-boot-ordering
Early boot ordering
Zbigniew Jędrzejewski-Szmek [Sat, 17 Sep 2022 10:20:33 +0000 (12:20 +0200)]
coredumpctl: rename table entry
"Disk Size" could be mistaken for "Size of the Disk".
Zbigniew Jędrzejewski-Szmek [Sat, 17 Sep 2022 09:06:39 +0000 (11:06 +0200)]
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.
Daan De Meyer [Sat, 17 Sep 2022 07:57:20 +0000 (09:57 +0200)]
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
Yu Watanabe [Fri, 16 Sep 2022 16:57:04 +0000 (01:57 +0900)]
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.
Yu Watanabe [Fri, 16 Sep 2022 20:11:43 +0000 (05:11 +0900)]
dissect-image: make verity_partition() actually fail when all attempts of activation failed
Yu Watanabe [Fri, 16 Sep 2022 18:24:57 +0000 (03:24 +0900)]
dissect-image: split out verity_timeout()
To make verity_partition() shorten. No functional changes, just
refactoring.
Yu Watanabe [Fri, 16 Sep 2022 16:25:44 +0000 (01:25 +0900)]
man: explicitly document that "reboot -f" is different from "systemctl reboot -f"
Closes #24696.
Lennart Poettering [Fri, 16 Sep 2022 16:08:19 +0000 (18:08 +0200)]
nspawn: fix two error strings
Dan Streetman [Fri, 16 Sep 2022 14:50:59 +0000 (10:50 -0400)]
add CAP_LINUX_IMMUTABLE to systemd-machined, so it can handle machinectl read-only requests
Without this, the 'machinectl read-only ...' command always fails.
Yu Watanabe [Fri, 16 Sep 2022 14:20:46 +0000 (23:20 +0900)]
sd-netlink: unexport sd-netlink
This effectively reverts
84e1001541151da71bae2137e2a1c254b5a3b89f .
The sd-netlink library has several issues, and we should not export it
without solving them. See issues #24258 and #24124.
Yu Watanabe [Fri, 16 Sep 2022 16:31:32 +0000 (01:31 +0900)]
Merge pull request #24692 from yuwata/dissect-image-fix-memleak
dissect-image: fix memleak
Lennart Poettering [Fri, 16 Sep 2022 15:24:08 +0000 (16:24 +0100)]
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.
Lennart Poettering [Fri, 16 Sep 2022 12:53:35 +0000 (13:53 +0100)]
tmpfiles: let's suffix path to dirs with '/' also in log messages
Lennart Poettering [Sun, 11 Sep 2022 10:16:17 +0000 (12:16 +0200)]
tmpfiles: drop redundant forward declarations
Yu Watanabe [Fri, 16 Sep 2022 15:18:53 +0000 (00:18 +0900)]
Merge pull request #24664 from yuwata/watchdog
watchdog: open /dev/watchdog0 only if it exists
Yu Watanabe [Fri, 16 Sep 2022 15:18:05 +0000 (00:18 +0900)]
Merge pull request #24688 from yuwata/watchdog-dbus-properties-follow-ups
pid1: follow-ups for watchdog DBus properties
Daniel Braunwarth [Fri, 16 Sep 2022 09:15:06 +0000 (11:15 +0200)]
journalctl: respect --quiet flag during file concistency verification
Fixes #24563.
Yu Watanabe [Fri, 16 Sep 2022 15:16:07 +0000 (00:16 +0900)]
Merge pull request #24685 from yuwata/uid-range
uid-range: several cleanups
Yu Watanabe [Wed, 14 Sep 2022 03:25:08 +0000 (12:25 +0900)]
dissect-image: handle all non-negative return values as success
No functional changes, just coding syle update.
Yu Watanabe [Wed, 14 Sep 2022 03:21:56 +0000 (12:21 +0900)]
dissect-image: fix memleak on failure
Yu Watanabe [Tue, 13 Sep 2022 21:07:09 +0000 (06:07 +0900)]
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.
Yu Watanabe [Mon, 12 Sep 2022 19:42:38 +0000 (04:42 +0900)]
udev-node: split out stack_directory_read_one()
No functional changes, just refactoring.
Yu Watanabe [Tue, 13 Sep 2022 19:55:35 +0000 (04:55 +0900)]
watchdog: use /dev/watchdog0 only if it exists
Fixes #24661.
Lennart Poettering [Thu, 15 Sep 2022 18:22:35 +0000 (19:22 +0100)]
update TODO
Yu Watanabe [Fri, 16 Sep 2022 12:50:58 +0000 (21:50 +0900)]
pid1: drop redundant DBus properties
Follow-up for
10f3f4ed016b9fe92ca3d093fcfaed8278e69220 .
We already have RuntimeWatchdogUSec or friends. Let's not introduce
redundant properties.
Also, drop the const qualifier for WatchdogLastPingTimestamp, as they
are actually not constant.
Yu Watanabe [Fri, 16 Sep 2022 12:48:39 +0000 (21:48 +0900)]
watchdog: explicitly initialize global variable
No functional change, as they were implicitly initialized with zero.
Yu Watanabe [Fri, 16 Sep 2022 12:11:19 +0000 (21:11 +0900)]
test: add tests for uid_range_coalesce()
Yu Watanabe [Fri, 16 Sep 2022 01:52:00 +0000 (10:52 +0900)]
uid-range: tie up number and array of uid range entries
This renames UidRange -> UidRangeEntry, and reintroduces UidRange which
contains the array of UidRangeEntry and its size.
No fucntional changes, just refactoring.
Yu Watanabe [Fri, 16 Sep 2022 01:51:36 +0000 (10:51 +0900)]
uid-range: make uid_range_intersect() take two UidRange objects
No functional changes, just refactoring.
Yu Watanabe [Fri, 16 Sep 2022 01:40:14 +0000 (10:40 +0900)]
uid-range: optimize to load uid_map file
If uid_map contains many lines, then the previous logic takes O(n^2 log n),
This makes O(n log n).
Yu Watanabe [Fri, 16 Sep 2022 01:29:56 +0000 (10:29 +0900)]
uid-range: escape from loop earlier
The array of uid range entries are already sorted. Hence, if x and y are
does not have intersection, then the remaining entries neither have
intersection with x.
Yu Watanabe [Fri, 16 Sep 2022 01:20:55 +0000 (10:20 +0900)]
uid-range: sort uid range entries in uid_range_coalesce()
As the logic in uid_range_coalesce() assumes the array of entries are
already sorted.
No functional changes, just refactoring.
Yu Watanabe [Fri, 16 Sep 2022 01:23:43 +0000 (10:23 +0900)]
uid-range: use parse_uid_range()
Yu Watanabe [Fri, 16 Sep 2022 02:57:45 +0000 (11:57 +0900)]
userdbctl: fix arrow direction
Yu Watanabe [Fri, 16 Sep 2022 02:54:55 +0000 (11:54 +0900)]
userdbctl: do not show meaningless boundaries when no uid range available
Yu Watanabe [Fri, 16 Sep 2022 00:26:07 +0000 (09:26 +0900)]
sd-device-monitor: do not trigger assertion when uid_map is not empty
Follow-up for
c0aa23cf1ed4b3cbbcaf8b19d47e6e29dc28c9a0 .
drosdeck [Thu, 15 Sep 2022 19:41:01 +0000 (15:41 -0400)]
Fix Positivo DUO k116 key toggle touchpad
Yu Watanabe [Thu, 15 Sep 2022 19:18:58 +0000 (04:18 +0900)]
update TODO
David Edmundson [Wed, 14 Sep 2022 18:21:00 +0000 (19:21 +0100)]
xdg-autostart-service: expand tilde in Exec lines
In typical desktop file parsing it is expected that "~" expands to a
home directory.
Users may write an autostart file with "Exec=myCoolService
~/.someSpecialConfig" which worked before the systemd migration.