|
|
@ -28,15 +28,25 @@ class rcube_ldap_ppolicy_password
|
|
|
|
$bindPW = $rcmail->config->get('password_ldap_searchPW');
|
|
|
|
$bindPW = $rcmail->config->get('password_ldap_searchPW');
|
|
|
|
$cafile = $rcmail->config->get('password_ldap_cafile');
|
|
|
|
$cafile = $rcmail->config->get('password_ldap_cafile');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$log_dir = null;
|
|
|
|
|
|
|
|
if (self::$instance) {
|
|
|
|
|
|
|
|
$log_dir = self::$instance->config->get('log_dir');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (empty($log_dir)) {
|
|
|
|
|
|
|
|
$log_dir = RCUBE_INSTALL_PATH . 'logs';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// try to open specific log file for writing
|
|
|
|
|
|
|
|
$logfile = $log_dir.'/ldap_ppolicy.err';
|
|
|
|
|
|
|
|
|
|
|
|
$descriptorspec = array(
|
|
|
|
$descriptorspec = array(
|
|
|
|
0 => array("pipe", "r"), // stdin is a pipe that the child will read from
|
|
|
|
0 => array("pipe", "r"), // stdin is a pipe that the child will read from
|
|
|
|
1 => array("pipe", "w"), // stdout is a pipe that the child will write to
|
|
|
|
1 => array("pipe", "w"), // stdout is a pipe that the child will write to
|
|
|
|
2 => array("file", "logs/ldap_ppolicy.err", "a") // stderr is a file to write to
|
|
|
|
2 => array("file", $logfile, "a") // stderr is a file to write to
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
$cwd = 'plugins/password/drivers/';
|
|
|
|
$cmd = 'plugins/password/helpers/'. $cmd;
|
|
|
|
$cmd = $cwd.$cmd;
|
|
|
|
|
|
|
|
$this->_debug('CWD: '. $cwd);
|
|
|
|
|
|
|
|
$this->_debug("parameters:\ncmd:$cmd\nuri:$uri\nbaseDN:$baseDN\nfilter:$filter");
|
|
|
|
$this->_debug("parameters:\ncmd:$cmd\nuri:$uri\nbaseDN:$baseDN\nfilter:$filter");
|
|
|
|
$process = proc_open($cmd, $descriptorspec, $pipes);
|
|
|
|
$process = proc_open($cmd, $descriptorspec, $pipes);
|
|
|
|
|
|
|
|
|
|
|
|