1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

Treat USER specially in event logging of Telnet ENVIRON option; it's

occasionally been a pain that the username wasn't visible in the Event Log.

[originally from svn r4573]
This commit is contained in:
Jacob Nevins 2004-09-22 22:38:23 +00:00
parent 6f83b757e9
commit f927fd9728

View File

@ -518,8 +518,13 @@ static void process_subneg(Telnet telnet)
b[n++] = IAC;
b[n++] = SE;
telnet->bufsize = sk_write(telnet->s, (char *)b, n);
logbuf = dupprintf("client:\tSB %s IS %s", telopt(telnet->sb_opt),
n == 6 ? "<nothing>" : "<stuff>");
logbuf = dupprintf("client:\tSB %s IS %s%s%s%s",
telopt(telnet->sb_opt),
*telnet->cfg.username ? "USER=" : "",
telnet->cfg.username,
*telnet->cfg.username ? " " : "",
n == 6 ? "<nothing>" :
(*telnet->cfg.environmt ? "<stuff>" : ""));
logevent(telnet->frontend, logbuf);
sfree(logbuf);
}