30 lines
1.3 KiB
Diff
30 lines
1.3 KiB
Diff
|
From d316aed5d8e15fb5b13b5618f1b2d1d020b1e7bf Mon Sep 17 00:00:00 2001
|
||
|
From: Daan De Meyer <daan.j.demeyer@gmail.com>
|
||
|
Date: Mon, 3 Jun 2024 12:35:29 +0200
|
||
|
Subject: [PATCH] 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.
|
||
|
|
||
|
(cherry picked from commit 726fc7ae696510b04c24810f691d34f5d20529d6)
|
||
|
---
|
||
|
src/partition/repart.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/src/partition/repart.c b/src/partition/repart.c
|
||
|
index 2ecae4ca03..78cf60f724 100644
|
||
|
--- a/src/partition/repart.c
|
||
|
+++ b/src/partition/repart.c
|
||
|
@@ -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");
|
||
|
|