summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* docs: add a note about selectively overriding default dependenciesLuca BRUNO2022-09-202-4/+12
| | | | | | | | | | | | | This documents that explicit `Before=`/`After=` dependencies can be used to selectively override implicit ordering coming from default dependencies. That allows for more granular control compared to the already documented `DefaultDependencies=no` option. The alternative approach came up in a discussion around the ordering of `boot-complete.target`, so this also adds an explicit suggestion in that direction to the "Automatic Boot Assessment" documentation. Ref: https://lists.freedesktop.org/archives/systemd-devel/2022-September/048330.html
* boot: Change the way we provide builtinsJan Janssen2022-09-203-21/+23
| | | | | | | Relying on symbol aliasing seems to be rather unreliable. Instead just use some light #ifdefery. Fixes: #24630
* udev: use block_device_is_whole_disk()Yu Watanabe2022-09-203-36/+29
| | | | | | | | 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.
* sd-device: use fd_reopen() at one more placeYu Watanabe2022-09-201-2/+2
| | | | It provides recognizable error if /proc is not mounted.
* cryptsetup: use TPM flags over boolWilliam Roberts2022-09-201-1/+1
| | | | | | | | | 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>
* meson: make several tests run sequentiallyYu Watanabe2022-09-191-1/+2
| | | | Follow-up for f93ba375301e43900f1fe5a93a2b33b1efcc73e0.
* Merge pull request #24744 from yuwata/mkdir-chase-symlinksYu Watanabe2022-09-192-7/+102
|\ | | | | mkdir: chase_symlinks_and_stat() does not return 0
| * test: add more test cases for mkdir_p_safe() and mkdir_p_root()Yu Watanabe2022-09-191-5/+96
| |
| * mkdir: chase_symlinks_and_stat() does not return 0Yu Watanabe2022-09-191-2/+6
| | | | | | | | | | This reverts commits e22916e61d1fdb7b46918b605ebf783d9017f9d8 and 1e146d738232acbe7f72903e9c5e4d1166ea67f5.
* | Merge pull request #24731 from yuwata/sd-device-opendirDaan De Meyer2022-09-193-80/+114
|\ \ | |/ |/| sd-device: introduce device_opendir()
| * udev: use device_opendir()Yu Watanabe2022-09-191-19/+8
| |
| * sd-device: use device_opendir()Yu Watanabe2022-09-191-17/+3
| |
| * sd-device: introduce device_opendir()Yu Watanabe2022-09-192-0/+33
| |
| * udev: use sd_device_get_sysattr_value()Yu Watanabe2022-09-191-22/+29
| | | | | | | | No functional changes, just refactoring.
| * udev: use faccessat()Yu Watanabe2022-09-191-7/+7
| | | | | | | | No functional changes, just refactoring.
| * sd-device: re-implement device_sysattrs_read_all() without recursionYu Watanabe2022-09-191-4/+23
| |
| * sd-device: use faccessat()Yu Watanabe2022-09-191-15/+16
| | | | | | | | No functional changes, just refactoring.
| * sd-device: use fstatat()Yu Watanabe2022-09-191-6/+2
| | | | | | | | No functional changes, just refactoring.
| * sd-device: use path_hash_ops to store sysattrsYu Watanabe2022-09-191-1/+4
| | | | | | | | | | | | As the stored values are actually path. Just for safety. This also drops unnecessary duplication of path.
* | Merge pull request #24742 from keszybz/hwdb-252Yu Watanabe2022-09-1911-2745/+12581
|\ \ | | | | | | hwdb update for v252-rc1
| * | hwdb: run "update-hwdb-autosuspend"Zbigniew Jędrzejewski-Szmek2022-09-191-0/+17
| | |
| * | hwdb: run "update-hwdb"Zbigniew Jędrzejewski-Szmek2022-09-1910-2745/+12564
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | tpm2-util: make tpm2_pcr_bank_from_string() case-insensitiveLennart Poettering2022-09-192-25/+9
| |/ |/| | | | | | | | | | | | | 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.
* | also provide credentials in ExecStartPreJörg Thalheim2022-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | 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
* | test: add testcase for link priorityYu Watanabe2022-09-182-26/+72
| |
* | Merge pull request #24646 from yuwata/udev-node-symlink_atomicYu Watanabe2022-09-185-39/+28
|\ \ | | | | | | udev: introduce symlink_atomic_full() and use it
| * | udev-node: use symlink_atomic_full_label() to create devlinkYu Watanabe2022-09-181-26/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | fs-util,label: introduce symlink_atomic_full() and symlink_atomic_full_label()Yu Watanabe2022-09-134-6/+20
| | | | | | | | | | | | These new functions optionally create symlink of relative path.
| * | fs-util: use path_make_relative_parent() at one more placeYu Watanabe2022-09-131-7/+1
| | |
* | | Merge pull request #24725 from ↵Yu Watanabe2022-09-183-30/+62
|\ \ \ | | | | | | | | | | | | | | | | yuwata/blockdev-util-introduce-block_device_get_whole_disk blockdev-util: introduce block_device_get_whole_disk()
| * | | udev: do not ignore -ENOENT from sd_device_get_devname() for block deviceYu Watanabe2022-09-181-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | udev: use block_device_get_whole_disk()Yu Watanabe2022-09-181-17/+7
| | | | | | | | | | | | | | | | This should not change anything effectively.
| * | | blockdev-util: change return value when a partition device is passed to ↵Yu Watanabe2022-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | partition_enumerator_new() To make it consistent what returned by block_device_get_whole_disk().
| * | | blockdev-util: introduce block_device_get_whole_disk()Yu Watanabe2022-09-182-0/+31
| | | |
| * | | blockdev-util: split-out block_device_is_whole_disk()Yu Watanabe2022-09-181-10/+23
| | | | | | | | | | | | | | | | No functional changes, just preparation for later commits.
* | | | Merge pull request #24730 from ↵Yu Watanabe2022-09-1815-123/+69
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | yuwata/dissect-image-drop-reference-to-decrypted-image dissect-image: introduce dissected_image_relinquish()
| * | | | tree-wide: drop unused reference to DecryptedImageYu Watanabe2022-09-1815-76/+31
| | | | |
| * | | | tree-wide: use dissected_image_relinquish()Yu Watanabe2022-09-184-52/+24
| | | | |
| * | | | dissect-image: introduce dissected_image_relinquish()Yu Watanabe2022-09-182-0/+19
| | | | |
* | | | | man/systemd-run: Refer to man-pages project (man7.org) when citing bash(1)BerndAdameit2022-09-181-1/+1
| | | | |
* | | | | path-util: add examples for path_make_relative() and path_make_relative_parent()Yu Watanabe2022-09-181-1/+11
|/ / / / | | | | | | | | | | | | Addresses https://github.com/systemd/systemd/pull/24646#discussion_r973691797.
* | | | Merge pull request #24720 from yuwata/dissect-image-take-referenceDaan De Meyer2022-09-184-16/+78
|\ \ \ \ | | | | | | | | | | dissect-image: make DissectedImage object take reference to DecryptedImage and LoopDevice
| * | | | dissect-image: take a reference of LoopDevice into DissectedImageYu Watanabe2022-09-182-6/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To make LoopDevice object freed after DissectedImage is freed. At least currently, this should not change anything. Preparation for later commits.
| * | | | loop-util: introduce reference counter for LoopDeviceYu Watanabe2022-09-182-1/+7
| | | | |
| * | | | dissect-image: take reference of DecryptedImage into DissectedImageYu Watanabe2022-09-182-2/+11
| | | | | | | | | | | | | | | | | | | | No functional changes. Preparation for later commits.
| * | | | dissect-image: introduce reference counter for DecryptedImageYu Watanabe2022-09-182-7/+29
| |/ / /
* | | | Merge pull request #24719 from yuwata/dissect-image-dissected-image-newYu Watanabe2022-09-182-28/+52
|\ \ \ \ | | | | | | | | | | dissect-image: introduce dissected_image_new()
| * | | | dissect-image: introduce DISSECTED_PARTITION_NULLYu Watanabe2022-09-182-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, it is not necessary to set partno or architecture in dissect_image_new(), but just for safety. Preparation for later commits.
| * | | | dissect-image: split out dissected_image_new()Yu Watanabe2022-09-181-24/+42
| |/ / / | | | | | | | | | | | | | | | | To make dissect_image() shorter. No functional changes, just refactoring.
* | | | sd-device: refuse block device without subsystemYu Watanabe2022-09-181-2/+2
| | | | | | | | | | | | | | | | | | | | Previously, even if sd_device_get_subsystem() returns -ENOENT for block device, we accepted that. This makes the check slightly stricter.