VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/Core/Unix/CoreUnix.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Core/Unix/CoreUnix.cpp b/src/Core/Unix/CoreUnix.cpp
index 0625ed6..57513de 100755
--- a/src/Core/Unix/CoreUnix.cpp
+++ b/src/Core/Unix/CoreUnix.cpp
@@ -551,6 +551,23 @@ namespace VeraCrypt
remove (mountPoint.c_str());
throw;
}
+
+#ifndef TC_MACOSX
+ // set again correct ownership of the mount point to avoid any issues
+ if (!options.NoFilesystem && options.MountPoint)
+ {
+ mountPoint = *options.MountPoint;
+
+ if (mountPoint.find (GetDefaultMountPointPrefix()) == 0)
+ {
+ try
+ {
+ chown (mountPoint.c_str(), GetRealUserId(), GetRealGroupId());
+ } catch (...) { }
+ }
+ }
+#endif
+
}
catch (...)
{