Age | Commit message (Collapse) | Author |
|
This makes sure writing to a file fails early if the underlying
filesystem does not support fallocate. It also prevents partial header
write due to ENOSPC.
|
|
Prevent the case that we run out of space in the middle of
writing a block - that would leave a corrupt block behind.
|
|
go get github.com/remyoudompheng/go-misc/deadcode
|
|
Move all the intelligence into the new file address_translation.go.
That the calculations were spread out too much became apparent when adding
the file header. This should make the code much easier to modify in the
future.
|
|
Format: [ "Version" uint16 big endian ] [ "Id" 16 random bytes ]
Quoting SECURITY.md:
* Every file has a header that contains a 16-byte random *file id*
* Each block uses the file id and its block number as GCM *authentication data*
* This means the position of the blocks is protected as well. The blocks
can not be reordered or copied between different files without
causing an decryption error.
|
|
|
|
Futimes() only takes microsecond resolution while the FUSE call
Utimens() wants nanosecond precision.
This is why UTIME_OMIT did not work - this change fixes the
xfstests generic/258 test failure.
The go library does not provide a FutimesNano() function which is
why I use UtimesNano() on /proc/self/fd/n.
This is what the Go library does in Futimes().
|
|
The implementation was incomplete, disable fallocate completely for now.
See https://github.com/rfjakob/gocryptfs/issues/1
Fixes xfstests generic/075
|
|
The bug was caused by using cipherOff where plainOff should
have been used.
Renamed the symbols for less confusion.
|
|
|
|
Uncovered by running xfstests generic/014 several times
|
|
|
|
"Offset" is unclear whether it is an offset from the start of file
or start of block. "Skip" seems much better.
|
|
Cuts down the runtime of xfstests generic/014
from 1822 seconds to 36 seconds
|
|
Fixes TestFileHoles test
|
|
The actual fix is
oldSize := f.cfs.PlainSize(uint64(fi.Size()))
the rest is logging improvements
|
|
Makes the log output smaller and more readable.
|
|
|
|
|
|
|
|
|
|
The too-large reported value broke mmap
(applications saw appended zero bytes)
Also
* Add locking for all fd operations
* Add "--debug" command line switch
|
|
Also, re-enable openssl and disable debug messages so testing
gocryptfs is less painful
|
|
|
|
|
|
|
|
Fix issues in read and write paths.
Now passes selftest.
|
|
Currently fails main_test.go, will be fixed in part II
|