A tool to test PAM applications and PAM modules
This component of cwrap allows you to either test your PAM (Linux-PAM and OpenPAM) application or module. For testing PAM applications we have written a simple PAM module called pam_matrix (see below). If you plan to test a PAM module you can use the pamtest library we have implemented. It simplifies testing of modules. You can combine it with the cmocka unit testing framework or you can use the provided Python bindings to write tests for your module in Python.
PAM_WRAPPER=1all PAM functions like
pam_authenticate()calls will work, even as a normal user.
Testing PAM application often requires to set up an authentication backend with as little effort as possible. The pam_matrix module allows to authenticate against a key-value text file, provided by an option or with an environment variable.