Authen::PAM

Perl interface to PAM library
Download

Authen::PAM Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Nikolay Pelov
  • Publisher web site:
  • http://search.cpan.org/~nikip/

Authen::PAM Tags


Authen::PAM Description

Perl interface to PAM library Authen::PAM is a Perl module that provides a Perl interface to the PAM library. The only difference with the standard PAM interface is that instead of passing a pam_conv struct which has an additional context parameter appdata_ptr, you must only give an address to a conversation function written in Perl (see below).If you want to pass a NULL pointer as a value of the $user in pam_start use undef or the two-argument version. Both in the two and the three-argument versions of pam_start a default conversation function is used (Authen::PAM::pam_default_conv).The $flags argument is optional for all functions which use it except for pam_setcred. The $pam_status argument is also optional for pam_end function. Both of these arguments will be set to 0 if not given.The names of some constants from the PAM library have changed over the time. You can use any of the known names for a given constant although it is advisable to use the latest one.When this module supports some of the additional features of the PAM library (e.g. pam_fail_delay) then the corresponding HAVE_PAM_XXX constant will have a value 1 otherwise it will return 0.For compatibility with older PAM libraries I have added the constant HAVE_PAM_ENV_FUNCTIONS which is true if your PAM library has the functions for handling environment variables (pam_putenv, pam_getenv, pam_getenvlist).SYNOPSIS use Authen::PAM; $res = pam_start($service_name, $pamh); $res = pam_start($service_name, $user, $pamh); $res = pam_start($service_name, $user, \&my_conv_func, $pamh); $res = pam_end($pamh, $pam_status); $res = pam_authenticate($pamh, $flags); $res = pam_setcred($pamh, $flags); $res = pam_acct_mgmt($pamh, $flags); $res = pam_open_session($pamh, $flags); $res = pam_close_session($pamh, $flags); $res = pam_chauthtok($pamh, $flags); $error_str = pam_strerror($pamh, $errnum); $res = pam_set_item($pamh, $item_type, $item); $res = pam_get_item($pamh, $item_type, $item); if (HAVE_PAM_ENV_FUNCTIONS()) { $res = pam_putenv($pamh, $name_value); $val = pam_getenv($pamh, $name); %env = pam_getenvlist($pamh); } if (HAVE_PAM_FAIL_DELAY()) { $res = pam_fail_delay($pamh, $musec_delay); $res = pam_set_item($pamh, PAM_FAIL_DELAY(), \&my_fail_delay_func); } Requirements: · Perl


Authen::PAM Related Software