dovecot-2.0: lmtp: Recent change broke accessing mail_temp_dir.

dovecot at dovecot.org dovecot at dovecot.org
Tue Nov 30 01:58:23 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/77d582b2dc51
changeset: 12480:77d582b2dc51
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Nov 29 23:58:19 2010 +0000
description:
lmtp: Recent change broke accessing mail_temp_dir.
Also when it happened, an error message wasn't always logged.

diffstat:

 src/lmtp/client.c        |  2 +-
 src/lmtp/client.h        |  1 -
 src/lmtp/commands.c      |  6 ++++--
 src/lmtp/lmtp-settings.c |  3 +--
 src/lmtp/lmtp-settings.h |  1 -
 5 files changed, 6 insertions(+), 7 deletions(-)

diffs (78 lines):

diff -r 5e82c5b1b4a9 -r 77d582b2dc51 src/lmtp/client.c
--- a/src/lmtp/client.c	Mon Nov 29 19:13:37 2010 +0000
+++ b/src/lmtp/client.c	Mon Nov 29 23:58:19 2010 +0000
@@ -163,7 +163,7 @@
 					       &set_parser, &error) < 0)
 		i_fatal("%s", error);
 
-	lmtp_settings_dup(set_parser, client->pool, &client->user_set,
+	lmtp_settings_dup(set_parser, client->pool,
 			  &client->lmtp_set, &client->set);
 }
 
diff -r 5e82c5b1b4a9 -r 77d582b2dc51 src/lmtp/client.h
--- a/src/lmtp/client.h	Mon Nov 29 19:13:37 2010 +0000
+++ b/src/lmtp/client.h	Mon Nov 29 23:58:19 2010 +0000
@@ -45,7 +45,6 @@
 	const struct setting_parser_info *user_set_info;
 	const struct lda_settings *set;
 	const struct lmtp_settings *lmtp_set;
-	const struct mail_user_settings *user_set;
 	int fd_in, fd_out;
 	struct io *io;
 	struct istream *input;
diff -r 5e82c5b1b4a9 -r 77d582b2dc51 src/lmtp/commands.c
--- a/src/lmtp/commands.c	Mon Nov 29 19:13:37 2010 +0000
+++ b/src/lmtp/commands.c	Mon Nov 29 23:58:19 2010 +0000
@@ -757,10 +757,12 @@
 
 	/* move everything to a temporary file. */
 	path = t_str_new(256);
-	mail_user_set_get_temp_prefix(path, client->user_set);
+	mail_user_set_get_temp_prefix(path, client->raw_mail_user->set);
 	fd = safe_mkstemp_hostpid(path, 0600, (uid_t)-1, (gid_t)-1);
-	if (fd == -1)
+	if (fd == -1) {
+		i_error("Temp file creation to %s failed: %m", str_c(path));
 		return -1;
+	}
 
 	/* we just want the fd, unlink it */
 	if (unlink(str_c(path)) < 0) {
diff -r 5e82c5b1b4a9 -r 77d582b2dc51 src/lmtp/lmtp-settings.c
--- a/src/lmtp/lmtp-settings.c	Mon Nov 29 19:13:37 2010 +0000
+++ b/src/lmtp/lmtp-settings.c	Mon Nov 29 23:58:19 2010 +0000
@@ -2,6 +2,7 @@
 
 #include "lib.h"
 #include "buffer.h"
+#include "var-expand.h"
 #include "settings-parser.h"
 #include "service-settings.h"
 #include "master-service.h"
@@ -85,14 +86,12 @@
 
 void lmtp_settings_dup(const struct setting_parser_context *set_parser,
 		       pool_t pool,
-		       const struct mail_user_settings **user_set_r,
 		       const struct lmtp_settings **lmtp_set_r,
 		       const struct lda_settings **lda_set_r)
 {
 	void **sets;
 
 	sets = settings_parser_get_list(set_parser) + 1;
-	*user_set_r = settings_dup(&mail_user_setting_parser_info, sets[0], pool);
 	*lda_set_r = settings_dup(&lda_setting_parser_info, sets[1], pool);
 	*lmtp_set_r = settings_dup(&lmtp_setting_parser_info, sets[2], pool);
 }
diff -r 5e82c5b1b4a9 -r 77d582b2dc51 src/lmtp/lmtp-settings.h
--- a/src/lmtp/lmtp-settings.h	Mon Nov 29 19:13:37 2010 +0000
+++ b/src/lmtp/lmtp-settings.h	Mon Nov 29 23:58:19 2010 +0000
@@ -12,7 +12,6 @@
 
 void lmtp_settings_dup(const struct setting_parser_context *set_parser,
 		       pool_t pool,
-		       const struct mail_user_settings **user_set_r,
 		       const struct lmtp_settings **lmtp_set_r,
 		       const struct lda_settings **lda_set_r);
 


More information about the dovecot-cvs mailing list