Skip to content

Commit

Permalink
pam_fscrypt: log errors getting protector in policiesUsingProtector()
Browse files Browse the repository at this point in the history
If the error is anything other than ErrNotSetup, it might be helpful to
know what is going on.
  • Loading branch information
ebiggers committed Feb 23, 2022
1 parent 06c989d commit 9871a39
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pam_fscrypt/run_fscrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9871a39

Please sign in to comment.