nametransform: Add implicit syscall.O_RDONLY flag.

This commit is contained in:
Sebastian Lackner 2019-01-03 17:51:23 +01:00 committed by rfjakob
parent 927b3ce4cf
commit 61241b0588
1 changed files with 1 additions and 1 deletions

View File

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