1
0
mirror of https://github.com/golang/go synced 2024-09-30 15:28:33 -06:00

internal/syscall/unix: implement Eaccess on dragonfly

Like on other BSDs, use faccessat(AT_FDCWD, path, mode, AT_EACCESS)

Change-Id: I5b7649815651725ab9245aed3c8c1941ff9b7606
Reviewed-on: https://go-review.googlesource.com/c/go/+/532675
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
Tobias Klauser 2023-10-04 18:07:37 +02:00 committed by Gopher Robot
parent 67fb851bd5
commit ad76a98d5e
3 changed files with 9 additions and 5 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 = 0x2
const AT_SYMLINK_NOFOLLOW = 0x1
const (
AT_EACCESS = 0x4
AT_FDCWD = 0xfffafdcd
AT_REMOVEDIR = 0x2
AT_SYMLINK_NOFOLLOW = 0x1
const UTIME_OMIT = -0x1
UTIME_OMIT = -0x1
)

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 freebsd || netbsd
//go:build dragonfly || freebsd || netbsd
package unix

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 && !netbsd
//go:build unix && !dragonfly && !freebsd && !linux && !netbsd
package unix