Automatic testing of PAM modules
Last week at the SambaXP conference I had a discussion with Günther Deschner about the testing of PAM modules. What we want to do is automatic testing. To achieve this in the Samba build farm you need a separate “pam.d” config directory for testing. You should be able to change the config and mess it up without getting locked out.
I’ve introduced a new function to PAM called pam_start_test() which takes and additional argument where you can specify the config directory. After this I’ve changed the call in pamtester and added a commandline option for the config directory. To do automatic testing I’ve added another commandline option to specify the password to use for authentication.
gladiac@maximegalon:~> pamtester -v -C/tmp/pam.d -Psecret login csync authenticate
pamtester: invoking pam_start(login, csync, ...)
pamtester: performing operation - authenticate
pamtester: successfully authenticated
You can find the patches here.