]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
acl: Fixed removing entries from shared dict when rebuilding
authorTimo Sirainen <tss@iki.fi>
Wed, 8 Sep 2010 16:02:25 +0000 (17:02 +0100)
committerTimo Sirainen <tss@iki.fi>
Wed, 8 Sep 2010 16:02:25 +0000 (17:02 +0100)
src/plugins/acl/acl-lookup-dict.c

index 18897ba438f20ce432ea440fe493c857865c5e85..f396f7f0a6cff97dfe55f33c517c05a9cc861b90 100644 (file)
@@ -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);