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