From 3d6b2685fb926b40b4eb528a8cbdc3871444d492 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 20 Jan 2019 13:10:59 +0100 Subject: Revert "syscallcompat: drop Faccessat AT_SYMLINK_NOFOLLOW helper" Breaks mounting on MacOS: unix.Faccessat on Darwin does NOT (yet) support AT_SYMLINK_NOFOLLOW. See d44fe89ba4f3252c5bd00c4f7730197732f2a26a . This reverts commit 0805a63df1b5f915b228727f6074c2506922d0ad. --- tests/reverse/correctness_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/reverse') diff --git a/tests/reverse/correctness_test.go b/tests/reverse/correctness_test.go index 77a9056..931be42 100644 --- a/tests/reverse/correctness_test.go +++ b/tests/reverse/correctness_test.go @@ -11,6 +11,7 @@ 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" ) @@ -158,12 +159,12 @@ func TestAccess(t *testing.T) { } for _, n := range names { // Check if file exists - this should never fail - err = unix.Faccessat(unix.AT_FDCWD, dirB+"/"+n, unix.F_OK, unix.AT_SYMLINK_NOFOLLOW) + err = syscallcompat.Faccessat(unix.AT_FDCWD, dirB+"/"+n, unix.F_OK) if err != nil { t.Errorf("%s: %v", n, err) } // Check if file is readable - err = unix.Faccessat(unix.AT_FDCWD, dirB+"/"+n, unix.R_OK, unix.AT_SYMLINK_NOFOLLOW) + err = syscallcompat.Faccessat(unix.AT_FDCWD, dirB+"/"+n, unix.R_OK) if err != nil { t.Logf("%s: %v", n, err) } -- cgit v1.2.3