From 0805a63df1b5f915b228727f6074c2506922d0ad Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 20 Jan 2019 12:59:59 +0100 Subject: syscallcompat: drop Faccessat AT_SYMLINK_NOFOLLOW helper unix.Faccessat has added support for AT_SYMLINK_NOFOLLOW in July 2018, https://github.com/golang/sys/commit/bd9dbc187b6e1dacfdd2722a87e83093c2d7bd6e#diff-341484dbbe3180cd7a31ef2ad2d679b6 which means we no longer need our own helper. Closes https://github.com/rfjakob/gocryptfs/issues/347 --- tests/reverse/correctness_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests/reverse') diff --git a/tests/reverse/correctness_test.go b/tests/reverse/correctness_test.go index 931be42..77a9056 100644 --- a/tests/reverse/correctness_test.go +++ b/tests/reverse/correctness_test.go @@ -11,7 +11,6 @@ import ( "golang.org/x/sys/unix" "github.com/rfjakob/gocryptfs/internal/ctlsock" - "github.com/rfjakob/gocryptfs/internal/syscallcompat" "github.com/rfjakob/gocryptfs/tests/test_helpers" ) @@ -159,12 +158,12 @@ func TestAccess(t *testing.T) { } for _, n := range names { // Check if file exists - this should never fail - err = syscallcompat.Faccessat(unix.AT_FDCWD, dirB+"/"+n, unix.F_OK) + err = unix.Faccessat(unix.AT_FDCWD, dirB+"/"+n, unix.F_OK, unix.AT_SYMLINK_NOFOLLOW) if err != nil { t.Errorf("%s: %v", n, err) } // Check if file is readable - err = syscallcompat.Faccessat(unix.AT_FDCWD, dirB+"/"+n, unix.R_OK) + err = unix.Faccessat(unix.AT_FDCWD, dirB+"/"+n, unix.R_OK, unix.AT_SYMLINK_NOFOLLOW) if err != nil { t.Logf("%s: %v", n, err) } -- cgit v1.2.3