0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-03 06:08:52 +02:00

authd/providers/ident: add configuration interface

This commit is contained in:
Elizabeth Myers 2016-03-26 16:36:50 -05:00
parent a0a218bac8
commit 67acafca57

View file

@ -343,6 +343,26 @@ ident_cancel(struct auth_client *auth)
client_fail(auth, REPORT_FAIL);
}
static void
add_conf_ident_timeout(const char *key, int parc, const char **parv)
{
int timeout = atoi(parv[0]);
if(timeout < 0)
{
warn_opers(L_CRIT, "BUG: ident timeout < 0 (value: %d)", timeout);
return;
}
ident_timeout = timeout;
}
struct auth_opts_handler ident_options[] =
{
{ "ident_timeout", 1, add_conf_ident_timeout },
{ NULL, 0, NULL },
};
struct auth_provider ident_provider =
{
@ -352,4 +372,5 @@ struct auth_provider ident_provider =
.start = ident_start,
.cancel = ident_cancel,
.completed = NULL,
.opt_handlers = ident_options,
};