summaryrefslogtreecommitdiff
path: root/internal/fusefrontend
diff options
context:
space:
mode:
authorSebastian Lackner2017-11-28 00:20:42 +0100
committerrfjakob2017-11-28 09:28:06 +0100
commit3f68b0c09af2b3070346e27b384e80116e515f73 (patch)
tree2ea9b1491a7caa047572bfd184afe7528cf56433 /internal/fusefrontend
parent8c5069c6374778bab17cd640b2579c936c635fa7 (diff)
fusefrontend: Handle PlaintextNames mode in Mknod
In PlaintextNames mode the "gocryptfs.longname." prefix does not have any special meaning. We should not attempt to read the directory IV or to create special .name files. Partially fixes https://github.com/rfjakob/gocryptfs/issues/174
Diffstat (limited to 'internal/fusefrontend')
-rw-r--r--internal/fusefrontend/fs.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/fusefrontend/fs.go b/internal/fusefrontend/fs.go
index 8f77538..05167df 100644
--- a/internal/fusefrontend/fs.go
+++ b/internal/fusefrontend/fs.go
@@ -287,9 +287,9 @@ func (fs *FS) Mknod(path string, mode uint32, dev uint32, context *fuse.Context)
return fuse.ToStatus(err)
}
defer dirfd.Close()
- // Create ".name" file to store long file name
+ // Create ".name" file to store long file name (except in PlaintextNames mode)
cName := filepath.Base(cPath)
- if nametransform.IsLongContent(cName) {
+ if !fs.args.PlaintextNames && nametransform.IsLongContent(cName) {
err = fs.nameTransform.WriteLongName(dirfd, cName, path)
if err != nil {
return fuse.ToStatus(err)