dovecot-2.1: lib-storage: If shared namespace prefix doesn't end...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Sep 16 16:59:32 EEST 2011
details: http://hg.dovecot.org/dovecot-2.1/rev/ea657df52a85
changeset: 13503:ea657df52a85
user: Timo Sirainen <tss at iki.fi>
date: Fri Sep 16 13:14:11 2011 +0300
description:
lib-storage: If shared namespace prefix doesn't end with hierarchy separator, fail.
diffstat:
src/lib-storage/index/shared/shared-storage.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diffs (16 lines):
diff -r e57bd3e2ec27 -r ea657df52a85 src/lib-storage/index/shared/shared-storage.c
--- a/src/lib-storage/index/shared/shared-storage.c Fri Sep 16 13:06:48 2011 +0300
+++ b/src/lib-storage/index/shared/shared-storage.c Fri Sep 16 13:14:11 2011 +0300
@@ -79,6 +79,12 @@
*error_r = "Shared namespace prefix doesn't contain %u or %n";
return -1;
}
+ if (p[-1] != ns->sep &&
+ (ns->flags & (NAMESPACE_FLAG_LIST_PREFIX |
+ NAMESPACE_FLAG_LIST_CHILDREN)) != 0) {
+ *error_r = "Shared namespace prefix doesn't end with hierarchy separator";
+ return -1;
+ }
/* truncate prefix after the above checks are done, so they can log
the full prefix in error conditions */
More information about the dovecot-cvs
mailing list