From a1ba4b6576695a3e680364813425ffd9c9c7c148 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Thu, 3 Jan 2019 18:11:07 +0100 Subject: Omit syscall.O_RDONLY flag when passing O_PATH. When O_PATH is specified in flags, flag bits other than O_CLOEXEC, O_DIRECTORY, and O_NOFOLLOW are ignored. --- tests/test_helpers/helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/test_helpers/helpers.go') diff --git a/tests/test_helpers/helpers.go b/tests/test_helpers/helpers.go index 9ff29a8..90eebdf 100644 --- a/tests/test_helpers/helpers.go +++ b/tests/test_helpers/helpers.go @@ -114,7 +114,7 @@ func ResetTmpDir(createDirIV bool) { } if createDirIV { // Open cipherdir (following symlinks) - dirfd, err := syscall.Open(DefaultCipherDir, syscall.O_RDONLY|syscall.O_DIRECTORY|syscallcompat.O_PATH, 0) + dirfd, err := syscall.Open(DefaultCipherDir, syscall.O_DIRECTORY|syscallcompat.O_PATH, 0) if err == nil { err = nametransform.WriteDirIVAt(dirfd) syscall.Close(dirfd) -- cgit v1.2.3