aboutsummaryrefslogtreecommitdiff
path: root/cmd/fscrypt/errors.go
diff options
context:
space:
mode:
authorJoseph Richey <joerichey@google.com>2017-09-01 02:23:53 -0700
committerGitHub <noreply@github.com>2017-09-01 02:23:53 -0700
commit0879b8ffcbbac29c282084eea2888194371113fa (patch)
tree8ff0b3562affc308939788c5e54708e284a014da /cmd/fscrypt/errors.go
parentb04d7ef31dc2e21f055b1b656efb9511e72db6c6 (diff)
parent0dfbbf62fae3d4051dd5f0686835ac393f8a0247 (diff)
Merge pull request #56 from google/panicsv0.2.10.2.1
Fixed failures in PAM module
Diffstat (limited to 'cmd/fscrypt/errors.go')
-rw-r--r--cmd/fscrypt/errors.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmd/fscrypt/errors.go b/cmd/fscrypt/errors.go
index 9731efc..81a6798 100644
--- a/cmd/fscrypt/errors.go
+++ b/cmd/fscrypt/errors.go
@@ -35,6 +35,7 @@ import (
"github.com/google/fscrypt/crypto"
"github.com/google/fscrypt/filesystem"
"github.com/google/fscrypt/metadata"
+ "github.com/google/fscrypt/security"
"github.com/google/fscrypt/util"
)
@@ -93,6 +94,14 @@ func getErrorSuggestions(err error) string {
needs to be enabled for this filesystem. See the
documentation on how to enable encryption on ext4
systems (and the risks of doing so).`
+ case security.ErrSessionUserKeying:
+ return `This is usually the result of a bad PAM configuration.
+ Either correct the problem in your PAM stack, enable
+ pam_keyinit.so, or run "keyctl link @u @s".`
+ case security.ErrAccessUserKeyring:
+ return fmt.Sprintf(`You can only use %s to access the user
+ keyring of another user if you are running as root.`,
+ shortDisplay(userFlag))
case actions.ErrBadConfigFile:
return `Run "sudo fscrypt setup" to recreate the file.`
case actions.ErrNoConfigFile: