aboutsummaryrefslogtreecommitdiff
path: root/cmd/fscrypt/errors.go
diff options
context:
space:
mode:
authorJoseph Richey <joerichey@google.com>2017-08-29 19:06:26 -0700
committerGitHub <noreply@github.com>2017-08-29 19:06:26 -0700
commitfe92c00f897c2c6b20d841c8a8f83ef6a247d18c (patch)
tree5c4f78346701a89a4aec632aa919ea8724083b80 /cmd/fscrypt/errors.go
parentb7f0e79d7a1dc4ff196d59e19a665a346082b542 (diff)
parentd41bac581c56be1891e7b54d64c8e5d68edd8ca0 (diff)
Merge pull request #49 from google/misc
Fix a wide variety of small issues and update documentation
Diffstat (limited to 'cmd/fscrypt/errors.go')
-rw-r--r--cmd/fscrypt/errors.go7
1 files changed, 7 insertions, 0 deletions
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.`