thomascube
2009-07-01 9da5eddead7b962453dcdc1265b5959e7bbbf649
Allow to configure additional arguments for the saslpasswd2 call

2 files modified
9 ■■■■ changed files
plugins/password/config.inc.php 6 ●●●●● patch | view | raw | blame | history
plugins/password/drivers/sasl.php 3 ●●●● patch | view | raw | blame | history
plugins/password/config.inc.php
@@ -38,6 +38,12 @@
$rcmail_config['password_pop_port'] = 106;
// SASL Driver options
// -------------------
// Additional arguments for the saslpasswd2 call
$rcmail_config['password_saslpasswd_args'] = '';
// LDAP Driver options
// -------------------
// LDAP server name to connect to. 
plugins/password/drivers/sasl.php
@@ -20,8 +20,9 @@
{
    $curdir = realpath(dirname(__FILE__));
    $username = escapeshellcmd($_SESSION['username']);
    $args = rcmail::get_instance()->config->get('password_saslpasswd_args', '');
    if ($fh = popen("$curdir/chgsaslpasswd -p $username", 'w')) {
    if ($fh = popen("$curdir/chgsaslpasswd -p $args $username", 'w')) {
        fwrite($fh, $newpass."\n");
        $code = pclose($fh);