libgocryptfs/internal/fusefrontend
Jakob Unterwurzacher 0fa824933c v2api: properly implement Node.Setattr
We used to always open a *File2 and letting the *File2
handle Setattr. This does not work it we cannot open the file!

Before:

    $ go test
    2020/07/12 20:14:57 writer: Write/Writev failed, err: 2=no such file or directory. opcode: INTERRUPT
    2020/07/12 20:14:57 writer: Write/Writev failed, err: 2=no such file or directory. opcode: INTERRUPT
    --- FAIL: TestLchown (0.00s)
        matrix_test.go:634: lchown /tmp/gocryptfs-test-parent-1026/014500839/default-plain/symlink: too many levels of symbolic links
    touch: setting times of '/tmp/gocryptfs-test-parent-1026/014500839/default-plain/utimesnano_symlink': Too many levels of symbolic links
    --- FAIL: TestUtimesNanoSymlink (0.00s)
        matrix_test.go:655: exit status 1
    --- FAIL: TestMkfifo (0.00s)
        matrix_test.go:755: file exists
    --- FAIL: TestMagicNames (0.00s)
        matrix_test.go:773: Testing n="gocryptfs.longname.QhUr5d9FHerwEs--muUs6_80cy6JRp89c1otLwp92Cs"
        matrix_test.go:773: Testing n="gocryptfs.diriv"
        matrix_test.go:815: open /tmp/gocryptfs-test-parent-1026/014500839/default-plain/linktarget: permission denied
    --- FAIL: TestChmod (0.00s)
        matrix_test.go:840: chmod 444 -> 000 failed: permission denied
        matrix_test.go:840: chmod 444 -> 111 failed: permission denied
        matrix_test.go:840: chmod 444 -> 123 failed: permission denied
        matrix_test.go:840: chmod 444 -> 321 failed: permission denied
    FAIL
    exit status 1
    FAIL	github.com/rfjakob/gocryptfs/tests/matrix	0.790s

After:

    $ go test
    --- FAIL: TestMkfifo (0.00s)
        matrix_test.go:755: file exists
    --- FAIL: TestMagicNames (0.00s)
        matrix_test.go:773: Testing n="gocryptfs.longname.QhUr5d9FHerwEs--muUs6_80cy6JRp89c1otLwp92Cs"
        matrix_test.go:773: Testing n="gocryptfs.diriv"
        matrix_test.go:815: open /tmp/gocryptfs-test-parent-1026/501766059/default-plain/linktarget: permission denied
    --- FAIL: TestChmod (0.00s)
        matrix_test.go:849: modeHave 0644 != modeWant 0
    FAIL
    exit status 1
    FAIL    github.com/rfjakob/gocryptfs/tests/matrix   0.787s
2020-07-12 20:17:15 +02:00
..
args.go Update go-fuse import path to github.com/hanwen/go-fuse/v2 2020-05-17 14:23:47 +02:00
ctlsock_interface.go ctlsock: create exported ctlsock client library 2020-05-09 17:36:41 +02:00
dircache.go dircache: increase cache size & lifetime 2020-05-17 21:37:36 +02:00
file.go Update go-fuse import path to github.com/hanwen/go-fuse/v2 2020-05-17 14:23:47 +02:00
file2.go v2api: File2: implement Release, Read, Write, Fsync, Flush, Allocate 2020-07-12 12:59:01 +02:00
file2_allocate_truncate.go v2api: fix double-lock in truncate 2020-07-12 13:13:24 +02:00
file2_api_check.go v2api: File2: implement Release, Read, Write, Fsync, Flush, Allocate 2020-07-12 12:59:01 +02:00
file2_holes.go v2api: File2: implement Release, Read, Write, Fsync, Flush, Allocate 2020-07-12 12:59:01 +02:00
file2_setattr.go v2api: properly implement Node.Setattr 2020-07-12 20:17:15 +02:00
file_allocate_truncate.go Update go-fuse import path to github.com/hanwen/go-fuse/v2 2020-05-17 14:23:47 +02:00
file_holes.go Update go-fuse import path to github.com/hanwen/go-fuse/v2 2020-05-17 14:23:47 +02:00
fs.go Revert "fusefrontend: don't always clear the dircache in Rename" 2020-05-24 23:36:11 +02:00
fs_dir.go v2api: implement Mkdir 2020-06-21 13:46:08 +02:00
node.go v2api: properly implement Node.Setattr 2020-07-12 20:17:15 +02:00
node_api_check.go v2api: implement Rename 2020-07-11 19:56:45 +02:00
node_dir_ops.go v2api: fix Mkdir crash when using plaintextnames 2020-07-12 13:35:37 +02:00
node_helpers.go v2api: fix RootNode cast 2020-07-11 20:27:47 +02:00
openbackingdir.go nametransform: reject names longer than 255 chars 2019-02-17 17:05:05 +01:00
openbackingdir_test.go v2api: fix TestOpenBackingDir 2020-07-11 20:15:47 +02:00
root_node.go v2api: call InitSerializer 2020-07-12 15:02:53 +02:00
xattr.go Update go-fuse import path to github.com/hanwen/go-fuse/v2 2020-05-17 14:23:47 +02:00
xattr_darwin.go Update go-fuse import path to github.com/hanwen/go-fuse/v2 2020-05-17 14:23:47 +02:00
xattr_linux.go Update go-fuse import path to github.com/hanwen/go-fuse/v2 2020-05-17 14:23:47 +02:00
xattr_unit_test.go v2api: fix TestOpenBackingDir 2020-07-11 20:15:47 +02:00