From dbfd67d4c103583d4b327897206e3fb795283862 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Fri, 25 Sep 2026 14:29:50 +0200 Subject: [PATCH] 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. --- src/Main/UserInterface.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Main/UserInterface.cpp b/src/Main/UserInterface.cpp index 7b7c82fb..c1a4675e 100644 --- a/src/Main/UserInterface.cpp +++ b/src/Main/UserInterface.cpp @@ -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)