Version 2 of the pam authentication plugin executes a tool called auth_pam_tool. This happens here:
Currently, if the execution of this tool fails, then nothing is logged.
If you are using a debug build of the plugin and if pam_debug is enabled, then you do get an error message, but it is still not optimal.
I think we need to make the following changes:
- An error message should be printed in both release builds and debug builds.
- The error message should not depend on pam_debug.
- The error message should contain the errno and/or strerror(errno) for the specific error.