aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend_reverse/ctlsock_interface.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2018-02-01 23:46:02 +0100
committerJakob Unterwurzacher2018-02-01 23:50:11 +0100
commit9f8d0d8e5734e3771b52c8a8784ef5a76b0f9ca8 (patch)
tree7a09341b4bad590caa47e26ceaa8033e991a7dcf /internal/fusefrontend_reverse/ctlsock_interface.go
parent26ba8103bf2422493a01b57b8ee53aa9b1e867f7 (diff)
gccgo: replace syscall.NAME_MAX with unix.NAME_MAX
For some reason the syscall.NAME_MAX constant does not exist on gccgo, and it does not hurt us to use unix.NAME_MAX instead. https://github.com/rfjakob/gocryptfs/issues/201
Diffstat (limited to 'internal/fusefrontend_reverse/ctlsock_interface.go')
-rw-r--r--internal/fusefrontend_reverse/ctlsock_interface.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/fusefrontend_reverse/ctlsock_interface.go b/internal/fusefrontend_reverse/ctlsock_interface.go
index 5f61f37..c8ac379 100644
--- a/internal/fusefrontend_reverse/ctlsock_interface.go
+++ b/internal/fusefrontend_reverse/ctlsock_interface.go
@@ -3,7 +3,8 @@ package fusefrontend_reverse
import (
"path/filepath"
"strings"
- "syscall"
+
+ "golang.org/x/sys/unix"
"github.com/rfjakob/gocryptfs/internal/ctlsock"
"github.com/rfjakob/gocryptfs/internal/pathiv"
@@ -23,7 +24,7 @@ func (rfs *ReverseFS) EncryptPath(plainPath string) (string, error) {
for _, part := range parts {
dirIV := pathiv.Derive(cipherPath, pathiv.PurposeDirIV)
encryptedPart := rfs.nameTransform.EncryptName(part, dirIV)
- if rfs.args.LongNames && len(encryptedPart) > syscall.NAME_MAX {
+ if rfs.args.LongNames && len(encryptedPart) > unix.NAME_MAX {
encryptedPart = rfs.nameTransform.HashLongName(encryptedPart)
}
cipherPath = filepath.Join(cipherPath, encryptedPart)