aboutsummaryrefslogtreecommitdiff
path: root/mount.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2026-09-01 21:36:57 +0200
committerJakob Unterwurzacher2026-09-01 21:37:42 +0200
commit12fa2c54de65e57649e07042b6cf517896a430aa (patch)
tree744a0ec68efaddac8851ce689e354dfb2d043d8f /mount.go
parent119471f951dff9132aee18c66abeec551e47f89d (diff)
plaintextnames: don't initialize nametransform
We should never call it in -plaintextnames mode.
Diffstat (limited to 'mount.go')
-rw-r--r--mount.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/mount.go b/mount.go
index 32a7dd7..489ae31 100644
--- a/mount.go
+++ b/mount.go
@@ -330,8 +330,11 @@ 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, args.longnamemax,
- args.raw64, []string(args.badname), frontendArgs.DeterministicNames)
+ var nameTransform *nametransform.NameTransform
+ if !args.plaintextnames {
+ 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.
for i := range masterkey {