PAM - Invoke perl code at PAM phases
version 0.31
package Example::PAM; use PAM::Constants qw(PAM_SUCCESS); use PAM::Handle; sub open_session { my $class = shift; my ($pamh, $flags, @ARGS) = @_; my $user = $pamh->get_user($prompt); return PAM_SUCCESS; }
This Perl and PAM module allow you to invoke a perl interpreter and call package methods during pam phases. It also includes bindings for most of the pam functions and constants.
Most of the interface is working at this point. I expect to be compatible at this point with both Linux PAM and OSX (Darwin) PAM. The major functions in pam_* should all be working. Some of the pam_{get,set}_item items are not implemented yet.
I wouldn't call this module secure just yet. I will mark version 1.0 when I feel that is the case.
This all said, the module is safe enough to be used. It should be cleaning up all memory that it consumes and barring mistakes in the perl code it invokes there should be no chance of it causing unexpected failures.
Copyright 2012 - Jonathan Steinert
Jonathan Steinert
This module is licensed under the same terms as Perl itself.
To install PAM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PAM
CPAN shell
perl -MCPAN -e shell install PAM
For more information on module installation, please visit the detailed CPAN module installation guide.