aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend/fs.go
AgeCommit message (Collapse)Author
2017-03-18serialize_reads: add read serialization logicJakob Unterwurzacher
Due to kernel readahead, we usually get multiple read requests at the same time. These get submitted to the backing storage in random order, which is a problem if seeking is very expensive. Details: https://github.com/rfjakob/gocryptfs/issues/92
2017-03-05nametransform: fix Raw64 not affecting symlink targetsJakob Unterwurzacher
The symlink functions incorrectly hardcoded the padded base64 variant.
2017-03-05full stack: implement HKDF supportJakob Unterwurzacher
...but keep it disabled by default for new filesystems. We are still missing an example filesystem and CLI arguments to explicitely enable and disable it.
2017-03-05cryptocore: use eme v1.1 interfaceJakob Unterwurzacher
Version 1.1 of the EME package (github.com/rfjakob/eme) added a more convenient interface. Use it. Note that you have to upgrade your EME package (go get -u)!
2017-03-02fusefrontend: when chown'ing a directory, also chown its dirivJakob Unterwurzacher
When filename encryption is active, every directory contains a "gocryptfs.diriv" file. This file should also change the owner. Fixes https://github.com/rfjakob/gocryptfs/issues/86
2017-01-26fusefrontend: fix hard-linking with long nameJakob Unterwurzacher
This used to incorrectly try to link twice and return EEXIST.
2016-11-28fusefrontend: preserve owner for symlinksJakob Unterwurzacher
https://github.com/rfjakob/gocryptfs/issues/64
2016-11-28fusefronted: preserve owner for device nodes and socketsJakob Unterwurzacher
https://github.com/rfjakob/gocryptfs/issues/64
2016-11-28fusefrontend: use Lchown when preserving ownerJakob Unterwurzacher
This prevents (unlikely) symlink race attacks
2016-11-25main, fusefrontend: add "-noprealloc" optionJakob Unterwurzacher
Preallocation is very slow on hdds that run btrfs. Give the user the option to disable it. This greatly speeds up small file operations but reduces the robustness against out-of-space errors. Also add the option to the man page. More info: https://github.com/rfjakob/gocryptfs/issues/63
2016-11-01Add support for unpadded base64 filenames, "-raw64"Jakob Unterwurzacher
Through base64.RawURLEncoding. New command-line parameter "-raw64".
2016-10-10fusefrontend: Also preserve the owner in MkdirJakob Unterwurzacher
This already worked for files but was missing for dirs.
2016-10-04lint fixesValient Gough
2016-09-29reverse: use per-purpose nonce generationJakob Unterwurzacher
Also pull all the deterministic nonce code into fusefrontend_reverse to greatly simplify the normal code path.
2016-09-25contentenc: rename constant "IVBitLen" to "DefaultIVBits" and clarify commentJakob Unterwurzacher
128-bit IVs are NOT used everywhere.
2016-09-25contentenc: add "ExternalNonce" modeJakob Unterwurzacher
This will be used for strong symlink encryption in reverse mode.
2016-09-25fusefrontend: handle Readlink directlyJakob Unterwurzacher
Calling into go-fuse's loopbackFileSystem does not add any value here.
2016-09-25contentenc: add GCM-SIV supportJakob Unterwurzacher
Also add ReverseDummyNonce nonce generation.
2016-09-25cryptocore: add support for GCM-SIVJakob Unterwurzacher
2016-09-25fusefrontend: relay Utimens to go-fuseJakob Unterwurzacher
Commit af5441dcd9033e81da43ab77887a7b5aac693ab6 has caused a regression ( https://github.com/rfjakob/gocryptfs/issues/35 ) that is fixed by this commit. The go-fuse library by now has all the syscall wrappers in place to correctly handle Utimens, also for symlinks. Instead of duplicating the effort here just call into go-fuse. Closes #35
2016-08-09fusefrontend: use NsecToTimespec() for UtimensJakob Unterwurzacher
This fixes a build problem on 32-bit hosts: internal/fusefrontend/file.go:400: cannot use a.Unix() (type int64) as type int32 in assignment internal/fusefrontend/file.go:406: cannot use m.Unix() (type int64) as type int32 in assignment It also enables full nanosecond timestamps for dates after 1970.
2016-07-06Add godoc comments to all internal packagesJakob Unterwurzacher
2016-07-03syscallcompat: OSX: add Mknodat wrapperJakob Unterwurzacher
Protip: find naked *at syscalls using: git grep "syscall." | grep "at(" | grep -v syscallcompat
2016-07-03syscallcompat: OSX: add Unlinkat wrapperJakob Unterwurzacher
Also, replace remaining naked syscall.Openat calls.
2016-07-03fusefrontend: downgrade Renameat log message to debugJakob Unterwurzacher
2016-07-03syscallcompat: OSX: add Renamat wrapperJakob Unterwurzacher
Adds a poor man's renameat implementation for OSX.
2016-06-30fusefrontend: handle dir-overwrites-dir on XFSJakob Unterwurzacher
XFS returns a different error code if you try to overwrite a non-empty directory with a directory: XFS: mv: cannot move ‘foo’ to ‘bar/foo’: File exists ext4: mv: cannot move 'foo' to 'bar/foo': Directory not empty So have EEXIST trigger the Rmdir logic as well. Fixes issue #20 Link: https://github.com/rfjakob/gocryptfs/issues/20
2016-06-26main, fusefrontend: enable suid functionalityJakob Unterwurzacher
FUSE filesystems are mounted with "nosuid" by default. If we run as root, we can use device files by passing the opposite mount option, "suid". Also we have to use syscall.Chmod instead of os.Chmod because the portability translation layer "syscallMode" messes up the sgid and suid bits. Fixes 70% of the failures in xfstests generic/193. The remaining are related to truncate, but we err on the safe side: $ diff -u tests/generic/193.out /home/jakob/src/fuse-xfstests/results//generic/193.out.bad [...] check that suid/sgid bits are cleared after successful truncate... with no exec perm before: -rwSr-Sr-- -after: -rw-r-Sr-- +after: -rw-r--r--
2016-06-26fusefronted: preserve owner if running as rootJakob Unterwurzacher
If allow_other is set and we run as root, try to give newly created files to the right user.
2016-06-26fuserfrontend: support truncate(2) by wrapping ftruncate(2)Jakob Unterwurzacher
Support truncate(2) by opening the file and calling ftruncate(2) While the glibc "truncate" wrapper seems to always use ftruncate, fsstress from xfstests uses this a lot by calling "truncate64" directly.
2016-06-23Drop deprecated "-gcmiv128" optionJakob Unterwurzacher
The GCMIV128 feature flag is already mandatory, dropping the command line option is the final step. Completes https://github.com/rfjakob/gocryptfs/issues/29 .
2016-06-23Drop deprecated "-emenames" optionJakob Unterwurzacher
The EMENames feature flag is already mandatory, dropping the command line option is the final step.
2016-06-23Drop deprecated "-diriv" optionJakob Unterwurzacher
The DirIV feature flag is already mandatory, dropping the command line option is the final step.
2016-06-15Rename internal "toggledlog" package to "tlog"Jakob Unterwurzacher
tlog is used heavily everywhere and deserves a shorter name. Renamed using sed magic, without any manual rework: find * -type f -exec sed -i 's/toggledlog/tlog/g' {} +
2016-06-08fusefrontend: fix chown on dangling symlinksJakob Unterwurzacher
We (actually, go-fuse) used to call Chown() instead of Lchown() which meant that the operation would fail on dangling symlinks. Fix this by calling os.Lchown() ourself. Also add a test case for this.
2016-05-29fusefrontend: use sync.Once for one-time warningsJakob Unterwurzacher
Using a simple boolean was racy (which was harmless in this case) and non-idomatic.
2016-05-29fusefronted: check Fstat return value on file createJakob Unterwurzacher
The Fstat call should never fail, but still, if it does return an error it should be handled properly.
2016-05-12Encrypt path in statfs() callsDavid Gnedt
Paths in statfs() calls were not encrypted resulting in an Function not implemented error, when the unencrypted path didn't exist in the underlying (encrypted) filesystem. $ df plain/existingdir df: ‘plain/existingdir’: Function not implemented
2016-04-10Fix "go tool vet -shadow=true" warningsJakob Unterwurzacher
Among those one real bug.
2016-04-10longnames: fix fsstress failure, use dirfdJakob Unterwurzacher
Using dirfd-relative operations allows safe lockless handling of the ".name" files.
2016-02-07longnames part II: Rename, Unlink, Rmdir, Mknod, Mkdir + testsv0.9-rc1Jakob Unterwurzacher
2016-02-07Move OpenDir to fs_dir.goJakob Unterwurzacher
2016-02-06longnames part I: Create and OpenDir work with long filenames > 176 bytesJakob Unterwurzacher
Todo: Rename, Unlink, Rmdir, Mknod, Mkdir
2016-02-06Run go fmtJakob Unterwurzacher
2016-02-06Fix tests - were broken by the refactoringJakob Unterwurzacher
2016-02-06Move pathfs_frontend to internal/fusefrontendJakob Unterwurzacher
"git status" for reference: renamed: pathfs_frontend/args.go -> internal/fusefrontend/args.go renamed: pathfs_frontend/compat_darwin.go -> internal/fusefrontend/compat_darwin.go renamed: pathfs_frontend/compat_linux.go -> internal/fusefrontend/compat_linux.go renamed: pathfs_frontend/file.go -> internal/fusefrontend/file.go renamed: pathfs_frontend/file_holes.go -> internal/fusefrontend/file_holes.go renamed: pathfs_frontend/fs.go -> internal/fusefrontend/fs.go renamed: pathfs_frontend/fs_dir.go -> internal/fusefrontend/fs_dir.go renamed: pathfs_frontend/names.go -> internal/fusefrontend/names.go renamed: pathfs_frontend/write_lock.go -> internal/fusefrontend/write_lock.go modified: main.go