aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-06-07Set a default PATH if PATH is empty or unsetJulian Orth
mount(1) unsets PATH before calling mount.fuse. Therefore it's not set in gocrpytfs either and daemonization fails if gocryptfs was not executed via an absolute path. mount.fuse handles this by leaving the execution of the helper to /bin/sh. /bin/sh handles an empty PATH by searching a few default locations. This patch sets the PATH to a sane default if it's empty or unset.
2018-06-07main: accept -dev, -nodev, -suid, -nosuid, -exec, -noexecJakob Unterwurzacher
When mounted via /etc/fstab like this, /a /b fuse.gocryptfs default 0 0 we always get extra options passed. As reported by @mahkoh at https://github.com/rfjakob/gocryptfs/pull/233 : mount passes `-o noexec` if `-o user` is set and `-o exec` is not set. If both `-o user` and `-o exec` are set, it passes `-o exec`. Make these options work, and in addtion, also make -suid and -rw work the same way. Reported-by: @mahkoh
2018-06-05main: make prefixOArgs errors testableJakob Unterwurzacher
By returning an error instead of calling os.Exit, error cases can be tested easily. Error cases were not tested until now.
2018-05-27dep: update xattr dependencyJakob Unterwurzacher
We need LGet support from the newest release.
2018-05-27xattr: use LGet/LSet etcJakob Unterwurzacher
Support has been merged into the xattr package ( https://github.com/pkg/xattr/pull/29 ), use it.
2018-05-17tests: add "mv broken symlink" testJakob Unterwurzacher
This currently fails because we do not use llistxattr yet.
2018-05-15crossbuild.bash: call "set -x" lateJakob Unterwurzacher
Fedora 28 executes A LOT of stuff from /usr/share/Modules/ on bash startup. Having -x in the shebang means we see it all.
2018-05-15xattr: return EOPNOTSUPP for unsupported attributesJakob Unterwurzacher
mv is unhappy when we return EPERM when it tries to set system.posix_acl_access: mv: preserving permissions for ‘b/x’: Operation not permitted Now we return EOPNOTSUPP like tmpfs does and mv seems happy.
2018-05-10fsck: update testcases with binary xattrsJakob Unterwurzacher
2018-05-10xattr: optimize storage, store as binary instead of bae64Bolshevik
Values a binary-safe, there is no need to base64-encode them. Old, base64-encoded values are supported transparently on reading. Writing xattr values now always writes them binary.
2018-05-10stupidgcm: return error on too short input instead of panicingJakob Unterwurzacher
This is what Go GCM does as well.
2018-05-07xattr: added passing of a "flags" parameterBolshevik
Pass the "flags" parameter to the lower layer syscall. This makes Apple applications being able to successfully save data.
2018-05-07Updated dependencies.Bolshevik
2018-05-04tests: example_filesystems: create a private copy in /tmpJakob Unterwurzacher
The tests write to the example_filesystems folder, which 1) May leave your source tree in a modified state 2) Triggers test failures when the fsck tests run concurrently, which happens on Travis CI every now and then. Fix both problem by copying the example_filesystems folder to a private location in /tmp.
2018-05-01fusefrontend: xattr: return ENOSYS on unsupported flagsJakob Unterwurzacher
We previously returned EPERM to prevent the kernel from blacklisting our xattr support once we get an unsupported flag, but this causes lots of trouble on MacOS: Cannot save files from GUI apps, see https://github.com/rfjakob/gocryptfs/issues/229 Returning ENOSYS triggers the dotfiles fallback on MacOS and fixes the issue.
2018-04-27tests: helpers: fix a few error reportsJakob Unterwurzacher
These were using stale err values.
2018-04-17Improved xattr handling on non-linux systems (#227)bolshevik
* Fixed xattr filtering for MacOS. "system." and "user." prefixes are only relevant for Linux. * Small cleanup and additional tests.
2018-04-11daemonize: try /bin/logger if /usr/bin/logger failsJakob Unterwurzacher
SUSE has /bin/logger, everybody else has /usr/bin/logger, so try both. Fixes https://github.com/rfjakob/gocryptfs/issues/225
2018-04-08Fix the easy golint warningsJakob Unterwurzacher
Reported by https://goreportcard.com/report/github.com/rfjakob/gocryptfs
2018-04-08tests: retry umountJakob Unterwurzacher
Gnome may still have files open causing spurious test failures.
2018-04-07tests: cli_test: fix fd leakJakob Unterwurzacher
One fd leak found in TestMountBackground.
2018-04-07tests: matrix: check for fd leaksJakob Unterwurzacher
And fix two in test_helpers.Mount(). Leftover fds can cause an unmount failure like this later: fusermount: failed to unmount /tmp/gocryptfs-test-parent/873632270/default-plain: Device or resource busy so try to catch them early.
2018-04-03fsck: report skipped corrupt filesJakob Unterwurzacher
OpenDir and ListXAttr skip over corrupt entries, readFileID treats files the are too small as empty. This improves usability in the face of corruption, but hides the problem in a log message instead of putting it in the return code. Create a channel to report these corruptions to fsck so it can report them to the user. Also update the manpage and the changelog with the -fsck option. Closes https://github.com/rfjakob/gocryptfs/issues/191
2018-04-02fsck: add xattr supportJakob Unterwurzacher
With testcases.
2018-04-02fusefrontend: xattr: return ENODATA for security.* and system.*Jakob Unterwurzacher
"ls -l" queries security.selinux, system.posix_acl_access, system.posix_acl_default and throws error messages if it gets something else than ENODATA.
2018-04-02fsck: test against example_filesystemsJakob Unterwurzacher
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.