aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-07-29build.bash: also try BSD date syntax for converting SOURCE_DATE_EPOCH570Jakob Unterwurzacher
GNU date syntax does not work on macos. Fixes https://github.com/rfjakob/gocryptfs/issues/570
2021-07-29fido2: actually drop `-v` flagJakob Unterwurzacher
Commit 2a9d70d48f4cc715a6864849cdec91ab08b6fd03 only dropped the flag on mount but not on `-init`. Also drop it on `-init`. Fixes https://github.com/rfjakob/gocryptfs/issues/571 (part II)
2021-07-29go mod: set version to 1.16 & drop explicit "-mod=vendor" from ciJakob Unterwurzacher
This makes "go build" automatically use the vendor directory, if present. See https://golang.org/doc/modules/gomod-ref#go for details. Up to now, we ignored the vendor dir completely! Fixes https://github.com/rfjakob/gocryptfs/issues/581
2021-07-29github ci: Add Github Actions CIJakob Unterwurzacher
Add Github Actions and delete defunct Travis CI.
2021-06-27canonical-benchmarks.bash: handle relative pathsJakob Unterwurzacher
Passing a relative path was broken because we cd'ed away first.
2021-06-27fido2: drop `-v` option (PIN request)Jakob Unterwurzacher
We used to pass `-v` on `gocryptfs -init` but not for mount, which seems strange by itself, but more importantly, `-v` does not work on Yubikeys. Drop `-v`. Fixes https://github.com/rfjakob/gocryptfs/issues/571
2021-06-27fido2: pretty-print fidoCommand in debug outputJakob Unterwurzacher
Related: https://github.com/rfjakob/gocryptfs/issues/571
2021-06-26doc: update performance.txtJakob Unterwurzacher
2021-06-26tests/fsck: delete obsolete script run_fsck.bashJakob Unterwurzacher
Not called by anybody.
2021-06-26tests, maxlen.bash: speed up TestMaxlen using QUICK=1Jakob Unterwurzacher
From >6 to <1 second.
2021-06-26tests: matrix: show content detail on mismatchJakob Unterwurzacher
2021-06-26fusefrontend: delete openBackingDirJakob Unterwurzacher
2021-06-26fusefrontend: convert last callers from openBackingDir to prepareAtSyscallJakob Unterwurzacher
2021-06-26tests: better error message on ctlsock query failureJakob Unterwurzacher
2021-06-26fusefrontend: ctlsock: get rid of unneccessary wrapper functionJakob Unterwurzacher
2021-06-26fusefrontend: convert ctlsock from openBackingDir to prepareAtSyscallJakob Unterwurzacher
openBackingDir will be removed. Also, remove leftover debug printfs.
2021-06-26fusefrontend: convert openBackingDir tests to prepareAtSyscallJakob Unterwurzacher
openBackingDir will be removed.
2021-06-26tests/default: add maxlen.bash testJakob Unterwurzacher
2021-06-26maxlen.bash: suppress progress output if not on a terminalJakob Unterwurzacher
2021-06-25fusefrontend: implement recursive diriv cachingJakob Unterwurzacher
The new contrib/maxlen.bash showed that we have exponential runtime with respect to directory depth. The new recursive diriv caching is a lot smarter as it caches intermediate lookups. maxlen.bash now completes in a few seconds. xfstests results same as https://github.com/rfjakob/fuse-xfstests/blob/2d158e4c82be85c15269af77498e353f928f4fab/screenlog.0 : Failures: generic/035 generic/062 generic/080 generic/093 generic/099 generic/215 generic/285 generic/319 generic/426 generic/444 generic/467 generic/477 generic/523 Failed 13 of 580 tests benchmark.bash results are identical: $ ./benchmark.bash Testing gocryptfs at /tmp/benchmark.bash.BdQ: gocryptfs v2.0.1-17-g6b09bc0; go-fuse v2.1.1-0.20210611132105-24a1dfe6b4f8; 2021-06-25 go1.16.5 linux/amd64 /tmp/benchmark.bash.BdQ.mnt is a mountpoint WRITE: 262144000 bytes (262 MB, 250 MiB) copied, 0,4821 s, 544 MB/s READ: 262144000 bytes (262 MB, 250 MiB) copied, 0,266061 s, 985 MB/s UNTAR: 8,280 MD5: 4,564 LS: 1,745 RM: 2,244
2021-06-21nametransform: rename BadNameFlag to BadnameSuffixJakob Unterwurzacher
2021-06-21nametransform: gather badname functions in badname.goJakob Unterwurzacher
2021-06-21nametransform: delete NameTransformer interfaceJakob Unterwurzacher
Useless layer of indirection.
2021-06-21tests: cli: add TestZerokeyJakob Unterwurzacher
TestZerokey verifies that `gocryptfs -zerokey` uses the same options as `gocryptfs -init`.
2021-06-21Improve startup debug outputJakob Unterwurzacher
The startup debug output was very verbose but still missing some effective crypto settings.
2021-06-20nametransform: pass badname patterns via NewJakob Unterwurzacher
This means we can unexport the field.
2021-06-20main: use JSONDump helper for debug outputJakob Unterwurzacher
2021-06-20fido2: hide "FIDO2" in gocryptfs.conf if not usedJakob Unterwurzacher
Result of: $ gocryptfs -init foo $ cat foo/gocryptfs.conf Before: { "Creator": "gocryptfs v2.0.1", "EncryptedKey": "FodEdNHD/cCwv1n5BuyAkbIOnJ/O5gfdCh3YssUCJ2DUr0A8DrQ5NH2SLhREeWRL3V8EMiPO2Ncr5IVwE4SSxQ==", "ScryptObject": { "Salt": "brGaw9Jg1kbPuSXFiwoxqK2oXFTgbniSgpiB+cu+67Y=", "N": 65536, "R": 8, "P": 1, "KeyLen": 32 }, "Version": 2, "FeatureFlags": [ "GCMIV128", "HKDF", "DirIV", "EMENames", "LongNames", "Raw64" ], "FIDO2": { "CredentialID": null, "HMACSalt": null } } After: { "Creator": "gocryptfs v2.0.1-5-gf9718eb-dirty.DerDonut-badnamecontent", "EncryptedKey": "oFMj1lS1ZsM/vEfanNMeCTPw3PZr5VWeL7ap8Jd8YQm6evy2BAhtQ/pd6RzDx84wlCz9TpxqHRihuwSEMnOWWg==", "ScryptObject": { "Salt": "JZ/5mhy4a8EAQ/wDF1POIEe4/Ss38cfJgXgj26DuA4M=", "N": 65536, "R": 8, "P": 1, "KeyLen": 32 }, "Version": 2, "FeatureFlags": [ "GCMIV128", "HKDF", "DirIV", "EMENames", "LongNames", "Raw64" ] }
2021-06-20Badname file content accessDerDonut
This proposal is the counterpart of the modifications from the `-badname` parameter. It modifies the plain -> cipher mapping for filenames when using `-badname` parameter. The new function `EncryptAndHashBadName` tries to find a cipher filename for the given plain name with the following steps: 1. If `badname` is disabled or direct mapping is successful: Map directly (default and current behaviour) 2. If a file with badname flag has a valid cipher file, this is returned (=File just ends with the badname flag) 3. If a file with a badname flag exists where only the badname flag was added, this is returned (=File cipher name could not be decrypted by function `DecryptName` and just the badname flag was added) 4. Search for all files which cipher file name extists when cropping more and more characters from the end. If only 1 file is found, return this 5. Return an error otherwise This allows file access in the file browsers but most important it allows that you rename files with undecryptable cipher names in the plain directories. Renaming those files will then generate a proper cipher filename One backdraft: When mounting the cipher dir with -badname parameter, you can never create (or rename to) files whose file name ends with the badname file flag (at the moment this is " GOCRYPTFS_BAD_NAME"). This will cause an error. I modified the CLI test function to cover additional test cases. Test [Case 7](https://github.com/DerDonut/gocryptfs/blob/badnamecontent/tests/cli/cli_test.go#L712) cannot be performed since the cli tests are executed in panic mode. The testing is stopped on error. Since the function`DecryptName` produces internal errors when hitting non-decryptable file names, this test was omitted. This implementation is a proposal where I tried to change the minimum amount of existing code. Another possibility would be instead of creating the new function `EncryptAndHashBadName` to modify the signature of the existing function `EncryptAndHashName(name string, iv []byte)` to `EncryptAndHashName(name string, iv []byte, dirfd int)` and integrate the functionality into this function directly. You may allow calling with dirfd=-1 or other invalid values an then performing the current functionality.
2021-06-20MANPAGE: describe -badnameJakob Unterwurzacher
2021-06-20contrib/maxlen.bash: also test dir and path lengthJakob Unterwurzacher
Move the script from tests to contrib as it may now be useful to somebody else. https://github.com/rfjakob/gocryptfs/issues/552
2021-06-19README: Add MacPorts install instructionsMarcel Bochtler
See [1] for the Portfile. [1]: https://github.com/macports/macports-ports/blob/master/fuse/gocryptfs/Portfile.
2021-06-19README: Rename Mac OS X to its latest nameMarcel Bochtler
See: https://www.apple.com/macos.
2021-06-11go.mod: update go-fuseJakob Unterwurzacher
Memory compaction was merged ( https://github.com/hanwen/go-fuse/commit/24a1dfe6b4f8d478275d5cf671d982c4ddd8c904 ) Fixes https://github.com/rfjakob/gocryptfs/issues/569
2021-06-08README: sync compile instructions with gocryptfs-websiteJakob Unterwurzacher
2021-06-08README: recommend build-without-openssl.bashJakob Unterwurzacher
For build.bash, list missing dependencies: gcc, pkg-config Fixes https://github.com/rfjakob/gocryptfs/issues/575
2021-06-07README: update for v2.0.1 releasev2.0.1Jakob Unterwurzacher
2021-06-06crossbuild.bash: skip Apple Silicon build on old Go versionsJakob Unterwurzacher
2021-06-06crossbuild.bash: disable CGOJakob Unterwurzacher
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.
2021-06-06fusefronted: report plaintext size on symlink creationJakob Unterwurzacher
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
2021-06-05crossbuild.bash: also build for Apple M1Jakob Unterwurzacher
2021-06-05syscallcompat: drop obsolete wrappersJakob Unterwurzacher
These are now available cross-platform in the unix package.
2021-06-05Update README for v2.0v2.0Jakob Unterwurzacher
2021-06-05doc: add benchmark for v2.0, reformat tableJakob Unterwurzacher
2021-06-04Add contrib/atomicrenameJakob Unterwurzacher
$ ./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.
2021-06-03fido2: quote argument strings in debug outputJakob Unterwurzacher
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
2021-06-02fsck: mark temporary mount read-onlyJakob Unterwurzacher
We don't write during fsck, but somebody else might try to.
2021-06-02fsck: clean up temporary mountpointJakob Unterwurzacher
We used to leave directories like /tmp/gocryptfs.fsck.104431245 behind. Let's clean up after ourselves.
2021-06-02fusefrontend: run acl Setxattr in user contextJakob Unterwurzacher
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)
2021-06-02fusefrontend: catch ReadAt integer overflowJakob Unterwurzacher
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