mirror of
https://github.com/vgough/encfs.git
synced 2025-02-16 09:49:46 +01:00
Clarify read-only handling of reverse mounts without uniqueIV
Also, delete unused define Both issues spottet by Valient Gough's review
This commit is contained in:
parent
8b8130782d
commit
8c7cf98af6
@ -1036,8 +1036,11 @@ RootPtr createV6Config(EncFS_Context *ctx, const shared_ptr<EncFS_Opts> &opts) {
|
||||
if (reverseEncryption) {
|
||||
cout << _("reverse encryption - chained IV and MAC disabled") << "\n";
|
||||
uniqueIV = selectUniqueIV();
|
||||
if (uniqueIV == 0)
|
||||
opts->readOnly = 0; // Reverse supports rw mode only if uniqueIV is disabled
|
||||
/* 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;
|
||||
} else {
|
||||
chainedIV = selectChainedIV();
|
||||
uniqueIV = selectUniqueIV();
|
||||
|
@ -83,7 +83,6 @@ int encfs_write(const char *path, const char *buf, size_t size, off_t offset,
|
||||
int encfs_statfs(const char *, struct statvfs *fst);
|
||||
int encfs_flush(const char *, struct fuse_file_info *info);
|
||||
int encfs_fsync(const char *path, int flags, struct fuse_file_info *info);
|
||||
int encfs_readonly_error(...);
|
||||
|
||||
#ifdef HAVE_XATTR
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user