]> jfr.im git - irc/charybdis-ircd/charybdis.git/commitdiff
m_sasl: indicate client connection type for SASL
authorSimon Arlott <sa.me.uk>
Wed, 9 Aug 2017 21:04:11 +0000 (22:04 +0100)
committerSimon Arlott <sa.me.uk>
Wed, 9 Aug 2017 21:04:11 +0000 (22:04 +0100)
doc/technical/ts6-protocol.txt
modules/m_sasl.c

index 36d63cd3c2d46e88afb3077996ed21336eed5a60..05a4955c7362526c54f04e5c8cc2b45cc9a2eb9f 100644 (file)
@@ -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
index 80e21661aabc2fd0c408c8f2ef313729061d744a..06c45a1de13cc5321a24f1dd326bfc0316bb3eee 100644 (file)
@@ -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",