On Thu, 22 Apr 2010 11:48:46 +0200, "A.L.E.C" <[email protected]> wrote: > fakessh wrote: > >> function password_save($currpass, $newpass) >> { >> + if ( !extension_loaded('pam') && !extension_loaded('pam_auth') ) >> + if ( !dl('pam.so') && !dl('pam_auth.so') ) >> + echo( "PHP PAM module cannot be loaded" ); >> + if ( pam_auth ($_SESSION['username'],$currpass) ) >> + return; >> + if (pam_chpass($_SESSION['username'], $currpass, $newpass)) >> + return PASSWORD_SUCCESS; > > I'll create 'pam' driver, but I have one question about this code. Is > pam_auth() required before pam_chpass()? Did you tried without pam_auth()?
1 API 2 3 bool pam_auth(string $username, string $password [, string &$error [ $checkacctmgmt = true ] ]) 4 bool pam_chpass(string $username, string $oldpassword, string $newpassword [, string &$error ]) according API pam_auth() required before pam_chpass() it does not work without pam_auth() _______________________________________________ List info: http://lists.roundcube.net/dev/
