On Thu, 22 Apr 2010 08:16:10 +0200, "A.L.E.C" alec@alec.pl wrote:
fakessh wrote:
can you give me a simple example using this API
something like that
function password_save($currpass, $newpass) { if (extension_loaded("pam")) { if (pam_chpass($_SESSION['username'], $currpass, $newpass)) { return PASSWORD_SUCCESS; } } return PASSWORD_ERROR; }
I just finished the patch for pam I do not know if you want to quickly implement must make changes in files and installation documentation short, the patch is simple You may want to be more change in any case it is working perfectly on my 0.3.1 release
[root@r13151 ~]# diff --text -u /home/ftpchrootshell/fakessh/sasl.txt /home/roundcube/www/plugins/password/drivers/sasl.php --- /home/ftpchrootshell/fakessh/sasl.txt 2010-04-22 11:34:10.000000000 +0200 +++ /home/roundcube/www/plugins/password/drivers/sasl.php 2010-04-22 11:26:33.000000000 +0200 @@ -18,6 +18,16 @@
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;
rcmail::get_instance()->config->get('password_saslpasswd_args', ''); @@ -37,8 +47,5 @@ 'message' => "Password plugin: Unable to execute $curdir/chgsaslpasswd" ), true, false); }
}
?>
List info: http://lists.roundcube.net/dev/
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()?
On Thu, 22 Apr 2010 11:48:46 +0200, "A.L.E.C" alec@alec.pl 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/
fakessh wrote:
[root@r13151 ~]# diff --text -u /home/ftpchrootshell/fakessh/sasl.txt
BTW, http://trac.roundcube.net/ticket/1486647 ;)
On Thu, 22 Apr 2010 13:15:42 +0200, "A.L.E.C" alec@alec.pl wrote:
fakessh wrote:
[root@r13151 ~]# diff --text -u /home/ftpchrootshell/fakessh/sasl.txt
the operation of updating the patch is executed perfectly. The new plugin is fully functional
the command is sudo /usr/sbin/chpasswd 2> /dev/null it safe and secure ? or it will be necessary to carry out security updates _______________________________________________ List info: http://lists.roundcube.net/dev/
On Thu, 22 Apr 2010 17:58:43 +0200, fakessh fakessh@fakessh.eu wrote:
On Thu, 22 Apr 2010 13:15:42 +0200, "A.L.E.C" alec@alec.pl wrote:
fakessh wrote:
[root@r13151 ~]# diff --text -u /home/ftpchrootshell/fakessh/sasl.txt
when I find time to fully test the plugin change in the form of password returns a success
logout after reconnection of roundcube and it appears that the password is always the same
help A.L.E.C
List info: http://lists.roundcube.net/dev/
On Sat, 24 Apr 2010 06:00:55 +0200, fakessh fakessh@fakessh.eu wrote:
On Thu, 22 Apr 2010 17:58:43 +0200, fakessh fakessh@fakessh.eu wrote:
On Thu, 22 Apr 2010 13:15:42 +0200, "A.L.E.C" alec@alec.pl wrote:
fakessh wrote:
[root@r13151 ~]# diff --text -u
/home/ftpchrootshell/fakessh/sasl.txt
pecl pam suffers from a known bug that prevents the proper use of driver pam that is right
http://pecl.php.net/bugs/bug.php?id=16995
List info: http://lists.roundcube.net/dev/