]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: db-dict: Initialize dict_op_settings for dict lookup
authorSiavash Tavakoli <siavash.tavakoli@open-xchange.com>
Thu, 3 Jun 2021 17:11:47 +0000 (18:11 +0100)
committerSiavash Tavakoli <siavash.tavakoli@open-xchange.com>
Thu, 1 Jul 2021 19:20:36 +0000 (20:20 +0100)
src/auth/db-dict.c

index 09c357d9a46a96f7bfe0545b29668faa1e326b60..2067b561161052a73d20bbf518b72b17b551fd08 100644 (file)
@@ -409,13 +409,17 @@ static int db_dict_iter_lookup_key_values(struct db_dict_value_iter *iter)
        path = t_str_new(128);
        str_append(path, DICT_PATH_SHARED);
 
+       struct dict_op_settings set = {
+               .username = iter->auth_request->fields.user,
+       };
+
        array_foreach_modifiable(&iter->keys, key) {
                if (!key->used)
                        continue;
 
                str_truncate(path, strlen(DICT_PATH_SHARED));
                str_append(path, key->key->key);
-               ret = dict_lookup(iter->conn->dict, NULL, iter->pool,
+               ret = dict_lookup(iter->conn->dict, &set, iter->pool,
                                  str_c(path), &key->value, &error);
                if (ret > 0) {
                        e_debug(authdb_event(iter->auth_request),