banner cut off despite applying patch

From: Becky (nm_runner_at_earthlink.net)
Date: 03/17/04


Date: 17 Mar 2004 07:33:41 -0800

I have a long banner, and so have tried upgrading to openssh 3.8.1p1.
I've also tried applying the patch recommended in bugzilla, but the
banner is still cut off. I don't have the option of reworking the
banner to make it smaller. Here are the sections of sshconnect2.c
that I've modified. What am I doing wrong? Thanks for your help,

Original code

    358 input_userauth_banner(int type, u_int32_t seq, void *ctxt)
    359 {
    360 char *msg, *lang;
    361
    362 debug3("input_userauth_banner");
    363 msg = packet_get_string(NULL);
    364 lang = packet_get_string(NULL);
    365 if (options.log_level > SYSLOG_LEVEL_QUIET)
    366 fprintf(stderr, "%s", msg);
    367 xfree(msg);
    368 xfree(lang);
    369 }

Patched code

input_userauth_banner(int type, u_int32_t seq, void *ctxt)
    359 {
    360 char *fmtbuf, *msgbuf, *lang;
    361 size_t len;
    362
    363 debug3("input_userauth_banner");
    364 msgbuf = packet_get_string(NULL);
    365 lang = packet_get_string(NULL);
    366 if (options.log_level > SYSLOG_LEVEL_QUIET)
    367 fprintf(stderr, "%s", msg);
    368 len = strlen(msgbuf);
    369 fmtbuf = xmalloc(len);
    370 strnvis(fmtbuf, msgbuf, len, VIS_SAFE|VIS_OCTAL);
    371 fprintf(stderr, "%s", fmtbuf);
    372 xfree(msgbuf);
    373 xfree(fmtbuf);
    374 xfree(lang);
    375 }



Relevant Pages

  • banner cut off despite patch in bugzilla
    ... I have a long banner, and so have tried upgrading to openssh 3.8.1p1. ... tried applying the patch recommended in bugzilla, but the banner is still cut ... Original code ...
    (SSH)
  • Re: banner cut off despite applying patch
    ... >I have a long banner, and so have tried upgrading to openssh 3.8.1p1. ... The modified code in the previous post doesn't look right either. ... Good judgement comes with experience. ...
    (comp.security.ssh)