Merge pull request #178 from jhepp/reverse-readonly

Allow writing when loading a reverse mount config
This commit is contained in:
Valient Gough 2016-08-17 02:20:22 -04:00 committed by GitHub
commit cd89e60ff2

View File

@ -1542,6 +1542,11 @@ RootPtr initFS(EncFS_Context *ctx, const std::shared_ptr<EncFS_Opts> &opts) {
"The configuration loaded is not compatible with --reverse\n");
return rootInfo;
}
/* Reverse mounts are read-only by default (set in main.cpp).
* If uniqueIV is off, writing can be allowed, because there
* is no header that could be overwritten */
if (config->uniqueIV == false)
opts->readOnly = false;
}
// first, instanciate the cipher.