From 55151588a7078ef40e458acacd5ad1c25ae8af2e Mon Sep 17 00:00:00 2001 From: alec Date: Mon, 6 Dec 2010 08:31:03 +0000 Subject: - Fix usage of configured temp_dir instead of /tmp (#1487447) git-svn-id: https://svn.roundcube.net/trunk@4308 208e9e7b-5314-0410-a742-e7e81cd9613c --- plugins/password/drivers/sql.php | 8 ++++++-- plugins/password/package.xml | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'plugins') 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); diff --git a/plugins/password/package.xml b/plugins/password/package.xml index d4fb6e96b..b3c965f0b 100644 --- a/plugins/password/package.xml +++ b/plugins/password/package.xml @@ -30,6 +30,7 @@ - hMail driver: add username_domain detection (#1487100) - hMail driver: HTML tags in logged messages should be stripped off (#1487099) - Chpasswd driver: add newline at end of input to chpasswd binary (#1487141) +- Fix usage of configured temp_dir instead of /tmp (#1487447) -- cgit v1.2.3