Unix: cache the password used for mounting

Reuse the prepared password to avoid rereading outer keyfiles after
mounting. This prevents post-mount read failures and ensures the cache
contains the credential that unlocked the volume.
This commit is contained in:
Mounir IDRASSI
2026-09-25 10:25:08 +02:00
parent ab9d636e52
commit 527158e482
+1 -1
View File
@@ -170,7 +170,7 @@ namespace VeraCrypt
if (!useCachedPasswords && options.CachePassword
&& ((options.Password && !options.Password->IsEmpty()) || (options.Keyfiles && !options.Keyfiles->empty())))
{
VolumePasswordCache::Store (*Keyfile::ApplyListToPassword (options.Keyfiles, options.Password, options.EMVSupportEnabled));
VolumePasswordCache::Store (*newOptions.Password);
}
VolumeEventArgs eventArgs (mountedVolume);