From fe7355f9ee4ae8e52a9b76202e90032d78824f21 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Fri, 27 Nov 2015 23:34:55 +0100 Subject: diriv: use "DirIV" flag to discern and support mounting old filesystems --- integration_tests/example_filesystems_test.go | 2 +- integration_tests/helpers.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'integration_tests') diff --git a/integration_tests/example_filesystems_test.go b/integration_tests/example_filesystems_test.go index 644f8e7..7924736 100644 --- a/integration_tests/example_filesystems_test.go +++ b/integration_tests/example_filesystems_test.go @@ -36,7 +36,7 @@ func TestExampleFsNormal(t *testing.T) { checkStatusTxt(t, pDir+"status.txt") unmount(pDir) mount(cDir, pDir, "-masterkey", "74676e34-0b47c145-00dac61a-17a92316-"+ - "bb57044c-e205b71f-65f4fdca-7cabd4b3") + "bb57044c-e205b71f-65f4fdca-7cabd4b3", "-diriv=false") checkStatusTxt(t, pDir+"status.txt") unmount(pDir) err = os.Remove(pDir) diff --git a/integration_tests/helpers.go b/integration_tests/helpers.go index 6fc65cf..bff4e5b 100644 --- a/integration_tests/helpers.go +++ b/integration_tests/helpers.go @@ -8,6 +8,8 @@ import ( "os" "os/exec" "testing" + + "github.com/rfjakob/gocryptfs/cryptfs" ) // Note: the code assumes that all have a trailing slash @@ -38,8 +40,7 @@ func resetTmpDir() { fmt.Println(err) os.Exit(1) } - dirIV := make([]byte, 16) - err = ioutil.WriteFile(defaultCipherDir+"gocryptfs.diriv", dirIV, 0444) + err = cryptfs.WriteDirIV(defaultCipherDir) if err != nil { fmt.Println(err) os.Exit(1) -- cgit v1.2.3