1
0
mirror of https://github.com/systemd/systemd synced 2024-07-03 08:29:25 +00:00

repart: Use CRYPT_ACTIVATE_PRIVATE

Let's skip udev device scanning when activating a LUKS volume in
systemd-repart as we don't depend on any udev symlinks and don't
expect anything except repart to access the volume.

Suggested by https://github.com/systemd/systemd/issues/33129#issuecomment-2143390941.
This commit is contained in:
Daan De Meyer 2024-06-03 12:35:29 +02:00 committed by Luca Boccassi
parent 2ac0e52f29
commit 726fc7ae69

View File

@ -4236,7 +4236,7 @@ static int partition_encrypt(Context *context, Partition *p, PartitionTarget *ta
dm_name,
NULL,
VOLUME_KEY_SIZE,
arg_discard ? CRYPT_ACTIVATE_ALLOW_DISCARDS : 0);
(arg_discard ? CRYPT_ACTIVATE_ALLOW_DISCARDS : 0) | CRYPT_ACTIVATE_PRIVATE);
if (r < 0)
return log_error_errno(r, "Failed to activate LUKS superblock: %m");