Commit Graph

1657 Commits

Author SHA1 Message Date
Jakob Unterwurzacher
f82b9caa9c speed: add code comments 2020-02-29 21:26:28 +01:00
Jakob Unterwurzacher
fdfaa849f8 tests: test xattr acls
Fixes https://github.com/rfjakob/gocryptfs/issues/453
2020-02-29 20:38:48 +01:00
Jakob Unterwurzacher
ca9e912a28 fusefrontend: drop xattr user namespace restriction
We used to restrict setting xattrs to the "user."
namespace. I don't see a real reason for this
anymore, and it causes trouble for users who are using
acls.

Tests will be added in the next commit.

https://github.com/rfjakob/gocryptfs/issues/453
2020-02-29 20:12:43 +01:00
orcas
9ec042f2f6 Show undecryptable filenames if they match supplied glob
Resolves https://github.com/rfjakob/gocryptfs/issues/393
2020-02-28 22:17:59 +01:00
Jakob Unterwurzacher
eeefddad6a README: update changelog 2020-02-15 22:02:27 +01:00
Jakob Unterwurzacher
6eca07e36e tests: randomize data in testWriteN
Just writing zeros carries the risk of not detecting
wrongly created file holes. Write random data instead.
2020-02-15 21:56:08 +01:00
Jakob Unterwurzacher
97743858ce performance.txt: update result for governor = performance
Also add big signs where the cpu has changed, as the results
are not comparable when the cpu is different.

Also update encfs results.
2020-02-15 21:42:39 +01:00
Jakob Unterwurzacher
abc59fa968 contentenc: encryptBlocksParallel: explain why last part runs in new goroutine
The result is counter-intuitive, so explain it here.
2020-02-15 21:28:12 +01:00
Jakob Unterwurzacher
ff210a06fb main: respect GOMAXPROCS environment variable
If the user sets GOMAXPROCS explicitely, we should
respect it.
2020-02-15 17:44:40 +01:00
Jakob Unterwurzacher
d5ce340c02 merge prefer_openssl package into stupidgcm
Now that I have discovered golang.org/x/sys/cpu and that Go
versions below 1.6 are uncommon, there was not much useful
code left in prefer_openssl.

Merge the remains into stupidgcm.
2020-02-15 17:21:30 +01:00
Jakob Unterwurzacher
9aeb2a3df6 contentenc: move parallel encryption into encryptBlocksParallel
Make the logic self-contained in the new helper function.
2020-02-15 15:49:12 +01:00
Jakob Unterwurzacher
a92db18fe7 README: Raw64 change should be bold
This was a new feature flag.
2020-02-15 14:40:03 +01:00
Jakob Unterwurzacher
747e994682 Add contrib/cleanup-tmp-mounts.sh
Useful when you have lots of broken mounts after something in
the test suite went wrong.
2020-02-15 14:38:13 +01:00
Jakob Unterwurzacher
dc21cd3572 tests: cli: add TestSymlinkedCipherdir
https://github.com/rfjakob/gocryptfs/issues/450
2020-01-25 16:54:57 +01:00
Jakob Unterwurzacher
a48d7fac2c main: haveFusermount2: respect PATH environment variable
Use exec.LookPath() to find fusermount in the user's PATH
first. Fall back to /bin/fusermount for the case that PATH
is not set, like go-fuse does.

Fixes https://github.com/rfjakob/gocryptfs/issues/448
2020-01-14 23:12:56 +01:00
Jakob Unterwurzacher
367b7e8647 Travis CI: upgrade from Ubuntu 16.04 "Xenial" to Ubuntu 18.04 "Bionic"
Newer kernel and (acc. to Travis documentation) faster boot times.
2019-12-29 14:21:48 +01:00
Jakob Unterwurzacher
7116838abb Travis CI: clean up Go versions 2019-12-29 14:16:06 +01:00
Jakob Unterwurzacher
db43bfc4c0 main: detect fusermount3 and don't add nonempty
fusermount3 (i.e. fusermount from libfuse 3.x) has dropped
the `nonempty` option.

Detect fusermount3 and don't add `nonempty` in this case.

