aboutsummaryrefslogtreecommitdiff
path: root/pathfs_frontend/names.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-11-27 21:48:58 +0100
committerJakob Unterwurzacher2015-11-27 21:48:58 +0100
commitbdd9249a52d5ba2935625b9aeb12240214495e6f (patch)
treed04cffeee47a0db223075444442157c7e5eacde0 /pathfs_frontend/names.go
parentdecfc1ab798055234e16a2e9c0782f56ae50669b (diff)
diriv: Move WriteDirIV() to cryptfs; add locking to Mkdir, Rmdir
Diffstat (limited to 'pathfs_frontend/names.go')
-rw-r--r--pathfs_frontend/names.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pathfs_frontend/names.go b/pathfs_frontend/names.go
index 5842d83..9c6e010 100644
--- a/pathfs_frontend/names.go
+++ b/pathfs_frontend/names.go
@@ -3,9 +3,13 @@ package pathfs_frontend
// This file handles filename encryption
func (fs *FS) encryptPath(plainPath string) (string, error) {
+ fs.dirIVLock.RLock()
+ defer fs.dirIVLock.RUnlock()
return fs.CryptFS.EncryptPathDirIV(plainPath, fs.backingDir)
}
func (fs *FS) decryptPath(cipherPath string) (string, error) {
+ fs.dirIVLock.RLock()
+ defer fs.dirIVLock.RUnlock()
return fs.CryptFS.DecryptPathDirIV(cipherPath, fs.backingDir)
}