summaryrefslogtreecommitdiff
path: root/cli_args.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-11-12 20:06:13 +0100
committerJakob Unterwurzacher2017-11-12 20:06:13 +0100
commite36a0ebf189a826aaa63909c5518c16356f5f903 (patch)
tree448966f795f3aca9b64fa66af0616a7128bd39fa /cli_args.go
parent9ab6cdb9b9eb02b27b5b8574ebf36d3495a71a17 (diff)
main: add "-sharedstorage" flag
At the moment, it does two things: 1. Disable stat() caching so changes to the backing storage show up immediately. 2. Disable hard link tracking, as the inode numbers on the backing storage are not stable when files are deleted and re-created behind our back. This would otherwise produce strange "file does not exist" and other errors. Mitigates https://github.com/rfjakob/gocryptfs/issues/156
Diffstat (limited to 'cli_args.go')
-rw-r--r--cli_args.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cli_args.go b/cli_args.go
index 836d29c..71ad6bd 100644
--- a/cli_args.go
+++ b/cli_args.go
@@ -21,7 +21,8 @@ type argContainer struct {
debug, init, zerokey, fusedebug, openssl, passwd, fg, version,
plaintextnames, quiet, nosyslog, wpanic,
longnames, allow_other, ro, reverse, aessiv, nonempty, raw64,
- noprealloc, speed, hkdf, serialize_reads, forcedecode, hh, info bool
+ noprealloc, speed, hkdf, serialize_reads, forcedecode, hh, info,
+ sharedstorage bool
masterkey, mountpoint, cipherdir, cpuprofile, extpass,
memprofile, ko, passfile, ctlsock, fsname, force_owner, trace string
// Configuration file name override
@@ -130,6 +131,7 @@ func parseCliOpts() (args argContainer) {
" Requires gocryptfs to be compiled with openssl support and implies -openssl true")
flagSet.BoolVar(&args.hh, "hh", false, "Show this long help text")
flagSet.BoolVar(&args.info, "info", false, "Display information about CIPHERDIR")
+ flagSet.BoolVar(&args.sharedstorage, "sharedstorage", false, "Make concurrent access to a shared CIPHERDIR safer")
flagSet.StringVar(&args.masterkey, "masterkey", "", "Mount with explicit master key")
flagSet.StringVar(&args.cpuprofile, "cpuprofile", "", "Write cpu profile to specified file")
flagSet.StringVar(&args.memprofile, "memprofile", "", "Write memory profile to specified file")