summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-09-02 20:58:13 +0200
committerJakob Unterwurzacher2016-09-25 16:43:17 +0200
commita34b447ad1e6d4eea4adecddb9198f659d19aeeb (patch)
treeacedf3bce70e857a34252b90826be0085b401185 /main.go
parent777eb8e62f19895e9b2d3d8364a6ae1c40ff3ebc (diff)
reverse: let the kernel enforce read-only mode
... and print a warning that reverse mode is experimental
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.go b/main.go
index 44736ba..528824c 100644
--- a/main.go
+++ b/main.go
@@ -408,6 +408,7 @@ func initFuseFrontend(key []byte, args argContainer, confFile *configfile.ConfFi
var finalFs pathfs.FileSystem
if args.reverse {
finalFs = fusefrontend_reverse.NewFS(frontendArgs)
+ tlog.Info.Printf(tlog.ColorYellow + "REVERSE MODE IS EXPERIMENTAL" + tlog.ColorReset)
} else {
finalFs = fusefrontend.NewFS(frontendArgs)
}
@@ -437,7 +438,8 @@ func initFuseFrontend(key []byte, args argContainer, confFile *configfile.ConfFi
mOpts.Name = "gocryptfs"
// The kernel enforces read-only operation, we just have to pass "ro".
- if args.ro {
+ // Reverse mounts are always read-only
+ if args.ro || args.reverse {
mOpts.Options = append(mOpts.Options, "ro")
}
// Add additional mount options (if any) after the stock ones, so the user has