aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-04-02fsck: clean up log outputJakob Unterwurzacher
Make sure we get only 1 warning output per problem. Also, add new corruption types to broken_fs_v1.4.
2018-04-02fsck: sort files alphabeticallyJakob Unterwurzacher
This makes fsck runs deterministic.
2018-04-02fsck: add initial implementationJakob Unterwurzacher
Most corruption cases except xattr should be covered. With test filesystem. The output is still pretty ugly. xattr support will be added in the next commits.
2018-04-01fusefronted: reject oversized Read and Write requestsJakob Unterwurzacher
This should not happen via FUSE as the kernel caps the size, but with fsck we have the first user that calls Read directly. For symmetry, check it for Write as well.
2018-04-01main: move getMasterKey into initFuseFrontendJakob Unterwurzacher
This is where the results are used, so call it there. This simplifies doMount a bit because we can get rid of the block protecting masterkey.
2018-04-01main: move masterkey logic into new helper getMasterKeyJakob Unterwurzacher
The new helper will also be used by fsck.
2018-04-01tests: add a few explicit file Close() in matrix_testJakob Unterwurzacher
These can cause EBUSY errors when unmounting.
2018-04-01main: add "-fsck" flagJakob Unterwurzacher
The fsck operation is not yet implemented, this commits just adds the flag and improves cli flag handling.
2018-04-01main: move and rename checkDir*() helperJakob Unterwurzacher
To avoid confusion with fsck, rename to isDir*() and move the functions into init_dir.go.
2018-04-01main: pull regular exits into main functionJakob Unterwurzacher
The replaces the "does not return" comments with an explicit os.Exit, which is unambigous.
2018-03-28Switch from private copy to pkg/xattrJakob Unterwurzacher
Now that https://github.com/pkg/xattr/pull/24 has been merged there is no reason to keep our private copy. Switch to the upstream version.
2018-03-26dep: add xattr dependencyJakob Unterwurzacher
Also, clear out Gopkg.toml. Everything is unconstrained anyway, so make it an empty file. Seems to work fine.
2018-03-26tests: replace xattr.SupportedJakob Unterwurzacher
This function has been deprecated by the pkg/xattr upstream, so write our own.
2018-03-25fusefrontend: handle empty xattrs efficientlyJakob Unterwurzacher
We handle empty files by storing an actual empty file on disk. Handle xattrs similarily and encrypt the empty value to the empty value.
2018-03-25fusefrontend: add xattr supportJakob Unterwurzacher
At the moment, only for reverse mode. https://github.com/rfjakob/gocryptfs/issues/217
2018-03-24test_helpers: add SwitchTestParentDirJakob Unterwurzacher
SwitchTestParentDir changes testParentDir. This is used when you want to perform tests on a special filesystem. For example, the xattr tests cannot run on tmpfs and use /var/tmp instead of /tmp.
2018-03-24fusefrontend: create helpers for symlink encryptionJakob Unterwurzacher
These will be reused by the upcoming xattr support.
2018-03-22Add `-masterkey=stdin` functionalityJakob Unterwurzacher
https://github.com/rfjakob/gocryptfs/issues/218
2018-03-18Update depsv1.4.4Jakob Unterwurzacher
We need the bugfix in go-fuse
2018-03-18Update Changelog for v1.4.4Jakob Unterwurzacher
2018-03-13tests: extractloop.sh: better cleanup logic, handle missing /procJakob Unterwurzacher
macos does not have /proc, so don't try to read it.
2018-03-13tests: extractloop.sh: don't abort if md5sum is missingJakob Unterwurzacher
MacOS does not have it installed by default.
2018-03-07macos: extractloop.sh: exclude symlink & mute ln error messageJakob Unterwurzacher
Extracting the symlink fails with linux-3.0/arch/microblaze/boot/dts/system.dts: Can't set permissions to 0755 so just exclude it. The ln error Looks scary but is harmless, so get rid of it. The symlink is only created to make it more convenient to view the csv log.
2018-03-07macos: tests: make extractloop.bash work on macosJakob Unterwurzacher
macos' bash and ln lack a few features we used.
2018-03-07tests: convert remaining wget calls to dl-linux-tarball.bash helperJakob Unterwurzacher
Makes the scripts work when wget is not available (macos)
2018-03-07macos: tests: use curl of wget is not availableJakob Unterwurzacher
2018-03-06tests: exit with error if we have leftover filesystemsJakob Unterwurzacher
2018-03-06tests: macos: try to unmount before rm -RfJakob Unterwurzacher
macos does not have "rm --one-file-system", so try to unmount all remaining test filesystems to protect the backing stores. https://github.com/rfjakob/gocryptfs/issues/213
2018-03-06tests: drop "-z" from fusermount to catch forgotten fdsJakob Unterwurzacher
macos does not have lazy unmount, so let's not use it on linux either. If the unmount fails, run "lsof" to find the open file. Also fix the first bug we found this way.
2018-03-05macos: tests: fix deleting of scratch dirJakob Unterwurzacher
macos rm does not understand --one-file-system, and it cannot handle unreadable directories.
2018-03-05macos: fix fd leak in reverse testsJakob Unterwurzacher
Causes "Resource busy" unmount failures on macos
2018-03-05tests: matrix_test: skip cases when without_openssl is setJakob Unterwurzacher
Fixes test-without-openssl.bash.
2018-03-05test_helpers: add missing newlineJakob Unterwurzacher
2018-03-05test.bash: Don't build with openssl if we were passed "-tags without_openssl"Jakob Unterwurzacher
test-without-openssl.bash now fails, as it should: gocryptfs has been compiled without openssl support but you are still trying to use openssl mount failed: exit status 18 FAIL github.com/rfjakob/gocryptfs/tests/matrix 1.943s
2018-03-05macos: doTestUtimesNano: skip UTIME_OMIT and nanoseconds testcasesJakob Unterwurzacher
Not supported on macos. Beef up the first test case a little by using different second values.
2018-03-05tests: TestUtimesNano: replace ugly compareUtimes wrapperJakob Unterwurzacher
2018-03-05tests: fix a few fd leaksJakob Unterwurzacher
We relied on the finalizer to close a few fds. For some reason, this did not cause problems on Linux, but on MacOS, it causes unmount failures: umount(/private/tmp/gocryptfs-test-parent/194654785/default-plain): Resource busy -- try 'diskutil unmount'
2018-03-05test-without-openssl: accept extra argsJakob Unterwurzacher
Accept extra args, like test.bash does.
2018-03-05macos: skip TestUtimesNanoSymlink earlyJakob Unterwurzacher
Gets rid of the touch error message upon running the tests.
2018-03-05macos: adjust TestTooLongSymlink length for darwinJakob Unterwurzacher
Limit is much lower than on linux
2018-03-05macos: fix second TestEmulateSymlinkat test failureJakob Unterwurzacher
2018-03-05test.bash: skip flock if not availableJakob Unterwurzacher
MacOS does not have it installed by default.
2018-02-28MacOS: skip TestUtimesNanoSymlink and TestUtimesNanoFdJakob Unterwurzacher
These cannot work on MacOS.
2018-02-28MacOS: don't test symlinks longer than 1000 bytesJakob Unterwurzacher
The limit is much lower than on Linux. https://github.com/rfjakob/gocryptfs/issues/213
2018-02-28MacOS: fix TestEmulateSymlinkat test failureJakob Unterwurzacher
On MacOS, symlinks don't have their own permissions, so don't check for them.
2018-02-28test_helpers: use an intermediate pipe for subprocess stdoutJakob Unterwurzacher
To Go test logic waits for stderr and stdout to close, so when we share it with a subprocess, it will wait for it to exit as well. We don't want the tests to hang when the unmount fails. Seen on MacOS as reported at https://github.com/rfjakob/gocryptfs/issues/213
2018-02-28tlog: stop embedding log.Logger to prevent mistakesJakob Unterwurzacher
A few places have called tlog.Warn.Print, which directly calls into log.Logger due to embedding, losing all features of tlog. Stop embedding log.Logger to make sure the internal functions cannot be called accidentially and fix (several!) instances that did.
2018-02-27travis ci: switch to "1.10.x" notationJakob Unterwurzacher
"1.10" does not work as expected because it is parsed as a floating point number: https://github.com/travis-ci/travis-ci/issues/9247 Added benefit is that we always get the latest point release.
2018-02-27travis ci: run on Go 1.10Jakob Unterwurzacher
2018-02-27ctlsock: don't Warn() on closed socketJakob Unterwurzacher
This Warn() is causing panics in the test suite on MacOS: https://github.com/rfjakob/gocryptfs/issues/213