aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2022-02-23 12:35:04 -0800
committerEric Biggers <ebiggers@google.com>2022-02-23 12:35:04 -0800
commit9871a39409222a80b4c4c22cbaab17bae84f1712 (patch)
treed7bca2abc71852414b63e945769cf8591eb240c0
parent06c989df4e31dd9f172f94fbd6243f49d4dd0b92 (diff)
pam_fscrypt: log errors getting protector in policiesUsingProtector()
If the error is anything other than ErrNotSetup, it might be helpful to know what is going on.
-rw-r--r--pam_fscrypt/run_fscrypt.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pam_fscrypt/run_fscrypt.go b/pam_fscrypt/run_fscrypt.go
index 8c640ce..a563ab5 100644
--- a/pam_fscrypt/run_fscrypt.go
+++ b/pam_fscrypt/run_fscrypt.go
@@ -173,6 +173,9 @@ func policiesUsingProtector(protector *actions.Protector) []*actions.Policy {
// Skip mountpoints that do not use the protector.
if _, _, err := mount.GetProtector(protector.Descriptor(),
protector.Context.TrustedUser); err != nil {
+ if _, ok := err.(*filesystem.ErrNotSetup); !ok {
+ log.Print(err)
+ }
continue
}
policyDescriptors, err := mount.ListPolicies(protector.Context.TrustedUser)