fusefrontend: use O_RDONLY in the ListXAttr fallback path

Copy-paste error.

https://github.com/rfjakob/gocryptfs/issues/308
This commit is contained in:
Jakob Unterwurzacher 2019-01-02 22:19:59 +01:00
parent 352f3147c5
commit 0fd7637624

View File

@ -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 {