summaryrefslogtreecommitdiff
path: root/internal/fusefrontend/names.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2019-01-02 21:45:40 +0100
committerJakob Unterwurzacher2019-01-02 21:45:40 +0100
commit2b12bba274ba75f76ac8c2af3790e4190b32396f (patch)
treeba8a637f0677cbe387220de9f4742dd0e33c639c /internal/fusefrontend/names.go
parent59f1300591d44b1e5d8187b54951c03d6120289f (diff)
fusefronted: make EncryptPath symlink-safe
Finally allows us to delete EncryptPathDirIV.
Diffstat (limited to 'internal/fusefrontend/names.go')
-rw-r--r--internal/fusefrontend/names.go21
1 files changed, 0 insertions, 21 deletions
diff --git a/internal/fusefrontend/names.go b/internal/fusefrontend/names.go
index 36185e2..63f2e84 100644
--- a/internal/fusefrontend/names.go
+++ b/internal/fusefrontend/names.go
@@ -83,24 +83,3 @@ func (fs *FS) openBackingDir(relPath string) (dirfd int, cName string, err error
}
return dirfd, cName, nil
}
-
-// encryptPath - encrypt relative plaintext path
-//
-// TODO: this function is NOT symlink-safe because EncryptPathDirIV is not
-// symlink-safe.
-func (fs *FS) encryptPath(plainPath string) (string, error) {
- if plainPath != "" { // Empty path gets encrypted all the time without actual file accesses.
- fs.AccessedSinceLastCheck = 1
- } else { // Empty string gets encrypted as empty string
- return plainPath, nil
- }
- if fs.args.PlaintextNames {
- return plainPath, nil
- }
-
- fs.dirIVLock.RLock()
- cPath, err := fs.nameTransform.EncryptPathDirIV(plainPath, fs.args.Cipherdir)
- tlog.Debug.Printf("encryptPath '%s' -> '%s' (err: %v)", plainPath, cPath, err)
- fs.dirIVLock.RUnlock()
- return cPath, err
-}