Age | Commit message (Collapse) | Author |
|
For build.bash, list missing dependencies: gcc, pkg-config
Fixes https://github.com/rfjakob/gocryptfs/issues/575
|
|
|
|
|
|
build-without-openssl.bash also disables CGO, so
this makes it more real-world-y.
But the real reason is that disabling CGO hopefully
fixes this travis ci build failure:
+GOOS=darwin
+GOARCH=arm64
+go build -tags without_openssl
/home/travis/.gimme/versions/go1.13.15.linux.amd64/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: unrecognized option '-pagezero_size'
/usr/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
The command "./crossbuild.bash" exited with 2.
|
|
gocryptfs 2.0 introduced the regression that the size
reported at symlink creation was the ciphertext size,
which is wrong.
Report the plaintext size.
Fixes https://github.com/rfjakob/gocryptfs/issues/574
|
|
|
|
These are now available cross-platform in the unix
package.
|
|
|
|
|
|
$ ./contrib/atomicrename/atomicrename -h
atomicrename creates 100 "src" files in the current directory, renames
them in random order over a single "dst" file while reading the "dst"
file concurrently in a loop.
Progress and errors are reported as they occour in addition to a summary
printed at the end. cifs and fuse filesystems are known to fail, local
filesystems and nfs seem ok.
See https://github.com/hanwen/go-fuse/issues/398 for background info.
|
|
Tested using
gocryptfs -init -debug -fido2 "hello world" cipherdir
Output before:
callFidoCommand: executing "/usr/bin/fido2-cred" with args [fido2-cred -M -h -v hello world]
After:
callFidoCommand: executing "/usr/bin/fido2-cred" with args ["fido2-cred" "-M" "-h" "-v" "hello world"]
Related: https://github.com/rfjakob/gocryptfs/issues/571
|
|
We don't write during fsck, but somebody else might try
to.
|
|
We used to leave directories like
/tmp/gocryptfs.fsck.104431245
behind. Let's clean up after ourselves.
|
|
The result of setting an acl depends on who runs the
operation!
Fixes fuse-xfstests generic/375
(see https://github.com/rfjakob/fuse-xfstests/wiki/results_2021-05-19)
|
|
Discovered by xfstests generic/564 .
Failure was:
generic/564 - output mismatch (see /opt/fuse-xfstests/results//generic/564.out.bad)
--- tests/generic/564.out 2021-05-08 21:11:05.307395966 +0200
+++ /opt/fuse-xfstests/results//generic/564.out.bad 2021-05-19 19:01:16.912888879 +0200
@@ -31,7 +31,7 @@
source range beyond 8TiB returns 0
destination range beyond 8TiB returns EFBIG
-copy_range: File too large
+copy_range: Function not implemented
|
|
xfstests generic/523 discovered that we allowed to set
xattrs with "/" in the name, but did not allow to read
them later.
With this change we do not allow to set them in the first
place.
|
|
Done using:
go get github.com/hanwen/go-fuse/v2@master
go mod tidy
|
|
Change https://review.gerrithub.io/c/hanwen/go-fuse/+/516154
was merged upstream.
This reverts commit 3374afccc46d186c206cdbc218a79d8958b00acf.
|
|
Failure looked like this:
--- FAIL: TestFileHoleCopy (3.73s)
--- FAIL: TestFileHoleCopy/k81 (0.04s)
file_holes_test.go:93: size changed: st0.Blocks=88 st2.Blocks=96
file_holes_test.go:147: aborting further subtests
$ findholes TestFileHoleCopy.k81.1
0 data
36864 hole
45056 data
50434 hole
50434 eof
$ findholes TestFileHoleCopy.k81.2
0 data
36864 hole
45056 data
50434 hole
50434 eof
$ filefrag -v TestFileHoleCopy.k81.1
Filesystem type is: ef53
File size of TestFileHoleCopy.k81.1 is 50434 (13 blocks of 4096 bytes)
ext: logical_offset: physical_offset: length: expected: flags:
0: 0.. 2: 23702311.. 23702313: 3:
1: 3.. 8: 20389855.. 20389860: 6: 23702314:
2: 11.. 12: 23702314.. 23702315: 2: 20389863: last,eof
TestFileHoleCopy.k81.1: 3 extents found
$ filefrag -v TestFileHoleCopy.k81.2
Filesystem type is: ef53
File size of TestFileHoleCopy.k81.2 is 50434 (13 blocks of 4096 bytes)
ext: logical_offset: physical_offset: length: expected: flags:
0: 0.. 2: 20389861.. 20389863: 3:
1: 3.. 4: 23702316.. 23702317: 2: 20389864:
2: 5.. 6: 20389864.. 20389865: 2: 23702318:
3: 7.. 8: 23702318.. 23702319: 2: 20389866:
4: 11.. 12: 23702320.. 23702321: 2: last,eof
TestFileHoleCopy.k81.2: 4 extents found
|
|
Fixes xfstests generic/401
|
|
In response to the discussion of the xfstests mailing list [1],
I looked at the Lseek implementation, which was naive and
did not handle all cases correctly.
The new implementation aligns the returned values to 4096 bytes
as most callers expect.
A lot of tests are added to verify that we handle all
cases correctly now.
[1]: https://www.spinics.net/lists/fstests/msg16554.html
|
|
Also, change the logic for the segment walk to not
rely on the total size. cp does not use the total
size either, and we miss bugs by cheating!
|
|
Will be used for improving Lseek()
|
|
For an illegal cipherSize, pretend we have an additional
1-byte block.
See code comment for details.
|
|
Also, replace one open-coded calculation with a
helper function.
|
|
TestSizeToSize tests CipherSizeToPlainSize and PlainSizeToCipherSize.
Fails at the moment due to CipherSizeToPlainSize non-moniticity.
|
|
Currently fails.
|
|
Problem in go-fuse has long been fixed.
|
|
Utility and libs to find hole/data segments using lseek.
|
|
GetdentsSpecial calls then Getdents syscall,
with normal entries and "." / ".." split into two slices.
|
|
As discovered by xfstests generic/401 [1], during the move to
the v2 api we seem to have lost the "." and ".." directory
entries.
[1]: https://github.com/rfjakob/fuse-xfstests/blob/4ef5b032bc283743d0eb58a8a28738766e664899/screenlog.0#L520
|
|
https://github.com/rfjakob/gocryptfs/issues/556
|
|
Breakage was:
+GOOS=darwin
+GOARCH=amd64
+go build -tags without_openssl
internal/fusefrontend/node_dir_ops.go:45:34: cannot use context (type *fuse.Context) as type *fuse.Caller in argument to syscallcompat.MkdiratUser
internal/fusefrontend/node_dir_ops.go:83:35: cannot use context (type *fuse.Context) as type *fuse.Caller in argument to syscallcompat.MkdiratUser
|
|
Let's have MkdiratUser take fuse.Context like everybody
else.
|
|
Turns out the whole euid switching logic can be shared when
wrapping the syscall in a closure.
|
|
|
|
This is unclear to users, as seen on
https://github.com/rfjakob/gocryptfs/issues/452#issuecomment-828836651
|
|
|
|
|
|
Until https://review.gerrithub.io/c/hanwen/go-fuse/+/516154
gets merged.
Commands used:
go mod edit -replace github.com/hanwen/go-fuse/v2=github.com/rfjakob/go-fuse/v2@acl
go mod download github.com/hanwen/go-fuse/v2
go mod tidy
|
|
With test to verify that it actually works this
time: Run "make root_test".
Depends-on: https://github.com/rfjakob/gocryptfs/issues/536
Fixes: https://github.com/rfjakob/gocryptfs/issues/536
|
|
Error was:
internal/fusefrontend/node.go:371:2: duplicate case syscallcompat.RENAME_NOREPLACE (value 0) in switch
previous case at internal/fusefrontend/node.go:368:7
Rewrite using "if"s instead.
|
|
RENAME_NOREPLACE is already defined in syscallcompat.
|
|
Discovered by xfstests generic/013: or implementation for
RENAME_EXCHANGE and RENAME_WHITEOUT is incomplete. Reject the
flags so that the caller retries with regular rename.
|
|
|
|
|
|
Change was merged:
https://github.com/hanwen/go-fuse/commit/a90e1f463c3f172a7690a6449fe5955a180dfec3
Done using:
$ go mod edit -dropreplace github.com/hanwen/go-fuse/v2
$ go get github.com/hanwen/go-fuse/v2@master
go: downloading github.com/hanwen/go-fuse/v2 v2.1.1-0.20210423170155-a90e1f463c3f
go get: upgraded github.com/hanwen/go-fuse/v2 v2.0.4-0.20210125162859-8e0bbdb16cb7 => v2.1.1-0.20210423170155-a90e1f463c3f
Related: https://github.com/rfjakob/gocryptfs/issues/549
|
|
|
|
"node itself" can be converted to node + child by
ascending one level.
Performance gains are spectacular, as will be seen
in the next commit.
|
|
This makes sure we actually see the dirCache stats.
|