diff options
author | Jakob Unterwurzacher | 2021-10-21 15:58:19 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2021-10-21 15:58:19 +0200 |
commit | d14c9340d6fb473e9837e91db8b6e869c37ad8e5 (patch) | |
tree | 253ba3c3db8a97ba7fdcd5d59b699db92da1cea2 /mount.go | |
parent | d583bdb79e6f05bce2451a7e220e553209da4c1d (diff) |
cli: add -longnamemax
Fixes https://github.com/rfjakob/gocryptfs/issues/499
Diffstat (limited to 'mount.go')
-rw-r--r-- | mount.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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. |