Age | Commit message (Collapse) | Author |
|
I just got this message (not reproducible) with unescaped
binary garbage.
UnmountErr: "/var/tmp/gocryptfs-test-parent-1026/114471933/TestMountBackground.899727687.mnt" was not found in MountInfo, cannot check for FD leaks
UnmountErr: "/var/tmp/gocryptfs-test-parent-1026/114471933/TestConfigPipe.212912444.mnt" was not found in MountInfo, cannot check for FD leaks
DecryptName "mzaZRF9_0IU-_5vv2wPC_i": unPad16 error: Padding too long, padLen=49 > 16
OpenDir ".": invalid entry "KqQ346cuOAFHv_qSta5PhAwrongPattern": bad message
DecryptName "mzaZRF9_0IU-_5vv2wP_in": unPad16 error: Padding byte at i=10 is invalid
--- FAIL: TestBadname (0.11s)
cli_test.go:885: Case 5 failed: 'KqQ346cuOAFHv_qSta5P_invalid_file GOCRYPTFS_BAD_NAME' in [file_invalid_file GOCRYPTFS_BAD_NAME,file,mzaZRF9_0IU-_5vv2wPC_invalid_file GOCRYPTFS_BAD_NAME,file GOCRYPTFS_BAD_NAME,�*A���y���Gfnvalid_file GOCRYPTFS_BAD_NAME,mzaZRF9_0IU-_5vv2wP_invalid_file GOCRYPTFS_BAD_NAME]
Invalid cipherdir: directory /var/tmp/gocryptfs-test-parent-1026/114471933/TestInitNotEmpty not empty
FAIL
FAIL github.com/rfjakob/gocryptfs/tests/cli 4.817s
|
|
|
|
We normally should not need it, warn if we do.
As the tests run with -wpanic, we would catch it.
|
|
|
|
https://github.com/rfjakob/gocryptfs/issues/590
|
|
|
|
"make ci" almost made me lose the new quirks files.
Let's not do that anymore.
|
|
We need to look at f_fstypename acc. to
https://stackoverflow.com/a/52299141/1380267 :
> As filesystem type numbers are now assigned at runtime in
> recent versions of MacOS, you must use f_fstypename to
> determine the type.
https://github.com/rfjakob/gocryptfs/issues/585
|
|
|
|
Our multipleStrings type is now built in.
|
|
|
|
The autoformatter now always wants to move the ensurefds012
import into the import block. Accept it and fix the spelling
of "alphabetically".
|
|
Need support for flags at any position for
https://github.com/rfjakob/gocryptfs/issues/590
|
|
No need to have it declared globally.
|
|
This also moves the quirks logic into fusefrontend.
Fixes https://github.com/rfjakob/gocryptfs/issues/585
|
|
Let's not crash anymore when we see inode number 1
( https://github.com/hanwen/go-fuse/commit/0aaef6dde4b62dd0f21d545c5001d9e5ece0c87e )
https://github.com/rfjakob/gocryptfs/issues/585
|
|
|
|
Use the Gen field (inode generation) to distinguish hard links
while passing the real inode numbers to userspace.
Fixes https://github.com/rfjakob/gocryptfs/issues/584
|
|
https://github.com/rfjakob/gocryptfs/issues/584
|
|
Error handling was missing here, so we would later get confusing
EBADF errors due to dirfd being -1.
|
|
Fixes https://github.com/rfjakob/gocryptfs/issues/587
|
|
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)
|
|
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
|
|
Add Github Actions and delete defunct Travis CI.
|
|
Passing a relative path was broken because we cd'ed
away first.
|
|
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
|
|
Related: https://github.com/rfjakob/gocryptfs/issues/571
|
|
|
|
Not called by anybody.
|
|
From >6 to <1 second.
|
|
|
|
|
|
|
|
|
|
|
|
openBackingDir will be removed.
Also, remove leftover debug printfs.
|
|
openBackingDir will be removed.
|
|
|
|
|
|
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
|
|
|
|
|
|
Useless layer of indirection.
|
|
TestZerokey verifies that `gocryptfs -zerokey` uses the same options as
`gocryptfs -init`.
|
|
The startup debug output was very verbose but still missing some
effective crypto settings.
|
|
This means we can unexport the field.
|
|
|
|
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"
]
}
|
|
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.
|
|
|