int buflen;
char uid[128];
char mech[10];
- char sslclifp[128];
+ char *sslclifp;
int flags;
};
if (session->buf)
free(session->buf);
+ if (session->sslclifp)
+ free(session->sslclifp);
+
if (session->next)
session->next->prev = session->prev;
if (session->prev)
}
else
{
- if (!(hi = loc_auth(NULL, authcid, passwd, NULL)))
+ if (!(hi = loc_auth(session->sslclifp, authcid, passwd, NULL)))
{
log_module(NS_LOG, LOG_DEBUG, "SASL: Invalid credentials supplied");
irc_sasl(session->source, session->uid, "D", "F");
}
void
-handle_sasl_input(struct server* source ,const char *uid, const char *subcmd, const char *data, UNUSED_ARG(const char *ext), UNUSED_ARG(void *extra))
+handle_sasl_input(struct server* source ,const char *uid, const char *subcmd, const char *data, const char *ext, UNUSED_ARG(void *extra))
{
struct SASLSession* sess = sasl_get_session(uid);
int len = strlen(data);
memcpy(sess->p, data, len);
sess->buf[len] = '\0';
+ if (ext != NULL)
+ sess->sslclifp = strdup(ext);
+
/* Messages not exactly 400 bytes are the end of a packet. */
if(len < 400)
{