summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * systemctl: rework how we detect if init is systemdLennart Poettering2022-12-231-6/+30
| |
| * core: use chase_symlinks_and_access() where appropriateLennart Poettering2022-12-231-12/+4
| |
| * core: tighten validation checks in SwitchRoot() dbus callLennart Poettering2022-12-231-2/+6
| |
* | Merge pull request #25828 from poettering/no-more-basenameYu Watanabe2022-12-2425-134/+247
|\ \ | | | | | | convert a number of basename() invocations to path_extract_filename()
| * | lock-file: various updatesLennart Poettering2022-12-231-25/+19
| | |
| * | analyze: basename() → path_extract_filename()Lennart Poettering2022-12-231-6/+6
| | |
| * | format-table: add field type TABLE_PATH_BASENAMELennart Poettering2022-12-235-9/+47
| | | | | | | | | | | | | | | | | | | | | This is just like TABLE_PATH, but only shows the basename in regular tabular output. This is useful in systemd-repart for example
| * | tmpfiles: port basename() → path_extract_filename()Lennart Poettering2022-12-231-2/+7
| | |
| * | sysv-generator: port basename() → path_extract_filename()Lennart Poettering2022-12-231-10/+8
| | |
| * | shared: port various shared helpers basename() → path_extract_filename()Lennart Poettering2022-12-235-24/+56
| | |
| * | repart/makefs: port over to path_extract_filename()Lennart Poettering2022-12-232-6/+9
| | |
| * | portable: port basename() → path_extract_filename()Lennart Poettering2022-12-231-5/+12
| | |
| * | nspawn: port over basename() → path_extract_filename()Lennart Poettering2022-12-232-6/+13
| | |
| * | mount-tool: port over basename() → path_extract_filename()Lennart Poettering2022-12-231-4/+13
| | |
| * | journalctl: port COMM= matching to path_extract_filename()Lennart Poettering2022-12-231-4/+5
| | |
| * | dissect: remove one more use of basename()Lennart Poettering2022-12-231-1/+9
| | | | | | | | | | | | | | | And while we are at it, make use of path_extract_filename() return value that indicates whether the path was suffixed with a slash.
| * | core: move some basename() use → path_extract_filename()Lennart Poettering2022-12-233-18/+35
| | |
| * | tests: we don't actually use basename() anymoreLennart Poettering2022-12-231-6/+0
| | |
| * | homed: move away from basename()Lennart Poettering2022-12-231-8/+8
| |/
* | prioq: make prioq_reshuffle() voidLennart Poettering2022-12-234-9/+5
| | | | | | | | | | | | | | | | | | | | | | We never use the return value, and it's confusing and kinda pointless what we return there. Hence drop it. Originally noticed by: tristone13th <tristone13th@outlook.com> Alternative to: #25810
* | Merge pull request #25849 from poettering/repart-loopLennart Poettering2022-12-232-2/+3
|\ \ | | | | | | pull in loop.ko from repart unit
| * | units: pull in loop.ko and dm-mod.ko before repartLennart Poettering2022-12-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to make use of that when formatting file systems, hence let's pull in these modules explicitly. (This is necessary because we are an early boot service that might run before systemd-tmpfiles-dev.service, which creates /dev/loop-control and /dev/mapper/control.) Alternatively we could just order ourselves after systemd-tmpfiles-dev.service, but I think there's value in adding an explicit minimal ordering here, since we know what we'll need. Fixes: #25775
| * | units: change modprobe@dm-mod.service → modprobe@dm_mod.serviceLennart Poettering2022-12-231-1/+1
| |/ | | | | | | Follow-up for 8f1359bf854e9683e4e0b89fd3a537e0d82d4b95
* | docs: remove /dev/tty* confusionLennart Poettering2022-12-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | The text said /dev/tty* as a whole was the VT subsystem and that VT is not supported in containers. But that's not accurate as /dev/tty* will match /dev/tty too and that one device node is special and is not related to VT: it always points to the current process own controlling tty, regardless what that is. hence, rewrite /dev/tty* as /dev/tty[0-9]*.
* | sysroot: Order systemd-fsck-root after systemd-makefsWill Fancher2022-12-231-1/+10
|/
* measure: fix the failures of compare_reported_pcr_nr()Jia Zhang2022-12-231-3/+3
| | | | | | | | | | | | | | | | | EFI_LOADER_VARIABLE() already applies to the stringify to construct the path of EFI variable in efivars, so it is wrong to enclose the name of EFI variable with the quotes. Otherwise, the following errors are reported. Reading EFI variable /sys/firmware/efi/efivars/StubFeatures-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f. Reading EFI variable /sys/firmware/efi/efivars/"StubPcrKernelImage"-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f. open("/sys/firmware/efi/efivars/"StubPcrKernelImage"-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f") failed: No such file or directory Reading EFI variable /sys/firmware/efi/efivars/"StubPcrKernelParameters"-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f. open("/sys/firmware/efi/efivars/"StubPcrKernelParameters"-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f") failed: No such file or directory Reading EFI variable /sys/firmware/efi/efivars/"StubPcrInitRDSysExts"-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f. open("/sys/firmware/efi/efivars/"StubPcrInitRDSysExts"-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f") failed: No such file or directory Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
* Merge pull request #25823 from poettering/dissect-diskseqYu Watanabe2022-12-235-31/+72
|\ | | | | gpt-auto: reference dissected partitions to mount via diskseq block device symlinks
| * update TODOLennart Poettering2022-12-231-3/+0
| |
| * gpt-auto-generator: enable referencing partitions via diskseq symlinksLennart Poettering2022-12-231-1/+2
| |
| * dissect-image: optionally, reference dissected partition device nodes by diskseqLennart Poettering2022-12-232-21/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful to make the dissection logic at boot a bit safer, as we can reference device nodes by diskseq. This locks down dissection a bit, since it makes it harder to swap out the backing device between the time we dissected and validated it, until we actually mounted it. This is not complete though, as /bin/mount would have to verify the diskseq after opening the diskseq symlink again. See: https://github.com/util-linux/util-linux/issues/1786
| * dissect-image: simplify things by avoiding one string copyLennart Poettering2022-12-231-6/+2
| | | | | | | | | | We don't need the node in its original variable anymore, hence let's just move it over instead of allocating a copy.
| * udev: also create partition /dev/disk/by-diskseq/ symlinksLennart Poettering2022-12-231-0/+1
| |
* | tree-wide: have_effective_cap() may return negative errnoYu Watanabe2022-12-237-17/+30
| |
* | Merge pull request #25830 from yuwata/wait-online-unmanagedYu Watanabe2022-12-232-76/+81
|\ \ | | | | | | wait-online: exit with success when all interfaces are ready or unmanaged
| * | test-network: add testcase for no managed interfaceYu Watanabe2022-12-221-1/+5
| | |
| * | test-network: split out wait-online related test caseYu Watanabe2022-12-221-9/+17
| | |
| * | test-network: move one test caseYu Watanabe2022-12-221-9/+9
| | |
| * | wait-online: exit with success when all interfaces are ready or unmanagedYu Watanabe2022-12-221-57/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when neither '--any' nor '--interface' options specified, at least one of the interfaces must be in configured state. This patch makes wait-online exit with success even if all interfaces are in unmanaged state. This may break backward compatibility in a rare situation. But in most cases, this typically not change anything, as at least one interface is managed by networkd.service when it is enabled. This is mostly for making wait-online gracefully handle the case that networkd.service and wait-online.service are enabled by mistake. In such situation, all interfaces are typically not managed. Fixes #25813.
* | | Merge pull request #25777 from PeterCxy/enroll-fido2Lennart Poettering2022-12-2311-110/+257
|\ \ \ | |_|/ |/| | cryptenroll: Implement support for unlocking via FIDO2 tokens
| * | cryptenroll: Implement support for unlocking via FIDO2 tokensPeter Cai2022-12-226-94/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows FIDO2 users to wipe out password slots and still be able to enroll new key slots via systemd-cryptenroll. Note that when the user wants to both unlock with a FIDO2 token and enroll a new FIDO2 token, they cannot be set to automatic discovery. This is to safeguard against confusion, because there will be multiple tokens connected to the system when doing so -- and we require users to explicitly confirm which one to use for unlocking and which one to use for enrollment. Addresses #20230 for the FIDO2 case.
| * | cryptsetup-fido2: Remove plain mode parameters from `acquire_fido2_key_auto()`Peter Cai2022-12-223-11/+3
| | | | | | | | | | | | | | | | | | | | | `acquire_fido2_key_auto()` will not be used in PLAIN mode, and parameters such as the salt will be acquired from the LUKS header. Parameters intended for PLAIN mode are useless in `acquire_fido2_key_auto()`.
| * | cryptsetup-fido2: Relocate to libsystemd-sharedPeter Cai2022-12-224-5/+5
| | |
* | | import-creds: don't try to import VM creds in a containerLennart Poettering2022-12-231-0/+7
| | | | | | | | | | | | | | | If we run in a container we shouldn#t try to import creds passed in from a VMM, as they are not for us, but for the VM itself.
* | | Merge pull request #25814 from DaanDeMeyer/ukifyLuca Boccassi2022-12-222-18/+35
|\ \ \ | |/ / |/| | ukify: Prefer using llvm-objcopy instead of objcopy
| * | ukify: Validate that there are no overlapping sectionsDaan De Meyer2022-12-221-0/+14
| | | | | | | | | | | | | | | Let's make sure that after calling objcopy we have no overlapping sections in the UKI
| * | ukify: Prefer using llvm-objcopy instead of objcopyDaan De Meyer2022-12-221-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | llvm-objcopy works on stubs built for foreign architectures whereas objcopy doesn't so let's prefer using llvm-objcopy instead of objcopy. llvm-objcopy automatically sets the virtual address and doesn't provide an option to set it manually so we only add --change-section-vma when using objcopy The default section flags differ between llvm-objcopy and objcopy so we add a default for the section flags so we make sure all sections are read-only data unless specified otherwise.
| * | ukify: Allow passing multiple directories to --toolsDaan De Meyer2022-12-222-8/+10
| | |
* | | Merge pull request #25791 from keszybz/ukify-check-inputsLuca Boccassi2022-12-221-7/+29
|\ \ \ | |/ / |/| | ukify: check inputs
| * | ukify: check early if inputs exist and are readableZbigniew Jędrzejewski-Szmek2022-12-201-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's much nicer for the user if we fail early instead of doing partial processing if we cannot read some input. We can't do those checks immediately from argparse.Parser.parse_args(), because we want to fully process the commandline first. In particular, even with invalid args, if --help is specified somewhere, we want to handle that. Thus, we need to delay the checks after argparse.Parser.parse_args() returns. Ukify didn't have type annotations on functions, but it probably should. Jörg's suggested correction included them and we might just as well start here.
| * | ukify: catch error when loading foreign pe fileZbigniew Jędrzejewski-Szmek2022-12-201-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The autodetection code is supposed to throw ValueError when it cannot figure out the version so that we fall back to the next method. With the patch: Kernel version not specified, starting autodetection 😖. Real-Mode Kernel Header magic not found + readelf --notes vmlinuz/arm64/vmlinuz-6.0.9-300.fc37.aarch64 readelf: vmlinuz/arm64/vmlinuz-6.0.9-300.fc37.aarch64: Error: Not an ELF file - it has the wrong magic bytes at the start Found uname version: 6.0.9-300.fc37.aarch64