From: Siavash Tavakoli Date: Thu, 3 Jun 2021 17:11:47 +0000 (+0100) Subject: auth: db-dict: Initialize dict_op_settings for dict lookup X-Git-Tag: 2.3.17~381 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09e89ca08a1733de411f88e2aeee09821aa8e048;p=thirdparty%2Fdovecot%2Fcore.git auth: db-dict: Initialize dict_op_settings for dict lookup --- diff --git a/src/auth/db-dict.c b/src/auth/db-dict.c index 09c357d9a4..2067b56116 100644 --- a/src/auth/db-dict.c +++ b/src/auth/db-dict.c @@ -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),