0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 00:32:35 +01:00

authd: misc provider fixes

This commit is contained in:
Elizabeth Myers 2016-03-26 19:50:09 -05:00
parent 4ac5b30e77
commit f5586c3abb
3 changed files with 7 additions and 2 deletions

View file

@ -88,7 +88,7 @@ handle_options(int parc, char *parv[])
return;
}
handler->handler(parv[1], parc - 2, (const char **)(parv + 3));
handler->handler(parv[1], parc - 2, (const char **)&parv[2]);
}
static void

View file

@ -96,6 +96,7 @@ void init_providers(void)
auth_clients = rb_dictionary_create("pending auth clients", rb_uint32cmp);
load_provider(&rdns_provider);
load_provider(&ident_provider);
load_provider(&blacklist_provider);
}
/* Terminate all providers */

View file

@ -435,10 +435,13 @@ blacklists_destroy(void)
static void
add_conf_blacklist(const char *key, int parc, const char **parv)
{
rb_dlink_list filters;
rb_dlink_list filters = { NULL, NULL, 0 };
char *tmp, *elemlist = rb_strdup(parv[2]);
unsigned char iptype;
if(*elemlist == '*')
goto end;
for(char *elem = rb_strtok_r(elemlist, ",", &tmp); elem; elem = rb_strtok_r(NULL, ",", &tmp))
{
struct blacklist_filter *filter = rb_malloc(sizeof(struct blacklist_filter));
@ -485,6 +488,7 @@ add_conf_blacklist(const char *key, int parc, const char **parv)
rb_dlinkAdd(filter, &filter->node, &filters);
}
end:
rb_free(elemlist);
iptype = atoi(parv[1]) & 0x3;