Fixes https://github.com/rfjakob/gocryptfs/pull/440
2019-12-28 23:51:45 +01:00
Pavol Rusnak
1364b44ae3 remove Trezor support 2019-12-28 19:50:49 +01:00
Jakob Unterwurzacher
7dda2363e1 Fix "go get" failure
Move the statusTxtContent to fix this confusing error
when running `go get github.com/rfjakob/gocryptfs/...`:

  $ go get github.com/rfjakob/gocryptfs/...
  # github.com/rfjakob/gocryptfs/tests/example_filesystems
  tests/example_filesystems/example_test_helpers.go:22:16: undefined: statusTxtContent
  tests/example_filesystems/example_test_helpers.go:75:16: undefined: statusTxtContent
2019-12-24 00:38:40 +01:00
Jakob Unterwurzacher
9178aa1534 MANPAGE: describe how to unmount, and that default options are fine
Feedback received during the recent Go user group. If you haven't
used FUSE before, you don't know how to unmount, and it was not
described in the man page!

As for the options, there are many, and new users are intimidated
by it. State clearly that defaults are fine.
2019-11-17 11:04:41 +01:00
Jakob Unterwurzacher
8ec804d825 fs: add uint64 cast to fix Darwin build
Error from Travis CI was:

 +GOOS=darwin
 +GOARCH=amd64
 +go build -tags without_openssl
 # github.com/rfjakob/gocryptfs/internal/fusefrontend
 internal/fusefrontend/fs.go:88:45: cannot use st.Dev (type int32) as type uint64 in argument to openfiletable.NewInumMap

Add uint64 to fix it.
2019-11-16 23:21:37 +01:00
Jakob Unterwurzacher
bb6155a51f fusefrontend: use inummap
translate inode numbers on different devices to fix
collisions.

Fixes https://github.com/rfjakob/gocryptfs/issues/435
2019-11-16 21:36:27 +01:00
Jakob Unterwurzacher
e5d5ab3973 openfiletable: add inummap
Generates unique inode numbers for files on different
devices.

https://github.com/rfjakob/gocryptfs/issues/435
2019-11-16 21:35:26 +01:00
Jakob Unterwurzacher
31ff557f85 tests: also check inode number in VerifySize
Check Stat() vs Fstat() result. Not very useful
at the moment as the kernel never seems to call Fstat().
2019-11-16 21:25:14 +01:00
Jakob Unterwurzacher
7e9e63b430 contrib/statvsfstat: add statvsfstat tool
Cli tool to compare the result of Stat() and Fstat().
2019-11-16 21:19:08 +01:00
Jakob Unterwurzacher
f7ddae24ed tests: fsstress: clean up leftover mounts on startup
Broken mounts may accumulate when the fs crashes.
2019-11-10 22:06:40 +01:00
Jakob Unterwurzacher
d404dcd3e3 tests: drop "-l" flag from fsstress-loopback.bash
No longer supported by go-fuse loopback.
2019-11-10 20:59:07 +01:00
Jakob Unterwurzacher
e4148028af fusefrontend: warn about missing diriv
The comment is outdated, at this point, we should
really not get any errors from ReadDirIVAt.

The change is best seen when running the fsck tests. Before:

  fsck: error opening dir "missing_diriv": 2=no such file or directory

After:

  OpenDir "K2m0E6qzIfoLkVZJanoUiQ": could not read gocryptfs.diriv: no such file or directory
  fsck: error opening dir "missing_diriv": 5=input/output error

See https://github.com/rfjakob/gocryptfs/issues/403 , where
the extra info would have been helpful.
2019-11-03 20:38:15 +01:00
Jakob Unterwurzacher
3b67bc5711 main: show "-fsck" in help text
Suggested at https://github.com/rfjakob/gocryptfs/issues/403
2019-11-03 20:19:22 +01:00
Jakob Unterwurzacher
93939961f5 fusefrontend: don't return EIO on directory with corrupt file names
This was meant as a way to inform the user that
something is very wrong, however, users are hitting
the condition on MacOS due to ".DS_Store" files, and
also on NFS due to ".nfsXXX" files.

Drop the whole thing as it seems to cause more pain
than gain.

