From d5133ca5ac4f241ff22ef145a3605a9fdb341bb6 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Thu, 27 Jul 2017 20:31:22 +0200 Subject: fusefrontend_reverse: return ENOENT for undecryptable names This was working until DecryptName switched to returning EBADMSG instead of EINVAL. Add a test to catch the regression next time. --- internal/fusefrontend_reverse/rpath.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/fusefrontend_reverse/rpath.go') 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 -- cgit v1.2.3