diff options
author | Jakob Unterwurzacher | 2017-07-29 16:13:38 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2017-07-29 16:15:49 +0200 |
commit | d12aa577156101a1c6a05765de751f0a54b58aa8 (patch) | |
tree | 7d06f260636c449a7cc4488393c958c909fadb07 /internal/fusefrontend_reverse/reverse_longnames.go | |
parent | d5133ca5ac4f241ff22ef145a3605a9fdb341bb6 (diff) |
fusefronted_reverse: fix ino collision between .name and .diriv files
A directory with a long name has two associated virtual files:
the .name file and the .diriv files.
These used to get the same inode number:
$ ls -di1 * */*
33313535 gocryptfs.longname.2togDFouca9mrTwtfF1RNW5DZRAQY8alaR7wO_Xd5Zw
1000000000033313535 gocryptfs.longname.2togDFouca9mrTwtfF1RNW5DZRAQY8alaR7wO_Xd5Zw/gocryptfs.diriv
1000000000033313535 gocryptfs.longname.2togDFouca9mrTwtfF1RNW5DZRAQY8alaR7wO_Xd5Zw.name
With this change we use another prefix (2 instead of 1) for .name files.
$ ls -di1 * */*
33313535 gocryptfs.longname.2togDFouca9mrTwtfF1RNW5DZRAQY8alaR7wO_Xd5Zw
1000000000033313535 gocryptfs.longname.2togDFouca9mrTwtfF1RNW5DZRAQY8alaR7wO_Xd5Zw/gocryptfs.diriv
2000000000033313535 gocryptfs.longname.2togDFouca9mrTwtfF1RNW5DZRAQY8alaR7wO_Xd5Zw.name
Diffstat (limited to 'internal/fusefrontend_reverse/reverse_longnames.go')
-rw-r--r-- | internal/fusefrontend_reverse/reverse_longnames.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/fusefrontend_reverse/reverse_longnames.go b/internal/fusefrontend_reverse/reverse_longnames.go index 7e26c90..3b2ddea 100644 --- a/internal/fusefrontend_reverse/reverse_longnames.go +++ b/internal/fusefrontend_reverse/reverse_longnames.go @@ -100,5 +100,5 @@ func (rfs *ReverseFS) newNameFile(relPath string) (nodefs.File, fuse.Status) { } content := []byte(rfs.nameTransform.EncryptName(pName, dirIV)) parentFile := filepath.Join(rfs.args.Cipherdir, pDir, pName) - return rfs.newVirtualFile(content, parentFile) + return rfs.newVirtualFile(content, parentFile, inoBaseNameFile) } |