aboutsummaryrefslogtreecommitdiff
path: root/init_dir.go
diff options
context:
space:
mode:
authorSebastian Lackner2019-01-03 18:11:07 +0100
committerrfjakob2019-01-03 18:24:05 +0100
commita1ba4b6576695a3e680364813425ffd9c9c7c148 (patch)
treea48631b16f47d006178f97770816569948e01319 /init_dir.go
parent0414ef2572c3c07aa2a1b6dbb18a276a876c985a (diff)
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.
Diffstat (limited to 'init_dir.go')
-rw-r--r--init_dir.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/init_dir.go b/init_dir.go
index 1f5a7fc..ecfec9d 100644
--- a/init_dir.go
+++ b/init_dir.go
@@ -99,7 +99,7 @@ func initDir(args *argContainer) {
// in the root dir
if !args.plaintextnames && !args.reverse {
// Open cipherdir (following symlinks)
- dirfd, err := syscall.Open(args.cipherdir, syscall.O_RDONLY|syscall.O_DIRECTORY|syscallcompat.O_PATH, 0)
+ dirfd, err := syscall.Open(args.cipherdir, syscall.O_DIRECTORY|syscallcompat.O_PATH, 0)
if err == nil {
err = nametransform.WriteDirIVAt(dirfd)
syscall.Close(dirfd)