diff options
author | Sebastian Lackner | 2019-01-14 02:49:11 +0100 |
---|---|---|
committer | rfjakob | 2019-01-14 21:27:28 +0100 |
commit | 92110628ee5f48b0106b32090854fcc61d6bca20 (patch) | |
tree | 9469e338a693fb56beea79c961d367771f13346c /internal/syscallcompat/emulate.go | |
parent | 0345cc08307c01da635ea5546952a584480c9a93 (diff) |
syscallcompat: Drop Fchownat emulation on macOS.
Diffstat (limited to 'internal/syscallcompat/emulate.go')
-rw-r--r-- | internal/syscallcompat/emulate.go | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/internal/syscallcompat/emulate.go b/internal/syscallcompat/emulate.go index 8a538fb..dc8cf6d 100644 --- a/internal/syscallcompat/emulate.go +++ b/internal/syscallcompat/emulate.go @@ -30,26 +30,6 @@ func emulateMknodat(dirfd int, path string, mode uint32, dev int) error { return syscall.Mknod(path, mode, dev) } -// emulateFchownat emulates the syscall for platforms that don't have it -// in the kernel (darwin). -func emulateFchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { - if !filepath.IsAbs(path) { - chdirMutex.Lock() - defer chdirMutex.Unlock() - cwd, err := syscall.Open(".", syscall.O_RDONLY, 0) - if err != nil { - return err - } - defer syscall.Close(cwd) - err = syscall.Fchdir(dirfd) - if err != nil { - return err - } - defer syscall.Fchdir(cwd) - } - return syscall.Lchown(path, uid, gid) -} - // emulateSymlinkat emulates the syscall for platforms that don't have it // in the kernel (darwin). func emulateSymlinkat(oldpath string, newdirfd int, newpath string) (err error) { |