From 33c33a8b49ea43a0eb6ca2c4becad37110bfa0b6 Mon Sep 17 00:00:00 2001 From: Marcel Lauhoff Date: Tue, 9 Aug 2022 22:57:21 +0200 Subject: [PATCH] fscrypt: Use constant protector name Use constant protector name 'ceph-csi' instead of constant prefix concatenated with the volume ID. When cloning volumes the ID changes and fscrypt protected directories become inunlockable due to the protector name change Signed-off-by: Marcel Lauhoff --- internal/util/fscrypt/fscrypt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/util/fscrypt/fscrypt.go b/internal/util/fscrypt/fscrypt.go index 07bce6a41..9ca822d67 100644 --- a/internal/util/fscrypt/fscrypt.go +++ b/internal/util/fscrypt/fscrypt.go @@ -383,7 +383,7 @@ func Unlock( metadataDirExists, kernelPolicyExists) } - protectorName := fmt.Sprintf("%s-%s", FscryptProtectorPrefix, volEncryption.GetID()) + protectorName := FscryptProtectorPrefix switch volEncryption.KMS.RequiresDEKStore() { case kms.DEKStoreMetadata: