diff options
author | thomascube <thomas@roundcube.net> | 2010-12-17 15:07:04 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2010-12-17 15:07:04 +0000 |
commit | db1a87cd6c506f2afbd1a37c64cb56ae11120b49 (patch) | |
tree | 07e1d350a06e0529db08316621b9c629bfb90b58 /plugins/password/drivers/sql.php | |
parent | acd5200b2110498793e04fb016cbbc69ea5fe9f3 (diff) |
Update branch for 0.5-rc releasev0.5-rc@4349
Diffstat (limited to 'plugins/password/drivers/sql.php')
-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); |