From: Timo Sirainen Date: Wed, 8 Sep 2010 16:02:25 +0000 (+0100) Subject: acl: Fixed removing entries from shared dict when rebuilding X-Git-Tag: 2.0.2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2fff31fd2f101c772ec6899f94b4fe2c858febad;p=thirdparty%2Fdovecot%2Fcore.git acl: Fixed removing entries from shared dict when rebuilding --- diff --git a/src/plugins/acl/acl-lookup-dict.c b/src/plugins/acl/acl-lookup-dict.c index 18897ba438..f396f7f0a6 100644 --- a/src/plugins/acl/acl-lookup-dict.c +++ b/src/plugins/acl/acl-lookup-dict.c @@ -155,9 +155,9 @@ acl_lookup_dict_rebuild_update(struct acl_lookup_dict *dict, prefix_len = strlen(prefix); iter = dict_iterate_init(dict->dict, prefix, DICT_ITERATE_FLAG_RECURSE); while (dict_iterate(iter, &key, &value)) { - /* prefix/$dest/$source */ + /* prefix/$type/$dest/$source */ key += prefix_len; - p = strchr(key, '/'); + p = strrchr(key, '/'); if (p != NULL && strcmp(p + 1, username) == 0) { key = t_strdup_until(key, p); array_append(&old_ids_arr, &key, 1);