Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow read/write in standard reverse mode #299

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions encfs/FileUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,12 @@ RootPtr createV6Config(EncFS_Context *ctx,
if (opts->requireMac) {
blockMACBytes = 8;
}
if (reverseEncryption) {
/* 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 (uniqueIV == false) opts->readOnly = false;
}
}

if (answer[0] == 'x' || alg.name.empty()) {
Expand Down
2 changes: 1 addition & 1 deletion tests/reverse.t.pl
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ sub writesDenied {
symlink_test("/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/15/17/18"); # long
symlink_test("!§\$%&/()\\<>#+="); # special characters
symlink_test("$plain/foo");
writesDenied();
# writesDenied(); # disabled as writes are allowed when (uniqueIV == false), we would need a specific reverse conf with (uniqueIV == true).

# Umount and delete files
cleanup();