aboutsummaryrefslogtreecommitdiff
path: root/cryptfs/names_diriv.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-11-27 23:34:55 +0100
committerJakob Unterwurzacher2015-11-28 18:38:06 +0100
commitfe7355f9ee4ae8e52a9b76202e90032d78824f21 (patch)
treeffa2eed00a684b9985a249654e72bba3f82710db /cryptfs/names_diriv.go
parentb3d96b6a208e7679a0e7dc936d76bcec271ecddf (diff)
diriv: use "DirIV" flag to discern and support mounting old filesystems
Diffstat (limited to 'cryptfs/names_diriv.go')
-rw-r--r--cryptfs/names_diriv.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/cryptfs/names_diriv.go b/cryptfs/names_diriv.go
index ab039f0..6346bc2 100644
--- a/cryptfs/names_diriv.go
+++ b/cryptfs/names_diriv.go
@@ -22,8 +22,9 @@ func (be *CryptFS) readDirIV(dir string) (iv []byte, err error) {
}
// WriteDirIV - create diriv file inside "dir" (absolute path)
-// This function is exported because it is used from pathfs_frontend
-func (be *CryptFS) WriteDirIV(dir string) error {
+// This function is exported because it is used from pathfs_frontend, main,
+// and also the automated tests.
+func WriteDirIV(dir string) error {
iv := RandBytes(DIRIV_LEN)
file := filepath.Join(dir, DIRIV_FILENAME)
// 0444 permissions: the file is not secret but should not be written to