From d14c9340d6fb473e9837e91db8b6e869c37ad8e5 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Thu, 21 Oct 2021 15:58:19 +0200 Subject: cli: add -longnamemax Fixes https://github.com/rfjakob/gocryptfs/issues/499 --- mount.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mount.go') 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. -- cgit v1.2.3