aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend/names.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2018-11-04 21:29:17 +0100
committerJakob Unterwurzacher2019-01-01 16:24:25 +0100
commitde3a2c189578f7636c39fde44fbe1da9c78b367e (patch)
tree7d7aab2a7074a51b1a7832560741a9eced72c63c /internal/fusefrontend/names.go
parent8586a8382561e3bcac65f4bfd0ef0694e6e11245 (diff)
fusefrontend: mark a few more functions as symlink-safe / unsafe
Diffstat (limited to 'internal/fusefrontend/names.go')
-rw-r--r--internal/fusefrontend/names.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/fusefrontend/names.go b/internal/fusefrontend/names.go
index 5ec252b..6997177 100644
--- a/internal/fusefrontend/names.go
+++ b/internal/fusefrontend/names.go
@@ -33,6 +33,8 @@ func (fs *FS) isFiltered(path string) bool {
// GetBackingPath - get the absolute encrypted path of the backing file
// from the relative plaintext path "relPath"
+//
+// TODO: this function is NOT symlink-safe.
func (fs *FS) getBackingPath(relPath string) (string, error) {
cPath, err := fs.encryptPath(relPath)
if err != nil {
@@ -96,6 +98,9 @@ func (fs *FS) openBackingDir(relPath string) (dirfd int, cName string, err error
}
// 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