1
0
mirror of https://github.com/golang/go synced 2024-11-23 20:50:04 -07:00

internal/syscall/unix: implement Eaccess on netbsd

Like on linux and freebsd, use faccessat(AT_FDCWD, path, mode, AT_EACCESS)

Change-Id: Ia76ba67023b6deba6f0cdaf30a0b9cee0c140bb8
Reviewed-on: https://go-review.googlesource.com/c/go/+/531876
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
Tobias Klauser 2023-10-03 11:20:29 +02:00 committed by Gopher Robot
parent 98289021f3
commit f79c99fe8a
3 changed files with 10 additions and 4 deletions

View File

@ -10,7 +10,11 @@ const unlinkatTrap uintptr = syscall.SYS_UNLINKAT
const openatTrap uintptr = syscall.SYS_OPENAT
const fstatatTrap uintptr = syscall.SYS_FSTATAT
const AT_REMOVEDIR = 0x800
const AT_SYMLINK_NOFOLLOW = 0x200
const (
AT_EACCESS = 0x100
AT_FDCWD = -0x64
AT_REMOVEDIR = 0x800
AT_SYMLINK_NOFOLLOW = 0x200
const UTIME_OMIT = (1 << 30) - 2
UTIME_OMIT = (1 << 30) - 2
)

View File

@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build freebsd || netbsd
package unix
import (

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build unix && !freebsd && !linux
//go:build unix && !freebsd && !linux && !netbsd
package unix