From 3b2143bafc8daeb3a5e77b611b5b5d2060bbdfbe Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sat, 28 Nov 2015 00:07:03 +0100 Subject: diriv: fix readdir It decrypted all file names using the root directory iv --- cryptfs/names_diriv.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cryptfs/names_diriv.go') diff --git a/cryptfs/names_diriv.go b/cryptfs/names_diriv.go index 6346bc2..be7a2b1 100644 --- a/cryptfs/names_diriv.go +++ b/cryptfs/names_diriv.go @@ -10,6 +10,7 @@ import ( // readDirIV - read the "gocryptfs.diriv" file from "dir" (absolute path) func (be *CryptFS) readDirIV(dir string) (iv []byte, err error) { ivfile := filepath.Join(dir, DIRIV_FILENAME) + Debug.Printf("readDirIV: reading %s\n", ivfile) iv, err = ioutil.ReadFile(ivfile) if err != nil { Warn.Printf("readDirIV: %v\n", err) @@ -63,6 +64,7 @@ func (be *CryptFS) DecryptPathDirIV(encryptedPath string, rootDir string) (strin var wd = rootDir var plainNames []string encryptedNames := strings.Split(encryptedPath, "/") + Debug.Printf("DecryptPathDirIV: decrypting %v\n", encryptedNames) for _, encryptedName := range encryptedNames { iv, err := be.readDirIV(wd) if err != nil { -- cgit v1.2.3