VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 0625ed6b..57513ded 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 (...)
{