mirror of
https://github.com/vgough/encfs.git
synced 2024-11-22 07:53:31 +01:00
Allow read/write in standard reverse mode (#301)
This commit is contained in:
parent
62505fa240
commit
efbdd29716
@ -1051,6 +1051,12 @@ RootPtr createV6Config(EncFS_Context *ctx,
|
|||||||
if (opts->requireMac) {
|
if (opts->requireMac) {
|
||||||
blockMACBytes = 8;
|
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()) {
|
if (answer[0] == 'x' || alg.name.empty()) {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# Test EncFS --reverse mode
|
# Test EncFS --reverse mode
|
||||||
|
|
||||||
use warnings;
|
use warnings;
|
||||||
use Test::More tests => 31;
|
use Test::More tests => 25;
|
||||||
use File::Path;
|
use File::Path;
|
||||||
use File::Temp;
|
use File::Temp;
|
||||||
use IO::Handle;
|
use IO::Handle;
|
||||||
@ -182,7 +182,7 @@ symlink_test("foo"); # relative
|
|||||||
symlink_test("/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/15/17/18"); # long
|
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("!§\$%&/()\\<>#+="); # special characters
|
||||||
symlink_test("$plain/foo");
|
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
|
# Umount and delete files
|
||||||
cleanup();
|
cleanup();
|
||||||
|
Loading…
Reference in New Issue
Block a user