]> jfr.im git - solanum.git/blobdiff - modules/m_sasl.c
m_info: Correct description of general::client_exit like in example confs.
[solanum.git] / modules / m_sasl.c
index d5f87140f0d386688b4f4bdc8e36e0c913d05ed2..8dbbf0e7f04926e860a01f1c7af2e58d1688f351 100644 (file)
@@ -106,8 +106,15 @@ mr_authenticate(struct Client *client_p, struct Client *source_p,
                agent_p = find_id(source_p->preClient->sasl_agent);
 
        if(agent_p == NULL)
-               sendto_server(NULL, NULL, CAP_TS6|CAP_ENCAP, NOCAPS, ":%s ENCAP * SASL %s * S %s", me.id,
-                               source_p->id, parv[1]);
+       {
+               if (!strcmp(parv[1], "EXTERNAL") && source_p->certfp != NULL)
+                       sendto_server(NULL, NULL, CAP_TS6|CAP_ENCAP, NOCAPS, ":%s ENCAP * SASL %s * S %s %s", me.id,
+                                       source_p->id, parv[1],
+                                       source_p->certfp);
+               else
+                       sendto_server(NULL, NULL, CAP_TS6|CAP_ENCAP, NOCAPS, ":%s ENCAP * SASL %s * S %s", me.id,
+                                       source_p->id, parv[1]);
+       }
        else
                sendto_one(agent_p, ":%s ENCAP %s SASL %s %s C %s", me.id, agent_p->servptr->name,
                                source_p->id, agent_p->id, parv[1]);
@@ -150,7 +157,7 @@ me_sasl(struct Client *client_p, struct Client *source_p,
        if(*target_p->preClient->sasl_agent && strncmp(parv[1], target_p->preClient->sasl_agent, IDLEN))
                return 0;
        else if(!*target_p->preClient->sasl_agent)
-               strlcpy(target_p->preClient->sasl_agent, parv[1], IDLEN);
+               rb_strlcpy(target_p->preClient->sasl_agent, parv[1], IDLEN);
 
        if(*parv[3] == 'C')
                sendto_one(target_p, "AUTHENTICATE %s", parv[4]);