Commit Graph

496 Commits

Author SHA1 Message Date
c082b857cb Update de.po
typo
2017-08-05 10:28:04 +02:00
9e55fd35bd Merge pull request #262 from Sceptive/master
Added Camellia support with 128/196/256 bits key size support
2017-08-04 00:35:06 -07:00
cb954aeae5 Merge pull request #364 from vgough/lint-fixes
Lots of lint fixes from clang-tidy
2017-08-04 00:03:45 -07:00
f953a87c66 disable some lint checks 2017-08-03 23:26:32 -07:00
c947c684c7 lint: misc cleanup, including possible NPE 2017-08-03 23:26:12 -07:00
d7852e6f56 modernize: braces around statements 2017-08-03 22:46:34 -07:00
f9d22c4f18 modernize: unindent else after return 2017-08-03 22:43:14 -07:00
c37ab8e671 modernize: explicit conversions, braces around blocks 2017-08-03 22:42:39 -07:00
7a4e0c41db modernize: use override, using aliases 2017-08-03 22:27:18 -07:00
71e2bcc84d modernize: =default, pass by value 2017-08-03 22:18:25 -07:00
169101c80b modernize: use bool literals, raw string literal 2017-08-03 22:10:25 -07:00
5a99506ea8 modernize: use C++ headers, auto, make_shared 2017-08-03 22:00:32 -07:00
b04c4124d4 modernize-use-nullptr: replace NULL, 0 with nullptr 2017-08-03 21:42:30 -07:00
96b3f8c38d Merge pull request #363 from vgough/clang-tidy-build
add clang-tidy build support
2017-08-03 21:31:08 -07:00
fea77bad4e add clang-tidy build support 2017-08-03 21:27:47 -07:00
22a88c0e48 Drop unmount logic from test.sh
Unmounting leftover mounts is a convenience function for developers,
but it would need to be expanded to work on MacOS and FreeBSD, which
adds more complexity.

