Commit Graph

32 Commits

Author SHA1 Message Date
Jakob Unterwurzacher
89fef80d32 Run go fmt 2015-10-04 14:49:47 +02:00
Jakob Unterwurzacher
c859f0b2dc intraBlock: Rename Offset to Skip
"Offset" is unclear whether it is an offset from the start of file
or start of block. "Skip" seems much better.
2015-10-04 14:24:43 +02:00
Jakob Unterwurzacher
5229b8f5f5 Add BlockNoPlainOff() and BlockNoCipherOff() + test
Also, fix key, it is now []byte, not [16]byte
2015-10-04 11:03:40 +02:00
Jakob Unterwurzacher
40448db909 Fix xfstests generic/030 failure
The actual fix is

	oldSize := f.cfs.PlainSize(uint64(fi.Size()))

the rest is logging improvements
2015-10-04 00:26:20 +02:00
Jakob Unterwurzacher
79870ab096 debug: log inode number instead of encrypted filename
Makes the log output smaller and more readable.
2015-10-03 19:16:34 +02:00
Jakob Unterwurzacher
38bf8a2fcf Implement file hole passtrough
Fixes xfstests generic/010

Note that file holes are not authenticated,
2015-10-03 13:34:33 +02:00
Jakob Unterwurzacher
b835f83fd5 Implement Truncate() + Test 2015-09-30 22:36:53 +02:00
Jakob Unterwurzacher
061831edf2 DecryptBlocks: Don't shadow err variable 2015-09-30 20:31:41 +02:00
Jakob Unterwurzacher
0af3cfcac0 Fix symlink size reporting 2015-09-16 19:32:37 +02:00
Jakob Unterwurzacher
3a2610a141 symlink encryption: pass ".." and "." through unchanged
This fixes relative symlinks:

$ tar xf linux-4.2.tar.gz
tar: linux-4.2/tools/testing/selftests/powerpc/vphn/vphn.h: Cannot utime: No such file or directory
tar: linux-4.2/tools/testing/selftests/powerpc/vphn/vphn.c: Cannot utime: No such file or directory
tar: linux-4.2/tools/testing/selftests/powerpc/stringloops/memcmp_64.S: Cannot utime: No such file or directory
tar: linux-4.2/tools/testing/selftests/powerpc/primitives/word-at-a-time.h: Cannot utime: No such file or directory
tar: linux-4.2/tools/testing/selftests/powerpc/primitives/asm/asm-compat.h: Cannot utime: No such file or directory
tar: linux-4.2/tools/testing/selftests/powerpc/copyloops/memcpy_power7.S: Cannot utime: No such file or directory
tar: linux-4.2/tools/testing/selftests/powerpc/copyloops/memcpy_64.S: Cannot utime: No such file or directory
tar: linux-4.2/tools/testing/selftests/powerpc/copyloops/copyuser_power7.S: Cannot utime: No such file or directory
tar: linux-4.2/tools/testing/selftests/powerpc/copyloops/copyuser_64.S: Cannot utime: No such file or directory
tar: linux-4.2/arch/powerpc/boot/dts/include/dt-bindings: Cannot utime: No such file or directory
tar: linux-4.2/arch/mips/boot/dts/include/dt-bindings: Cannot utime: No such file or directory
tar: linux-4.2/arch/metag/boot/dts/include/dt-bindings: Cannot utime: No such file or directory
tar: linux-4.2/arch/arm64/boot/dts/include/dt-bindings: Cannot utime: No such file or directory
tar: linux-4.2/arch/arm/boot/dts/include/dt-bindings: Cannot utime: No such file or directory
tar: Exiting with failure status due to previous errors
2015-09-16 18:43:07 +02:00
Jakob Unterwurzacher
fdc0fef6ee Use MarshalIndent for JSON generation 2015-09-14 00:45:41 +02:00
Jakob Unterwurzacher
6f9e90c414 Encrypt key with scrypt-hashed password 2015-09-13 22:09:38 +02:00
Jakob Unterwurzacher
4acaeb668e Implement json config storage (not yet encrypted) 2015-09-13 17:55:07 +02:00
Jakob Unterwurzacher
e7ba3c61f1 Fix File.GettAttr() size reporting
The too-large reported value broke mmap
(applications saw appended zero bytes)

Also
* Add locking for all fd operations
* Add "--debug" command line switch
2015-09-09 19:32:59 +02:00
Jakob Unterwurzacher
80935a0e1b Explain both frontends in readme
Also, re-enable openssl and disable debug messages so testing
gocryptfs is less painful
2015-09-08 23:09:28 +02:00
Jakob Unterwurzacher
bfdbbbf8b4 Fix panic on absolute symlink 2015-09-08 22:53:06 +02:00
Jakob Unterwurzacher
28cdff5889 tests: add TestCiphertextRange 2015-09-08 22:36:38 +02:00
Jakob Unterwurzacher
1ca4fc89aa More debug logging, improve main_test.go (do not use all-zero content) 2015-09-08 22:03:27 +02:00
Jakob Unterwurzacher
caaad7c8d7 Add pathfs frontend, part II
Fix issues in read and write paths.
Now passes selftest.
2015-09-08 21:35:06 +02:00
Jakob Unterwurzacher
889ae90081 Add pathfs frontend (uses go-fuse instead of bazil-fuse), part I
Currently fails main_test.go, will be fixed in part II
2015-09-08 00:55:03 +02:00
Jakob Unterwurzacher
b65882985d Add tests for name encryption and byte range splitting 2015-09-07 21:25:05 +02:00
Jakob Unterwurzacher
58d1e24b7c Add OpenSSL support for file content encryption/decryption
This brings streaming read performance from 30MB/s to 81MB/s
(similar improvement for writes)
2015-09-06 10:42:34 +02:00
Jakob Unterwurzacher
448e88490b Bundle up blocks for bigger reads from the backing filesystem 2015-09-06 09:47:01 +02:00
Jakob Unterwurzacher
d0524ded99 Use Debug object instead of fmt 2015-09-05 20:36:26 +02:00
Jakob Unterwurzacher
11fb037e7e Cleanup and rename files 2015-09-05 20:30:20 +02:00
Jakob Unterwurzacher
7e564f928f Fix size reporting 2015-09-05 20:11:20 +02:00
Jakob Unterwurzacher
199d3fd79f Fix write path 2015-09-05 19:07:20 +02:00
Jakob Unterwurzacher
4ab9862ccb Fix read path 2015-09-05 14:08:00 +02:00
Jakob Unterwurzacher
05a5c0a0ff Wrap cluefs part I 2015-09-05 11:49:05 +02:00
Jakob Unterwurzacher
6f90ec716a Rebase to cluefs
https://github.com/airnandez/cluefs
2015-09-04 20:37:37 +02:00
Jakob Unterwurzacher
4b98f74e3e Builds and mounts 2015-09-03 19:27:07 +02:00
Jakob Unterwurzacher
f8fddff769 Split into FS and File 2015-09-03 19:09:11 +02:00