VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-03-23 09:05:05 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-03-23 09:07:58 +0100
commit474505d704e003a0acac0b41f59c7c2e820edaa7 (patch)
tree2b6e58413a66131abf5455457233de2a066e59fe
parentd3db2548b52b07481185dd966f4819c23d02c0e0 (diff)
downloadVeraCrypt-474505d704e003a0acac0b41f59c7c2e820edaa7.tar.gz
VeraCrypt-474505d704e003a0acac0b41f59c7c2e820edaa7.zip
Linux: solve mount point permission issues for some users where the non-FAT volumes were only mounted in read-only 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 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 (...)
{