chaps: Downgrade excessive logs

Respect the PAM_SILENT flag, and downgrade logs that occur in
normal situations.  In particular, PAM sessions can be opened
without a prior call to authenticate, leading to the user name
being unavailable.

TEST=Chaps unit tests (with ASAN) plus PKCS11 tests

Change-Id: Id617d091f34ef61dd454599dd61315f02f2cbbea
Reviewed-by: Darren Krahn <>
Commit-Queue: David Drysdale <>
Tested-by: David Drysdale <>
4 files changed