From e460ad84ab1cfb48bbf22256ae2f0615e63e026e Mon Sep 17 00:00:00 2001 From: Markus Valentin Date: Tue, 31 Mar 2020 14:57:38 +0200 Subject: [PATCH] auth: Move auths array from static source to extern in header This is needed for better testability of auth-mechanisms. --- src/auth/auth.c | 2 +- src/auth/auth.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/auth/auth.c b/src/auth/auth.c index e8045ba96c..2b8d32a129 100644 --- a/src/auth/auth.c +++ b/src/auth/auth.c @@ -31,7 +31,7 @@ static const struct auth_userdb_settings userdb_dummy_set = { .auth_verbose = "default", }; -static ARRAY(struct auth *) auths; +ARRAY_TYPE(auth) auths; static enum auth_passdb_skip auth_passdb_skip_parse(const char *str) { diff --git a/src/auth/auth.h b/src/auth/auth.h index 4d476e6738..3ca5a9bb12 100644 --- a/src/auth/auth.h +++ b/src/auth/auth.h @@ -5,6 +5,9 @@ #define PASSWORD_HIDDEN_STR "" +ARRAY_DEFINE_TYPE(auth, struct auth *); +extern ARRAY_TYPE(auth) auths; + enum auth_passdb_skip { AUTH_PASSDB_SKIP_NEVER, AUTH_PASSDB_SKIP_AUTHENTICATED, -- 2.47.3