Unix: warn after directly mounting protected favorites

Notify on direct favorite mount success using the returned protection mode.
Keep recovered mounts on their existing notification path, and use the
returned mode there as well so read-only overrides are reflected accurately.
This commit is contained in:
Mounir IDRASSI
2026-09-25 16:43:25 +02:00
parent bee7d4f1c8
commit dbfd67d4c1
+9 -3
View File
@@ -878,8 +878,14 @@ namespace VeraCrypt
}
}
if (mountPerformed && newMountedVolumes.back()->MasterKeyVulnerable)
ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
if (mountPerformed)
{
if (newMountedVolumes.back()->MasterKeyVulnerable)
ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
if (newMountedVolumes.back()->Protection == VolumeProtection::HiddenVolumeReadOnly)
ShowInfo ("HIDVOL_PROT_WARN_AFTER_MOUNT");
}
}
if (!newMountedVolumes.empty() && GetPreferences().CloseSecurityTokenSessionsAfterMount)
@@ -926,7 +932,7 @@ namespace VeraCrypt
if (VolumeHasUnrecommendedExtension (*options.Path))
ShowWarning ("EXE_FILE_EXTENSION_MOUNT_WARNING");
if (options.Protection == VolumeProtection::HiddenVolumeReadOnly)
if (volume->Protection == VolumeProtection::HiddenVolumeReadOnly)
ShowInfo ("HIDVOL_PROT_WARN_AFTER_MOUNT");
if (GetPreferences().CloseSecurityTokenSessionsAfterMount)