dovecot-2.2: imap: Fixed RESETKEY assert-crashing
dovecot at dovecot.org
dovecot at dovecot.org
Wed Mar 20 17:55:02 EET 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/8bacc34cead9
changeset: 16060:8bacc34cead9
user: Timo Sirainen <tss at iki.fi>
date: Wed Mar 20 17:54:52 2013 +0200
description:
imap: Fixed RESETKEY assert-crashing
diffstat:
src/imap/cmd-resetkey.c | 15 +++------------
1 files changed, 3 insertions(+), 12 deletions(-)
diffs (33 lines):
diff -r 4649782a4213 -r 8bacc34cead9 src/imap/cmd-resetkey.c
--- a/src/imap/cmd-resetkey.c Wed Mar 20 17:44:07 2013 +0200
+++ b/src/imap/cmd-resetkey.c Wed Mar 20 17:54:52 2013 +0200
@@ -20,7 +20,6 @@
cmd_resetkey_mailbox(struct client_command_context *cmd,
const char *mailbox, const struct imap_arg *mech_args)
{
- enum mailbox_existence existence;
struct mail_namespace *ns;
enum mailbox_flags flags = MAILBOX_FLAG_READONLY;
struct mailbox *box;
@@ -49,18 +48,10 @@
if (ns == NULL)
return TRUE;
- /* check mailbox */
+ /* open mailbox */
box = mailbox_alloc(ns->list, mailbox, flags);
- if (mailbox_exists(box, TRUE, &existence) < 0) {
- client_send_internal_error(cmd);
- mailbox_free(&box);
- return TRUE;
- }
-
- if (existence == MAILBOX_EXISTENCE_NONE) {
- client_send_tagline(cmd, t_strdup_printf(
- "NO ["IMAP_RESP_CODE_NONEXISTENT"] "
- MAIL_ERRSTR_MAILBOX_NOT_FOUND, mailbox));
+ if (mailbox_open(box) < 0) {
+ client_send_storage_error(cmd, mailbox_get_storage(box));
mailbox_free(&box);
return TRUE;
}
More information about the dovecot-cvs
mailing list