summaryrefslogtreecommitdiff
path: root/internal/fusefrontend_reverse/reverse_longnames.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2018-01-17 21:36:38 +0100
committerJakob Unterwurzacher2018-01-17 21:36:38 +0100
commita2677bce2a632d80850fabb1e397558d8a07742b (patch)
tree95ddc90b50368abc610d37ca78a97827200977e7 /internal/fusefrontend_reverse/reverse_longnames.go
parent959e1fc1e2f531480ad1353179fc94f56ff76dce (diff)
fusefrontend_reverse: use OpenNofollow in virtualFile.GetAttr
Makes it robust against symlink races. Final piece, closes https://github.com/rfjakob/gocryptfs/issues/165
Diffstat (limited to 'internal/fusefrontend_reverse/reverse_longnames.go')
-rw-r--r--internal/fusefrontend_reverse/reverse_longnames.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/fusefrontend_reverse/reverse_longnames.go b/internal/fusefrontend_reverse/reverse_longnames.go
index 4ddff2b..5ea7c0a 100644
--- a/internal/fusefrontend_reverse/reverse_longnames.go
+++ b/internal/fusefrontend_reverse/reverse_longnames.go
@@ -113,6 +113,6 @@ func (rfs *ReverseFS) newNameFile(relPath string) (nodefs.File, fuse.Status) {
return nil, fuse.ToStatus(err)
}
content := []byte(rfs.nameTransform.EncryptName(pName, dirIV))
- parentFile := filepath.Join(rfs.args.Cipherdir, pDir, pName)
- return rfs.newVirtualFile(content, parentFile, inoBaseNameFile)
+ parentFile := filepath.Join(pDir, pName)
+ return rfs.newVirtualFile(content, rfs.args.Cipherdir, parentFile, inoBaseNameFile)
}