Skip to content

Commit 1ccc38e

Browse files
DaanDeMeyerbluca
authored andcommitted
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 systemd/systemd#33129 (comment). (cherry picked from commit 726fc7a) (cherry picked from commit d316aed)
1 parent 02d87c6 commit 1ccc38e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/partition/repart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4002,7 +4002,7 @@ static int partition_encrypt(Context *context, Partition *p, PartitionTarget *ta
40024002
dm_name,
40034003
NULL,
40044004
VOLUME_KEY_SIZE,
4005-
arg_discard ? CRYPT_ACTIVATE_ALLOW_DISCARDS : 0);
4005+
(arg_discard ? CRYPT_ACTIVATE_ALLOW_DISCARDS : 0) | CRYPT_ACTIVATE_PRIVATE);
40064006
if (r < 0)
40074007
return log_error_errno(r, "Failed to activate LUKS superblock: %m");
40084008

0 commit comments

Comments
 (0)