From: Aki Tuomi Date: Wed, 15 Nov 2017 17:13:39 +0000 (+0200) Subject: auth: Add accessor for userdb-template fields X-Git-Tag: 2.3.0.rc1~412 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=38f53f9d3eda5002b3478f7679d352ee4da60d2f;p=thirdparty%2Fdovecot%2Fcore.git auth: Add accessor for userdb-template fields It's needed in lua --- diff --git a/src/auth/userdb-template.c b/src/auth/userdb-template.c index 1c1ce9c8ea..5de38a7add 100644 --- a/src/auth/userdb-template.c +++ b/src/auth/userdb-template.c @@ -117,3 +117,8 @@ bool userdb_template_is_empty(struct userdb_template *tmpl) { return array_count(&tmpl->args) == 0; } + +const char *const *userdb_template_get_args(struct userdb_template *tmpl, unsigned int *count_r) +{ + return array_get(&tmpl->args, count_r); +} diff --git a/src/auth/userdb-template.h b/src/auth/userdb-template.h index bf1ce8181d..a146a87e96 100644 --- a/src/auth/userdb-template.h +++ b/src/auth/userdb-template.h @@ -9,5 +9,7 @@ int userdb_template_export(struct userdb_template *tmpl, bool userdb_template_remove(struct userdb_template *tmpl, const char *key, const char **value_r); bool userdb_template_is_empty(struct userdb_template *tmpl); +const char *const *userdb_template_get_args(struct userdb_template *tmpl, + unsigned int *count_r); #endif