From 5b54577d2ec553055c06e05841f626c10368c6b6 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 5 Mar 2017 22:25:41 +0100 Subject: nametransform: fix Raw64 not affecting longnames HashLongName() incorrectly hardcoded the call to base64.URLEncoding. --- internal/fusefrontend_reverse/ctlsock_interface.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'internal/fusefrontend_reverse/ctlsock_interface.go') diff --git a/internal/fusefrontend_reverse/ctlsock_interface.go b/internal/fusefrontend_reverse/ctlsock_interface.go index 1f02fc1..4b3ffe6 100644 --- a/internal/fusefrontend_reverse/ctlsock_interface.go +++ b/internal/fusefrontend_reverse/ctlsock_interface.go @@ -6,7 +6,6 @@ import ( "syscall" "github.com/rfjakob/gocryptfs/internal/ctlsock" - "github.com/rfjakob/gocryptfs/internal/nametransform" ) var _ ctlsock.Interface = &ReverseFS{} // Verify that interface is implemented. @@ -24,7 +23,7 @@ func (rfs *ReverseFS) EncryptPath(plainPath string) (string, error) { dirIV := derivePathIV(cipherPath, ivPurposeDirIV) encryptedPart := rfs.nameTransform.EncryptName(part, dirIV) if rfs.args.LongNames && len(encryptedPart) > syscall.NAME_MAX { - encryptedPart = nametransform.HashLongName(encryptedPart) + encryptedPart = rfs.nameTransform.HashLongName(encryptedPart) } cipherPath = filepath.Join(cipherPath, encryptedPart) } -- cgit v1.2.3