summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Lackner2019-01-03 17:51:23 +0100
committerrfjakob2019-01-03 18:24:05 +0100
commit61241b05889bda6e70446eab571f138d5d6f6c20 (patch)
treeb54423db91f69ac60b0cc2767c84c50274e33bde
parent927b3ce4cfb455a258a15a5566429c44cf32cb35 (diff)
nametransform: Add implicit syscall.O_RDONLY flag.
-rw-r--r--internal/nametransform/longnames.go2
1 files changed, 1 insertions, 1 deletions
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
}