summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Unterwurzacher2019-01-02 22:19:59 +0100
committerJakob Unterwurzacher2019-01-02 22:20:44 +0100
commit0fd7637624c6994ce50be8a374648352f3f52501 (patch)
tree2a335bf351c567427f039e74fad4b9bdd45b6888
parent352f3147c5f1260cf729692d945c87e210cb1ad8 (diff)
fusefrontend: use O_RDONLY in the ListXAttr fallback path
Copy-paste error. https://github.com/rfjakob/gocryptfs/issues/308
-rw-r--r--internal/fusefrontend/xattr.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/fusefrontend/xattr.go b/internal/fusefrontend/xattr.go
index 7ffec25..ad1c330 100644
--- a/internal/fusefrontend/xattr.go
+++ b/internal/fusefrontend/xattr.go
@@ -132,7 +132,7 @@ func (fs *FS) ListXAttr(relPath string, context *fuse.Context) ([]string, fuse.S
cNames, err = syscallcompat.Llistxattr(procPath)
} else {
// O_NONBLOCK to not block on FIFOs.
- fd, err2 := fs.openBackingFile(relPath, syscall.O_WRONLY|syscall.O_NONBLOCK)
+ fd, err2 := fs.openBackingFile(relPath, syscall.O_RDONLY|syscall.O_NONBLOCK)
// On a symlink, openBackingFile fails with ELOOP. Let's pretend there
// can be no xattrs on symlinks, and always return an empty result.
if err2 == syscall.ELOOP {