From 61241b05889bda6e70446eab571f138d5d6f6c20 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Thu, 3 Jan 2019 17:51:23 +0100 Subject: nametransform: Add implicit syscall.O_RDONLY flag. --- internal/nametransform/longnames.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/nametransform') diff --git a/internal/nametransform/longnames.go b/internal/nametransform/longnames.go index 6fc080b..c17f121 100644 --- a/internal/nametransform/longnames.go +++ b/internal/nametransform/longnames.go @@ -76,7 +76,7 @@ func ReadLongNameAt(dirfd int, cName string) (string, error) { cName += LongNameSuffix var f *os.File { - fd, err := syscallcompat.Openat(dirfd, cName, syscall.O_NOFOLLOW, 0) + fd, err := syscallcompat.Openat(dirfd, cName, syscall.O_RDONLY|syscall.O_NOFOLLOW, 0) if err != nil { return "", err } -- cgit v1.2.3