From ac3524f03f526017d671eae235af631a5f17cbc9 Mon Sep 17 00:00:00 2001 From: Joe Richey Date: Tue, 29 Aug 2017 10:23:54 -0700 Subject: Added +build linux,cgo flags --- cmd/fscrypt/fscrypt.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cmd/fscrypt') diff --git a/cmd/fscrypt/fscrypt.go b/cmd/fscrypt/fscrypt.go index fe1e0c9..93df341 100644 --- a/cmd/fscrypt/fscrypt.go +++ b/cmd/fscrypt/fscrypt.go @@ -19,8 +19,11 @@ */ /* -fscrypt is a comprehensive command line tool for managing filesystem encryption. +fscrypt is a command line tool for managing linux filesystem encryption. */ + +// +build linux,cgo + package main import ( -- cgit v1.2.3 From 7568ca2aab4a3266eb95cbda64298e2292743c7b Mon Sep 17 00:00:00 2001 From: Joe Richey Date: Tue, 29 Aug 2017 11:17:10 -0700 Subject: crypto: Handle when "ulimit -l" is too low --- cmd/fscrypt/errors.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cmd/fscrypt') diff --git a/cmd/fscrypt/errors.go b/cmd/fscrypt/errors.go index 10dbf1e..b2aa57e 100644 --- a/cmd/fscrypt/errors.go +++ b/cmd/fscrypt/errors.go @@ -32,6 +32,7 @@ import ( "github.com/urfave/cli" "github.com/google/fscrypt/actions" + "github.com/google/fscrypt/crypto" "github.com/google/fscrypt/filesystem" "github.com/google/fscrypt/metadata" "github.com/google/fscrypt/util" @@ -77,6 +78,12 @@ func getErrorSuggestions(err error) string { switch errors.Cause(err) { case filesystem.ErrNotSetup: return fmt.Sprintf(`Run "fscrypt setup %s" to use fscrypt on this filesystem.`, mountpointArg) + case crypto.ErrKeyLock: + return `Too much memory was requested to be locked in RAM. The + current limit for this user can be checked with "ulimit + -l". The limit can be modified by either changing the + "memlock" item in /etc/security/limits.conf or by + changing the "LimitMEMLOCK" value in systemd.` case metadata.ErrEncryptionNotSupported: return `Encryption for this type of filesystem is not supported on this kernel version.` -- cgit v1.2.3