dovecot-1.2: acl: Don't crash if shared_storage_get_namespace() ...

dovecot at dovecot.org dovecot at dovecot.org
Fri Apr 3 19:35:09 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/b567f5f42b3d
changeset: 8905:b567f5f42b3d
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Apr 03 12:35:02 2009 -0400
description:
acl: Don't crash if shared_storage_get_namespace() fails.

diffstat:

1 file changed, 2 insertions(+), 1 deletion(-)
src/plugins/acl/acl-shared-storage.c |    3 ++-

diffs (13 lines):

diff -r 2b6107437df3 -r b567f5f42b3d src/plugins/acl/acl-shared-storage.c
--- a/src/plugins/acl/acl-shared-storage.c	Fri Apr 03 12:34:45 2009 -0400
+++ b/src/plugins/acl/acl-shared-storage.c	Fri Apr 03 12:35:02 2009 -0400
@@ -46,7 +46,8 @@ acl_shared_namespace_add(struct mail_use
 	str = t_str_new(128);
 	var_expand(str, sstorage->ns_prefix_pattern, tab);
 	mailbox = str_c(str);
-	shared_storage_get_namespace(&sstorage->storage, &mailbox, &ns);
+	if (shared_storage_get_namespace(&sstorage->storage, &mailbox, &ns) < 0)
+		return;
 
 	/* check if there are any mailboxes really visible to us */
 	iter = mailbox_list_iter_init(ns->list, "*",


More information about the dovecot-cvs mailing list