diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-12-06 08:31:03 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-12-06 08:31:03 +0000 |
| commit | 55151588a7078ef40e458acacd5ad1c25ae8af2e (patch) | |
| tree | 9d603766fceb8c2700cd1be6c4a26be354953b5b /plugins/password/drivers | |
| parent | a419131bfaf123ac60358c96a15f097ef636d3c7 (diff) | |
- Fix usage of configured temp_dir instead of /tmp (#1487447)
git-svn-id: https://svn.roundcube.net/trunk@4308 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins/password/drivers')
| -rw-r--r-- | plugins/password/drivers/sql.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/password/drivers/sql.php b/plugins/password/drivers/sql.php index 70e564396..33469ec62 100644 --- a/plugins/password/drivers/sql.php +++ b/plugins/password/drivers/sql.php @@ -33,7 +33,7 @@ function password_save($curpass, $passwd) if ($err = $db->is_error()) return PASSWORD_ERROR; - + // crypted password if (strpos($sql, '%c') !== FALSE) { $salt = ''; @@ -56,7 +56,11 @@ function password_save($curpass, $passwd) $dovecotpw = 'dovecotpw'; if (!($method = $rcmail->config->get('password_dovecotpw_method'))) $method = 'CRAM-MD5'; - $tmpfile = tempnam('/tmp', 'roundcube-'); + + // use common temp dir + $tmp_dir = $rcmail->config->get('temp_dir'); + $tmpfile = tempnam($tmp_dir, 'roundcube-'); + $pipe = popen("'$dovecotpw' -s '$method' > '$tmpfile'", "w"); if (!$pipe) { unlink($tmpfile); |
