libgocryptfs/internal/fusefrontend
Sebastian Lackner 682e642cfa fusefrontend: Rework the Utimens handling on macOS.
For Linux, everything effectively stays the same. For both path-based and
fd-based Utimens() calls, we use unix.UtimesNanoAt(). To avoid introducing
a separate syscall wrapper for futimens() (as done in go-fuse, for example),
we instead use the /proc/self/fd - trick.

On macOS, this changes quite a lot:

* Path-based Utimens() calls were previously completely broken, since
  unix.UtimensNanoAt() ignores the passed file descriptor. Note that this
  cannot be fixed easily since there IS no appropriate syscall available on
  macOS prior to High Sierra (10.13). We emulate this case by using
  Fchdir() + setattrlist().

* Fd-based Utimens() calls were previously translated to f.GetAttr() (to
  fill any empty parameters) and syscall.Futimes(), which does not does
  support nanosecond precision. Both issues can be fixed by switching to
  fsetattrlist().

Fixes https://github.com/rfjakob/gocryptfs/issues/350
2019-01-16 20:55:20 +01:00
..
args.go reverse mode: add --exclude option 2018-08-11 23:26:49 +02:00
ctlsock_interface.go fusefrontend: Use appropriate flags in decryptPathAt. 2019-01-03 18:24:05 +01:00
dircache.go main: Run 'ensure fds' code early during the program startup. 2019-01-05 16:12:16 +01:00
file_allocate_truncate.go fusefrontend: Fix computation of cipherSz in Allocate FUSE call. 2019-01-06 20:56:59 +01:00
file_holes.go fusefrontend: Properly convert plaintext <-> ciphertext offsets in SeekData(). 2019-01-06 12:21:54 +01:00
file.go fusefrontend: Rework the Utimens handling on macOS. 2019-01-16 20:55:20 +01:00
fs_dir.go syscallcompat: rework Fchmodat to FchmodatNofollow 2019-01-14 21:54:16 +01:00
fs.go fusefrontend: Rework the Utimens handling on macOS. 2019-01-16 20:55:20 +01:00
openbackingdir_test.go fusefrontend: Remove debug code. 2019-01-03 18:24:05 +01:00
openbackingdir.go Omit syscall.O_RDONLY flag when passing O_PATH. 2019-01-03 18:24:05 +01:00
xattr_darwin.go fusefrontend: Allow to set/remove xattr on directory without read permission. 2019-01-05 12:34:40 +01:00
xattr_linux_unit_test.go Improved xattr handling on non-linux systems (#227) 2018-04-17 20:33:04 +02:00
xattr_linux.go fusefrontend: Allow to set/remove xattr on directory without read permission. 2019-01-05 12:34:40 +01:00
xattr_unit_test.go fusefrontend: make openBackingDir() symlink-safe 2019-01-01 16:24:09 +01:00
xattr.go fusefrontend: Allow to set/remove xattr on directory without read permission. 2019-01-05 12:34:40 +01:00