Fixes https://github.com/rfjakob/gocryptfs/issues/431
2019-11-03 20:12:05 +01:00
Jakob Unterwurzacher
74b723d765 tests: send SIGUSR1 to loopback
loopback needs to receive SIGUSR1 to write a memory profile.
2019-11-03 20:04:23 +01:00
Jakob Unterwurzacher
6c91f697e1 tests: make extractloop work with go-fuse loopback again
The "-l" flag is no longer supported in go-fuse loopback, drop
it.
2019-10-19 19:58:39 +02:00
Jakob Unterwurzacher
03fdfc4c90 Update performance.txt 2019-10-13 19:55:06 +02:00
Jakob Unterwurzacher
26f9f8ff72 Update fuse-xfstests results 2019-10-13 19:34:03 +02:00
Jakob Unterwurzacher
8cb104f004 Update README for v1.7.1 2019-10-06 22:35:27 +02:00
Jakob Unterwurzacher
65bc006a78 stress_tests: use /var/tmp by default
There is a good chance that /tmp is tmpfs, and we want to
run our tests on a real filesystem.
2019-10-06 22:34:19 +02:00
Jakob Unterwurzacher
a1f6477401 test.bash: export TMPDIR
We have to export TMPDIR, otherwise the Go tests to
not pick it up.
2019-10-06 21:56:01 +02:00
Jakob Unterwurzacher
f9f3c6ac5c travis: also test Go 1.12.x 2019-10-06 21:53:50 +02:00
Jakob Unterwurzacher
8c44294087 tests: use /var/tmp by default
On Fedora, /tmp is tmpfs, which behaves differently than ext4
(inode numbers are never reused, for example).

Use /var/tmp, which is ext4 on Fedora, to get a more realistic
test environment.

This also allows us to drop the xattr workaround.
2019-10-06 21:53:20 +02:00
Jakob Unterwurzacher
00af4f4864 fusefrontend: unregister from openfiletable before closing the fd
Closing the fd means the inode number may be reused immediately
by a new file, so we have to get the old fileID out of the table
beforehand!

Hopefully fixes https://github.com/rfjakob/gocryptfs/issues/363
2019-10-06 21:47:36 +02:00
Jakob Unterwurzacher
43265940fa fusefrontend: print file hexdump on header error
This should help debugging https://github.com/rfjakob/gocryptfs/issues/363 ,
but does no harm in normal operation as it only prints ciphertext to the log.
2019-10-06 19:37:51 +02:00
Jakob Unterwurzacher
b3c88f573f contentenc: add explicit test for all-zero header
https://github.com/rfjakob/gocryptfs/issues/363
2019-10-06 19:37:51 +02:00
Jakob Unterwurzacher
1fb18f4a9e tests: filter leaked fds by prefix
When running

  $ go test ./tests/matrix/

in isolation, it failed like this:

  fd leak? before, after:
  [0r=/dev/null 3w=/dev/null 5r=/proc/8078/fd (hidden:4)]
  [0r=/dev/null 3w=/dev/null 5w=/tmp/go-build366655199/b001/testlog.txt 7r=/proc/8078/fd (hidden:4)]

Filter by prefix to get rid of this spurious test failure.
2019-10-06 19:37:51 +02:00
Jakob Unterwurzacher
d361f6e35b tests: clarify which process seems to be leaking fds
The tests check if they leak fds themselves, but we also
check if gocryptfs leaks fds. Clarify what is what in the
error message.
2019-10-06 18:48:09 +02:00
Jakob Unterwurzacher
44e5c9ab96 benchmark.bash: drop hardcoded encfs path 2019-09-21 19:25:50 +02:00
Tonimir Kisasondi
df37318fba Update readme.md
Just added a note to preinstall fuse, so the standalone
binary will work without problem.
2019-09-08 23:10:40 +02:00
Jakob Unterwurzacher
56eb85651b serialize_reads: drop superflous "continue"
Found while debugging https://github.com/rfjakob/gocryptfs/pull/413
2019-09-08 21:19:44 +02:00
Jakob Unterwurzacher
6df76db22b Update README 2019-09-08 16:31:14 +02:00
Jakob Unterwurzacher
0a4db7d9e9 Fix -idle unmounting despite activity
Fixes https://github.com/rfjakob/gocryptfs/issues/421
2019-09-08 16:29:20 +02:00