From: Aki Tuomi Date: Fri, 8 May 2020 10:08:19 +0000 (+0300) Subject: auth: test - Export passdb mock settings X-Git-Tag: 2.3.11.2~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=469540431883829c0f5fc07a77539f6d6205e3d2;p=thirdparty%2Fdovecot%2Fcore.git auth: test - Export passdb mock settings --- diff --git a/src/auth/test-auth.h b/src/auth/test-auth.h index ef596e96bf..413fb3650a 100644 --- a/src/auth/test-auth.h +++ b/src/auth/test-auth.h @@ -8,6 +8,8 @@ struct auth_passdb; +extern struct auth_passdb_settings mock_passdb_set; + void test_auth_request_var_expand(void); void test_db_dict_parse_cache_key(void); void test_username_filter(void); diff --git a/src/auth/test-db-dict.c b/src/auth/test-db-dict.c index 50dbd55502..59b0e78f9d 100644 --- a/src/auth/test-db-dict.c +++ b/src/auth/test-db-dict.c @@ -1,5 +1,7 @@ /* Copyright (c) 2013-2018 Dovecot authors, see the included COPYING file */ +#include "lib.h" +#include "auth-settings.h" #include "test-auth.h" #include "array.h" #include "db-dict.h" diff --git a/src/auth/test-main.c b/src/auth/test-main.c index 70025c1ccb..bbc7afbe0d 100644 --- a/src/auth/test-main.c +++ b/src/auth/test-main.c @@ -1,6 +1,7 @@ /* Copyright (c) 2017-2018 Dovecot authors, see the included COPYING file */ #include "lib.h" +#include "auth-settings.h" #include "test-common.h" #include "test-auth.h" #include "password-scheme.h" diff --git a/src/auth/test-mock.c b/src/auth/test-mock.c index 16807d72a3..f7358573ae 100644 --- a/src/auth/test-mock.c +++ b/src/auth/test-mock.c @@ -35,7 +35,7 @@ static struct passdb_module_interface mock_interface = { .verify_plain = passdb_mock_verify_plain, }; -static struct auth_passdb_settings set = { +struct auth_passdb_settings mock_passdb_set = { .name = "mock", .driver = "mock", .args = "", @@ -95,7 +95,7 @@ void passdb_mock_mod_deinit(void) struct auth_passdb *passdb_mock(void) { struct auth_passdb *ret = i_new(struct auth_passdb, 1); - ret->set = &set; + ret->set = &mock_passdb_set; ret->passdb = mock_passdb_mod; return ret; } diff --git a/src/auth/test-username-filter.c b/src/auth/test-username-filter.c index 9149bad466..4a1c221c2d 100644 --- a/src/auth/test-username-filter.c +++ b/src/auth/test-username-filter.c @@ -1,5 +1,7 @@ /* Copyright (c) 2017-2018 Dovecot authors, see the included COPYING file */ +#include "lib.h" +#include "auth-settings.h" #include "test-auth.h" #include "auth-request.h"