From db1a87cd6c506f2afbd1a37c64cb56ae11120b49 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Fri, 17 Dec 2010 10:07:04 -0500
Subject: [PATCH] Update branch for 0.5-rc release

---
 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 70e5643..33469ec 100644
--- a/plugins/password/drivers/sql.php
+++ b/plugins/password/drivers/sql.php
@@ -33,7 +33,7 @@
 
     if ($err = $db->is_error())
         return PASSWORD_ERROR;
-    
+
     // crypted password
     if (strpos($sql, '%c') !== FALSE) {
         $salt = '';
@@ -56,7 +56,11 @@
             $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);

--
Gitblit v1.9.1