From fb1b8ced3843a449f2a85d4ee0a9d426192d82fa Mon Sep 17 00:00:00 2001 From: danim7 Date: Mon, 27 Mar 2017 22:47:45 +0200 Subject: fusefrontend_reverse: consistent file owners for .diriv, .name files This PR addresses the Issue #95, about "Confusing file owner for longname files in reverse mode". It affects only the reverse mode, and introduces two modifications: 1) The "gocryptfs.longname.XXXX.name" files are assigned the owner and group of the underlying plaintext file. Therefore it is consistent with the file "gocryptfs.longname.XXXX" that has the encrypted contents of the plaintext file. 2) The two virtual files mentioned above are given -r--r--r-- permissions. This is consistent with the behavior described in function Access in internal/fusefrontend_reverse/rfs.go where all virtual files are always readable. Behavior also observed in point c) in #95 . Issue #95 URL: https://github.com/rfjakob/gocryptfs/issues/95 Pull request URL: https://github.com/rfjakob/gocryptfs/pull/97 --- internal/fusefrontend_reverse/reverse_longnames.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/fusefrontend_reverse/reverse_longnames.go') diff --git a/internal/fusefrontend_reverse/reverse_longnames.go b/internal/fusefrontend_reverse/reverse_longnames.go index 1d19643..f1c45ca 100644 --- a/internal/fusefrontend_reverse/reverse_longnames.go +++ b/internal/fusefrontend_reverse/reverse_longnames.go @@ -96,6 +96,6 @@ func (rfs *ReverseFS) newNameFile(relPath string) (nodefs.File, fuse.Status) { return nil, fuse.ToStatus(err) } content := []byte(rfs.nameTransform.EncryptName(e, dirIV)) - parentFile := filepath.Join(rfs.args.Cipherdir, pDir) + parentFile := filepath.Join(rfs.args.Cipherdir, pDir, e) return rfs.newVirtualFile(content, parentFile) } -- cgit v1.2.3