From: Simon Arlott Date: Wed, 9 Aug 2017 21:04:11 +0000 (+0100) Subject: m_sasl: indicate client connection type for SASL X-Git-Url: https://jfr.im/git/solanum.git/commitdiff_plain/0ee833da4a28122952fe69d9660b55a87042c7f3?hp=fa2367e3f389beb97bcbbe012bfc17bd3d89c40e m_sasl: indicate client connection type for SASL --- diff --git a/doc/technical/ts6-protocol.txt b/doc/technical/ts6-protocol.txt index 36d63cd3..05a4955c 100644 --- a/doc/technical/ts6-protocol.txt +++ b/doc/technical/ts6-protocol.txt @@ -837,6 +837,16 @@ Part of a SASL authentication exchange. The mode is 'C' to send some data termination: 'A' for abort, 'F' for authentication failure, 'S' for authentication success). +3. +encap target: * +source: server +parameters: source uid, '*', 'H', hostname, ip, tls + +Provides information on a client. The "tls" data is either 'P' for a +plaintext connection or any other string for a TLS connection. +The source uid is that of an unregistered client. This is why it is not sent +as the prefix. + SAVE capab: SAVE source: server diff --git a/modules/m_sasl.c b/modules/m_sasl.c index 80e21661..06c45a1d 100644 --- a/modules/m_sasl.c +++ b/modules/m_sasl.c @@ -180,9 +180,10 @@ m_authenticate(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client * if(agent_p == NULL) { - sendto_one(saslserv_p, ":%s ENCAP %s SASL %s %s H %s %s", + sendto_one(saslserv_p, ":%s ENCAP %s SASL %s %s H %s %s %c", me.id, saslserv_p->servptr->name, source_p->id, saslserv_p->id, - source_p->host, source_p->sockhost); + source_p->host, source_p->sockhost, + IsSSL(source_p) ? 'S' : 'P'); if (source_p->certfp != NULL) sendto_one(saslserv_p, ":%s ENCAP %s SASL %s %s S %s %s",