diff options
author | Jakob Unterwurzacher | 2015-11-27 21:48:58 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2015-11-27 21:48:58 +0100 |
commit | bdd9249a52d5ba2935625b9aeb12240214495e6f (patch) | |
tree | d04cffeee47a0db223075444442157c7e5eacde0 /pathfs_frontend/names.go | |
parent | decfc1ab798055234e16a2e9c0782f56ae50669b (diff) |
diriv: Move WriteDirIV() to cryptfs; add locking to Mkdir, Rmdir
Diffstat (limited to 'pathfs_frontend/names.go')
-rw-r--r-- | pathfs_frontend/names.go | 4 |
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) } |