It used to be reported as "function not implemented", accompanied
with this log output:
go-fuse: can't convert error type: ParseHeader: header is all-zero. Header hexdump: 000000000000000000000000000000000000
Now we report EIO and log this:
doWrite 1372183: corrupt header: ParseHeader: header is all-zero. Header hexdump: 000000000000000000000000000000000000
On Go 1.17 and older we get this:
Error: ./version.go:67:24: info.Settings undefined (type *debug.BuildInfo has no field or method Settings)
Fix the build error by shedding some nice-to-have features.
Go1.12 introduced BuildInfo which embeds build information. It does
not embed build date to facilitate reproducable builds by default.
If build information is embedded from build script, use the information
provided by the Go build system.
Fails right now as reported in https://github.com/rfjakob/gocryptfs/pull/655
--- FAIL: TestLongnamemax100Reverse (0.09s)
longnamemax_test.go:104: l=64: should see a longname now
longnamemax_test.go:104: l=65: should see a longname now
longnamemax_test.go:104: l=66: should see a longname now
longnamemax_test.go:104: l=67: should see a longname now
longnamemax_test.go:104: l=68: should see a longname now
longnamemax_test.go:104: l=69: should see a longname now
longnamemax_test.go:104: l=70: should see a longname now
longnamemax_test.go:104: l=71: should see a longname now
longnamemax_test.go:104: l=72: should see a longname now
longnamemax_test.go:104: l=73: should see a longname now
longnamemax_test.go:104: l=74: should see a longname now
longnamemax_test.go:104: l=75: should see a longname now
longnamemax_test.go:104: l=76: should see a longname now
longnamemax_test.go:104: l=77: should see a longname now
longnamemax_test.go:104: l=78: should see a longname now
longnamemax_test.go:104: l=79: should see a longname now
longnamemax_test.go:104: l=80: should see a longname now
longnamemax_test.go:104: l=81: should see a longname now
longnamemax_test.go:104: l=82: should see a longname now
longnamemax_test.go:104: l=83: should see a longname now
longnamemax_test.go:104: l=84: should see a longname now
longnamemax_test.go:104: l=85: should see a longname now
longnamemax_test.go:104: l=86: should see a longname now
longnamemax_test.go:104: l=87: should see a longname now
longnamemax_test.go:104: l=88: should see a longname now
longnamemax_test.go:104: l=89: should see a longname now
longnamemax_test.go:104: l=90: should see a longname now
longnamemax_test.go:104: l=91: should see a longname now
longnamemax_test.go:104: l=92: should see a longname now
longnamemax_test.go:104: l=93: should see a longname now
longnamemax_test.go:104: l=94: should see a longname now
longnamemax_test.go:104: l=95: should see a longname now
longnamemax_test.go:104: l=96: should see a longname now
longnamemax_test.go:104: l=97: should see a longname now
longnamemax_test.go:104: l=98: should see a longname now
longnamemax_test.go:104: l=99: should see a longname now
longnamemax_test.go:104: l=100: should see a longname now
longnamemax_test.go:104: l=101: should see a longname now
longnamemax_test.go:104: l=102: should see a longname now
longnamemax_test.go:104: l=103: should see a longname now
longnamemax_test.go:104: l=104: should see a longname now
longnamemax_test.go:104: l=105: should see a longname now
longnamemax_test.go:104: l=106: should see a longname now
longnamemax_test.go:104: l=107: should see a longname now
longnamemax_test.go:104: l=108: should see a longname now
longnamemax_test.go:104: l=109: should see a longname now
longnamemax_test.go:104: l=110: should see a longname now
longnamemax_test.go:104: l=111: should see a longname now
longnamemax_test.go:104: l=112: should see a longname now
longnamemax_test.go:104: l=113: should see a longname now
longnamemax_test.go:104: l=114: should see a longname now
longnamemax_test.go:104: l=115: should see a longname now
longnamemax_test.go:104: l=116: should see a longname now
longnamemax_test.go:104: l=117: should see a longname now
longnamemax_test.go:104: l=118: should see a longname now
longnamemax_test.go:104: l=119: should see a longname now
longnamemax_test.go:104: l=120: should see a longname now
longnamemax_test.go:104: l=121: should see a longname now
longnamemax_test.go:104: l=122: should see a longname now
longnamemax_test.go:104: l=123: should see a longname now
longnamemax_test.go:104: l=124: should see a longname now
longnamemax_test.go:104: l=125: should see a longname now
longnamemax_test.go:104: l=126: should see a longname now
longnamemax_test.go:104: l=127: should see a longname now
longnamemax_test.go:104: l=128: should see a longname now
longnamemax_test.go:104: l=129: should see a longname now
longnamemax_test.go:104: l=130: should see a longname now
longnamemax_test.go:104: l=131: should see a longname now
longnamemax_test.go:104: l=132: should see a longname now
longnamemax_test.go:104: l=133: should see a longname now
longnamemax_test.go:104: l=134: should see a longname now
longnamemax_test.go:104: l=135: should see a longname now
longnamemax_test.go:104: l=136: should see a longname now
longnamemax_test.go:104: l=137: should see a longname now
longnamemax_test.go:104: l=138: should see a longname now
longnamemax_test.go:104: l=139: should see a longname now
longnamemax_test.go:104: l=140: should see a longname now
longnamemax_test.go:104: l=141: should see a longname now
longnamemax_test.go:104: l=142: should see a longname now
longnamemax_test.go:104: l=143: should see a longname now
longnamemax_test.go:104: l=144: should see a longname now
longnamemax_test.go:104: l=145: should see a longname now
longnamemax_test.go:104: l=146: should see a longname now
longnamemax_test.go:104: l=147: should see a longname now
longnamemax_test.go:104: l=148: should see a longname now
longnamemax_test.go:104: l=149: should see a longname now
longnamemax_test.go:104: l=150: should see a longname now
longnamemax_test.go:104: l=151: should see a longname now
longnamemax_test.go:104: l=152: should see a longname now
longnamemax_test.go:104: l=153: should see a longname now
longnamemax_test.go:104: l=154: should see a longname now
longnamemax_test.go:104: l=155: should see a longname now
longnamemax_test.go:104: l=156: should see a longname now
longnamemax_test.go:104: l=157: should see a longname now
longnamemax_test.go:104: l=158: should see a longname now
longnamemax_test.go:104: l=159: should see a longname now
longnamemax_test.go:104: l=160: should see a longname now
longnamemax_test.go:104: l=161: should see a longname now
longnamemax_test.go:104: l=162: should see a longname now
longnamemax_test.go:104: l=163: should see a longname now
longnamemax_test.go:104: l=164: should see a longname now
longnamemax_test.go:104: l=165: should see a longname now
longnamemax_test.go:104: l=166: should see a longname now
longnamemax_test.go:104: l=167: should see a longname now
longnamemax_test.go:104: l=168: should see a longname now
longnamemax_test.go:104: l=169: should see a longname now
longnamemax_test.go:104: l=170: should see a longname now
longnamemax_test.go:104: l=171: should see a longname now
longnamemax_test.go:104: l=172: should see a longname now
longnamemax_test.go:104: l=173: should see a longname now
longnamemax_test.go:104: l=174: should see a longname now
longnamemax_test.go:104: l=175: should see a longname now
FAIL
https://github.com/rfjakob/gocryptfs/pull/655
Unlike the FUSE implementation on Linux, macFUSE doesn't cache the file
attributes from the `LOOKUP` call, so it calls `GETATTR` prior to
accessing a file.
In the case of the `VirtualConfNode` (reverse config file passthrough),
this resulted in the default `GETATTR` implementation returning an empty
result, ultimately resulting in a "permission denied" error.
14:44:14.095207 rx 3: GETATTR n2
14:44:14.095229 tx 3: OK, {tA=1s {M0100000 SZ=0 L=0 0:0 0 0:8954996 A 0.000000 M 0.000000 C 0.000000}}
14:44:14.099943 rx 4: ACCESS n2 {u=501 g=20 r}
14:44:14.099990 tx 4: 13=permission denied
By impementing `Getattr` (from `fs.NodeGetattrer`) on `VirtualConfNode`
this solves the issue.
$ ./crossbuild.bash
[...]
+ GOOS=darwin
+ GOARCH=amd64
+ build
+ go build -tags without_openssl -o /dev/null
internal/fusefrontend/node.go:397:2: duplicate case syscallcompat.RENAME_NOREPLACE (value 0) in switch
previous case at internal/fusefrontend/node.go:397:7
internal/fusefrontend/node.go:397:2: duplicate case syscallcompat.RENAME_EXCHANGE (value 0) in switch
previous case at internal/fusefrontend/node.go:397:7
internal/fusefrontend/node.go:397:2: duplicate case syscallcompat.RENAME_WHITEOUT (value 0) in switch
previous case at internal/fusefrontend/node.go:397:7
internal/fusefrontend/node.go:399:38: duplicate case syscallcompat.RENAME_NOREPLACE | syscallcompat.RENAME_WHITEOUT (value 0) in switch
previous case at internal/fusefrontend/node.go:397:7
This way we get live output, and hopefully see clearer
where things hang if they do.
Also, don't pass on flags to "go vet", the verbose output
is pretty useless.
https://github.com/rfjakob/gocryptfs/issues/625
(1)
Create a 1 GiB file instead of 1 TiB, because
apparently, on MacOS, the file (sometimes?) is not
created sparse, and fills up users' disks:
https://github.com/rfjakob/gocryptfs/issues/625
(2)
On darwin, SEEK_DATA is not the same as on Linux
( 2f8b555de2 )
so use the value provided by the unix package.
This fails at the moment:
$ go test ./tests/cli/
--- FAIL: TestMountPasswordEmpty (0.01s)
cli_test.go:430: socket file "/tmp/gocryptfs-test-parent-1026/3413782690/TestMountPasswordEmpty.753166857.sock" left behind
https://github.com/rfjakob/gocryptfs/issues/634