summaryrefslogtreecommitdiff
path: root/mount.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-10-21 15:58:19 +0200
committerJakob Unterwurzacher2021-10-21 15:58:19 +0200
commitd14c9340d6fb473e9837e91db8b6e869c37ad8e5 (patch)
tree253ba3c3db8a97ba7fdcd5d59b699db92da1cea2 /mount.go
parentd583bdb79e6f05bce2451a7e220e553209da4c1d (diff)
cli: add -longnamemax
Fixes https://github.com/rfjakob/gocryptfs/issues/499
Diffstat (limited to 'mount.go')
-rw-r--r--mount.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/mount.go b/mount.go
index 004c646..434edad 100644
--- a/mount.go
+++ b/mount.go
@@ -292,6 +292,8 @@ func initFuseFrontend(args *argContainer) (rootNode fs.InodeEmbedder, wipeKeys f
// Settings from the config file override command line args
frontendArgs.PlaintextNames = confFile.IsFeatureFlagSet(configfile.FlagPlaintextNames)
frontendArgs.DeterministicNames = !confFile.IsFeatureFlagSet(configfile.FlagDirIV)
+ // Things that don't have to be in frontendArgs are only in args
+ args.longnamemax = confFile.LongNameMax
args.raw64 = confFile.IsFeatureFlagSet(configfile.FlagRaw64)
args.hkdf = confFile.IsFeatureFlagSet(configfile.FlagHKDF)
// Note: this will always return the non-openssl variant
@@ -324,7 +326,7 @@ func initFuseFrontend(args *argContainer) (rootNode fs.InodeEmbedder, wipeKeys f
// Init crypto backend
cCore := cryptocore.New(masterkey, cryptoBackend, IVBits, args.hkdf)
cEnc := contentenc.New(cCore, contentenc.DefaultBS)
- nameTransform := nametransform.New(cCore.EMECipher, frontendArgs.LongNames, 0,
+ nameTransform := nametransform.New(cCore.EMECipher, frontendArgs.LongNames, args.longnamemax,
args.raw64, []string(args.badname), frontendArgs.DeterministicNames)
// After the crypto backend is initialized,
// we can purge the master key from memory.