/* Initalise all providers */
void init_providers(void)
{
- rb_dlink_node *ptr;
- struct auth_provider *provider;
-
- RB_DLINK_FOREACH(ptr, auth_providers.head)
- {
- provider = ptr->data;
-
- if(provider->init && !provider->init())
- /* Provider failed to init, time to go */
- exit(1);
- }
+ load_provider(&rdns_provider);
}
/* Terminate all providers */
}
/* Begin authenticating user */
-static void start_auth(const char *cid, const char *l_ip, const char *l_port, const char *c_ip, const char *c_port)
+static void start_auth(const char *cid, const char *l_ip, const char *l_port, const char *c_addr, const char *c_port)
{
rb_dlink_node *ptr;
struct auth_provider *provider;
(void)rb_inet_pton_sock(l_ip, (struct sockaddr *)&auth->l_ip);
auth->l_port = (uint16_t)atoi(l_port); /* Safe cast, port shouldn't exceed 16 bits */
- (void)rb_inet_pton_sock(c_ip, (struct sockaddr *)&auth->c_ip);
+ (void)rb_inet_pton_sock(c_addr, (struct sockaddr *)&auth->c_addr);
auth->c_port = (uint16_t)atoi(c_port);
RB_DLINK_FOREACH(ptr, auth_providers.head)