]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lmtp: Recent change broke accessing mail_temp_dir.
authorTimo Sirainen <tss@iki.fi>
Mon, 29 Nov 2010 23:58:19 +0000 (23:58 +0000)
committerTimo Sirainen <tss@iki.fi>
Mon, 29 Nov 2010 23:58:19 +0000 (23:58 +0000)
Also when it happened, an error message wasn't always logged.

src/lmtp/client.c
src/lmtp/client.h
src/lmtp/commands.c
src/lmtp/lmtp-settings.c
src/lmtp/lmtp-settings.h

index 8039dd239b48c394964d33f4df11ca6823a166a1..16bff8b4ed703a057dabf14faf610ca48a069208 100644 (file)
@@ -163,7 +163,7 @@ static void client_read_settings(struct client *client)
                                               &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);
 }
 
index 8f4072fa6f1fa5cf476aaa944cd509ddff9883f5..522fe91fe21af8526ad36d8254f557d60b0978f2 100644 (file)
@@ -45,7 +45,6 @@ struct client {
        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;
index ccc376c2cdd7b782265a165acb3bab8225de4372..ba5cedbb3722f9f9fbf5006248de6a53673fba32 100644 (file)
@@ -757,10 +757,12 @@ static int client_input_add_file(struct client *client,
 
        /* 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) {
index 9f0ec5edd9d446adfcfd6831256b660ca8c75bdb..f55895b300997bdf5b8c13639e086cb825dcda96 100644 (file)
@@ -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 @@ const struct setting_parser_info lmtp_setting_parser_info = {
 
 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);
 }
index b0e859631d8982456890903f74572a20bfa74812..58600060c031d50caa10d60d0d96643e3b1b2bd8 100644 (file)
@@ -12,7 +12,6 @@ extern const struct setting_parser_info lmtp_setting_parser_info;
 
 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);