1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -05:00

Add an option to disable SSH-2 banners.

[originally from svn r9055]
This commit is contained in:
Jacob Nevins
2010-12-27 01:19:13 +00:00
parent 526aff23b6
commit af1060856e
6 changed files with 27 additions and 2 deletions

6
ssh.c
View File

@ -7194,12 +7194,14 @@ static void ssh2_msg_channel_open(Ssh ssh, struct Packet *pktin)
}
/*
* Buffer banner messages for later display at some convenient point.
* Buffer banner messages for later display at some convenient point,
* if we're going to display them.
*/
static void ssh2_msg_userauth_banner(Ssh ssh, struct Packet *pktin)
{
/* Arbitrary limit to prevent unbounded inflation of buffer */
if (bufchain_size(&ssh->banner) <= 131072) {
if (ssh->cfg.ssh_show_banner &&
bufchain_size(&ssh->banner) <= 131072) {
char *banner = NULL;
int size = 0;
ssh_pkt_getstring(pktin, &banner, &size);