m_sasl: indicate client connection type for SASL

This commit is contained in:
Simon Arlott 2017-08-09 22:04:11 +01:00
parent a6485efda0
commit 754c1edf2e
No known key found for this signature in database
GPG key ID: C8975F2043CA5D24
2 changed files with 13 additions and 2 deletions

View file

@ -766,6 +766,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

View file

@ -128,9 +128,10 @@ m_authenticate(struct Client *client_p, struct Client *source_p,
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 (!strcmp(parv[1], "EXTERNAL") && source_p->certfp != NULL)
sendto_one(saslserv_p, ":%s ENCAP %s SASL %s %s S %s %s",