diff options
| author | Eric Biggers <ebiggers@google.com> | 2022-02-23 12:35:04 -0800 |
|---|---|---|
| committer | Eric Biggers <ebiggers@google.com> | 2022-02-23 12:35:04 -0800 |
| commit | 9871a39409222a80b4c4c22cbaab17bae84f1712 (patch) | |
| tree | d7bca2abc71852414b63e945769cf8591eb240c0 /pam_fscrypt/run_fscrypt.go | |
| parent | 06c989df4e31dd9f172f94fbd6243f49d4dd0b92 (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.
Diffstat (limited to 'pam_fscrypt/run_fscrypt.go')
| -rw-r--r-- | pam_fscrypt/run_fscrypt.go | 3 |
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) |