aboutsummaryrefslogtreecommitdiff
path: root/internal/syscallcompat/sys_darwin.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/syscallcompat/sys_darwin.go')
-rw-r--r--internal/syscallcompat/sys_darwin.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/internal/syscallcompat/sys_darwin.go b/internal/syscallcompat/sys_darwin.go
index 92639cf..89d93e7 100644
--- a/internal/syscallcompat/sys_darwin.go
+++ b/internal/syscallcompat/sys_darwin.go
@@ -8,6 +8,8 @@ import (
"golang.org/x/sys/unix"
"github.com/hanwen/go-fuse/fuse"
+
+ "github.com/rfjakob/gocryptfs/internal/tlog"
)
const (
@@ -92,7 +94,12 @@ func MknodatUser(dirfd int, path string, mode uint32, dev int, context *fuse.Con
}
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- return emulateFchmodat(dirfd, path, mode, flags)
+ // Why would we ever want to call this without AT_SYMLINK_NOFOLLOW?
+ if flags&unix.AT_SYMLINK_NOFOLLOW == 0 {
+ tlog.Warn.Printf("Fchmodat: adding missing AT_SYMLINK_NOFOLLOW flag")
+ flags |= unix.AT_SYMLINK_NOFOLLOW
+ }
+ return unix.Fchmodat(dirfd, path, mode, flags)
}
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {