Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ceph/ceph-csi
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: aa4121b3edbe23eb52a59c88b45f28cdccce2a77
Choose a base ref
..
head repository: ceph/ceph-csi
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 186306a93341120cada08aca5b94ab24aec67b87
Choose a head ref
Showing with 3 additions and 1 deletion.
  1. +3 −1 internal/util/fscrypt/fscrypt.go
4 changes: 3 additions & 1 deletion internal/util/fscrypt/fscrypt.go
Original file line number Diff line number Diff line change
@@ -147,6 +147,8 @@ func unlockExisting(
volID string,
keyFn func(fscryptactions.ProtectorInfo, bool) (*fscryptcrypto.Key, error),
) error {
var err error

policy, err := fscryptactions.GetPolicyFromPath(fscryptContext, encryptedPath)
if err != nil {
log.ErrorLog(ctx, "fscrypt: policy get failed %v", err)
@@ -169,7 +171,7 @@ func unlockExisting(
errMsg := fmt.Sprintf("fscrypt: unlock with protector error: %v", err)
log.ErrorLog(ctx, "%s, retry using a null padded passphrase", errMsg)

keyFn, err := createKeyFuncFromVolumeEncryption(ctx, *volEncryption, volID, encryptionPassphraseSize/2)
keyFn, err = createKeyFuncFromVolumeEncryption(ctx, *volEncryption, volID, encryptionPassphraseSize/2)
if err != nil {
log.ErrorLog(ctx, "fscrypt: could not create key function: %v", err)