summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbenchmark.bash2
-rw-r--r--internal/fusefrontend_reverse/rpath.go2
-rw-r--r--tests/reverse/correctness_test.go10
3 files changed, 12 insertions, 2 deletions
diff --git a/benchmark.bash b/benchmark.bash
index 8bc6abb..ec969df 100755
--- a/benchmark.bash
+++ b/benchmark.bash
@@ -67,7 +67,7 @@ if [[ $OPT_ENCFS -eq 1 ]]; then
exit 1
fi
echo "Testing EncFS at $CRYPT"
- encfs --extpass="echo test" --standard $CRYPT $MNT > /dev/null
+ /home/jakob.donotbackup/encfs/build/encfs --extpass="echo test" --standard $CRYPT $MNT > /dev/null
else
echo "Testing gocryptfs at $CRYPT"
gocryptfs -q -init -extpass="echo test" -scryptn=10 $CRYPT
diff --git a/internal/fusefrontend_reverse/rpath.go b/internal/fusefrontend_reverse/rpath.go
index 58e8c91..6f6895a 100644
--- a/internal/fusefrontend_reverse/rpath.go
+++ b/internal/fusefrontend_reverse/rpath.go
@@ -46,7 +46,7 @@ func (rfs *ReverseFS) rDecryptName(cName string, dirIV []byte, pDir string) (pNa
// Stat attempts on the link target of encrypted symlinks.
// These are always valid base64 but the length is not a
// multiple of 16.
- if err == syscall.EINVAL {
+ if err == syscall.EBADMSG {
return "", syscall.ENOENT
}
return "", err
diff --git a/tests/reverse/correctness_test.go b/tests/reverse/correctness_test.go
index bfbab3d..a5719eb 100644
--- a/tests/reverse/correctness_test.go
+++ b/tests/reverse/correctness_test.go
@@ -130,3 +130,13 @@ func TestAccessVirtual(t *testing.T) {
t.Errorf("should NOT be executable")
}
}
+
+// Opening a nonexistant file name should return ENOENT
+// and not EBADMSG or EIO or anything else.
+func TestEnoent(t *testing.T) {
+ fn := dirB + "/TestEnoent"
+ _, err := syscall.Open(fn, syscall.O_RDONLY, 0)
+ if err != syscall.ENOENT {
+ t.Errorf("want ENOENT, got: %v", err)
+ }
+}