Let's keep test.sh at the bare minimum that is needed for its purpose:
running the tests.
2017-08-01 20:39:31 +02:00
9e394a46c0 Drop cmake test logic and just run test.sh
We had the situation that "make test" runs the test suite but does not
show useful error messages (see
https://github.com/vgough/encfs/issues/358 for an example).

"make check" did the right thing by using the "--output-on-failure"
feature, but depended on "make test" being available as well. This
means users will continue to run "make test".

This commits drops the cmake test logic and adds a dumb "make test"
target that simply runs test.sh.
2017-07-30 21:15:37 +02:00
f6a3838e60 Fix xattr behavoir on symlinks
* Make all xattr operations on link themselves
* Be sure to test links and not their target
* Add extended attributes tests
2017-07-30 20:26:42 +02:00
8a2c03d8a9 travis ci: enable gcc, call build.sh && test.sh
gcc is default compiler on most distributions, we should
also test with it.

build.sh exists and should be tested as well, so why not use
it in Travis.
test.sh outputs much more details than "make check", so
run it as well.

Additionally, make build.sh and test.sh work when called from
other directories.
2017-07-29 21:53:34 +02:00
6ed2001c2e travis ci: upgrade to trusty, use system cmake
On July 18, Travis upgraded their default build VM
to Ubuntu Trusty. Trusty has cmake 3.5.1, which allows us to
drop our bundled version.

We explicitely set "dist: trusty" to prevent our build jobs
from being routed to an older build VM.
2017-07-29 19:43:03 +02:00
779b69208a Use PROGRAMS to install encfssh with executable permissions 2017-07-28 09:04:34 +02:00
514bfd34da Update changelog + bump version for v1.9.2 v1.9.2 2017-07-25 20:26:45 +02:00
9ed8d704dd eraseNode: erase the right FileNode
When a file is opened twice concurrently, we can end up with
two separate FileNodes for a single path.

This seems to be the root cause for the crashes reported under
https://github.com/vgough/encfs/issues/214 , as commit

  af64702dd0
  "Simplify FileNode Cache. Remove the need for PlaceHolder."

removed the awareness for different FileNodes.

The crashes have been fixed by

  e2f0f8e3c6
  "fuseFhMap: translate FUSE file handles to FileNode pointers"

at the cost of introducing a memory leak. One of the two FileNodes
would stay in fuseFhMap forever.

This commit makes eraseNode again aware of different FileNodes for
a single path, makes sure the right FileNode is erased, and fixes
the memory leak.
2017-07-25 09:53:02 +02:00
e2f0f8e3c6 fuseFhMap: translate FUSE file handles to FileNode pointers
Previously, we used raw pointers to the FileNode as FUSE file handles.

With this change, we instead pass an arbitrary value (a uint64 counter)
to the kernel as FUSE file handle, and use the "fuseFhMap" look-up table
to convert back to the FileNode pointer.

This gets rid of a lot of scary void pointer casts. The performance
cost is not measurable.
2017-07-24 22:41:35 +02:00
9a4ea2007f withFileNode: move canary check to its own function
The do_op closure is complicated enough. Get the canary check out
of the way to not make it even more complicated.

Also, use an explicitely atomic type for the canary.
2017-07-22 21:11:41 +02:00
d2ee96d2bd tests: print "mode=standard", "mode=paranoia" progress
We run through everything in normal.t.pl two times, once
in "standard" mode and once in "paranoia" mode. Print some
context. Also, bail out if file creation fails.

Output now looks like this:

$ ./test.sh
tests/normal.t.pl ...
runTests: mode=standard
tests/normal.t.pl ... 54/116
runTests: mode=paranoia
tests/normal.t.pl ... ok
tests/reverse.t.pl .. ok
All tests successful.
Files=2, Tests=141, 21 wallclock secs ( 0.04 usr  0.00 sys + 20.03 cusr  0.36 csys = 20.43 CPU)
Result: PASS
2017-07-22 19:05:33 +02:00
282df21a49 DirNode: add a few comments
...to make the code easier to understand.

No code changes!
2017-07-22 12:40:28 +02:00
30000d8e2c tests: add fsstress-encfs.sh stress test
Mount an EncFS filesystem in /tmp and run fsstress against it
in an infinite loop, only exiting on errors.

Ported over from gocryptfs
( ccf1a84e41/tests/stress_tests/fsstress-gocryptfs.bash )
2017-07-21 23:30:53 +02:00
3bfaf792e6 writeV6Config: cast booleans to int
The tinyxml2 library used by Arch Linux represents
booleans as "true" and "false" instead of "0" and "1".

These fail to load when read back later and will always be
interpreted as false, as seen in
https://github.com/vgough/encfs/issues/343 .

Cast the booleans to int to force representation
as "0" and "1" in all tinyxml2 variants.
2017-07-19 22:57:35 +02:00
64b01a0869 tests: check if the second mount works as well
Should prevent things like https://github.com/vgough/encfs/issues/343
from happening again.
2017-07-19 22:57:35 +02:00
c8ff1f94e8 Add a canary value to FileNode
Adds a uint32 value to FileNode that is initialized to an
arbitrary value (CANARY_OK) in the constructor, and reset
when the reference is dropped (CANARY_RELEASED,
CANARY_DESTROYED).

The canary is checked on each withFileNode call.

Makes it much easier to trigger the bug seen in
https://github.com/vgough/encfs/issues/214 .
2017-07-19 22:57:35 +02:00
319f7b4525 tests: circleci: drop fuse tests
circleci does not support fuse. Just run checkops.
2017-06-25 18:37:08 +02:00
d75851d339 Accept netbsd's librefuse as a FUSE library 2017-06-25 13:47:26 +02:00
8d8506f2eb Correctly detect attr binary during tests 2017-06-25 13:22:45 +02:00
d216cc4208 Improve auto unmount 2017-06-10 18:51:15 +02:00
8cc6639f64 Make CircleCI run make check 2017-05-28 17:45:24 +02:00
ea67ef11f5 Add check for reading the configuration from a pipe 2017-05-28 16:24:35 +02:00
59378ae7fe Read config into memory and pass its content to tinyxml2 (#253)
tinyxml2 does not support to read from a named pipe, since it uses seek to
figure out the file size. In the case of a pipe this is not possible.

Reading the file content into memory and passing the content to tinyxml2 allows
to mitigate this problem.
2017-05-28 16:24:35 +02:00
f75854cd31 Update cmake (#309)
* Update cmake

* Update cmake, make Travis use it

* Enable all tests in a single command : make check

* Make cmake flawlessly run with Debian jessie cmake 3.0.2

* Make Travis use our own cmake 3.0.2 compiled version

* Typo in preferred version

* Be sure travis will have gettext
2017-05-28 16:20:21 +02:00
c270963df8 Use INITIALIZE_EASYLOGGINGPP in Error.cpp 2017-04-23 14:21:36 +02:00
fc39c4dd20 Delete grow() test file
so that next tests do not depend on it
2017-04-13 20:20:57 +02:00
c68c130724 Add option 't' to set syslog tag 2017-04-02 23:52:29 +02:00
b1a7e0ff5e Remove timestamp from loglines
when syslog is used
2017-04-02 23:52:29 +02:00
42ef6ee0c7 Update easylogging++ to v9.94.1 2017-04-02 19:31:05 +02:00
7295b3369b Check that llistxattr exists (#307)
This PR solves
https://github.com/vgough/encfs/issues/305 "llistxattr breaks compilation on Mac OS X"
checking whether llistxattr exists or not.
2017-04-01 19:58:05 +02:00
7cc6efa60c Display default yes/no choice when creating initial directories
Currently the text displayed is

    The directory "..." does not exist. Should it be created? (y,n)

This patch changes it to

    The directory "..." does not exist. Should it be created? (y,N)
2017-03-25 13:55:53 +01:00
e4d1679c10 Fixed Typo (#304) 2017-03-25 13:50:56 +01:00
a17f7366c2 Fix up encfssh (#258)
* Fix up encfssh

The original implementation of encfssh had several issues:

- Could not safely handle directory names with spaces
- Could not safely handle paths starting with a dash (`-`)
- Option strings could not be passed with spaces
- Could print incorrect help based on filenames in current directory
- Used `test` syntax deprecated in current POSIX.2 standard
- Had shell injection vulnerabilities based on both current working directory
  and mount-point directory names.
- Failures of the canonicalize function could silently return the current
  directory rather than the target.

In this version, shell injection is only permitted through the (explicitly
defined) `FUSE_UMOUNT` mechanism.

This version also adds support for the GNU-style "--help" argument.
2017-03-16 22:21:02 +01:00
618db2374c Get idle counters at once (#294)
to avoid a race with usage==0 & openCount>0
2017-03-10 08:47:04 +01:00
efbdd29716 Allow read/write in standard reverse mode (#301) 2017-03-09 22:56:37 +01:00