diff --git a/encfs/FileUtils.cpp b/encfs/FileUtils.cpp index edd2b71a..db106be3 100644 --- a/encfs/FileUtils.cpp +++ b/encfs/FileUtils.cpp @@ -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()) { diff --git a/tests/reverse.t.pl b/tests/reverse.t.pl index 9e359bcd..354f2717 100755 --- a/tests/reverse.t.pl +++ b/tests/reverse.t.pl @@ -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();