I have a long, 1184 bytes, banner file. It is the one that Titan installs. and with the 3.6 version of ssh it prints fine. With the 3.7 version only part of it prints.
Created attachment 418 [details] The offending banner file
Created attachment 419 [details] Don't use logit() for banner How about something like the attached patch? (WARNING: almost entirely untested)
Works for me, almost. I didn't need a blank line at the bottom of the banner file before. The login message appears on the same line as the last line in the file. If there is a blank line on the bottom everything appears the same. Now that I know where to look the new code is the same as the old 3.6p2 code. The newline must have come from elsewhere.
Just change sshconnect2.c line 369 from fprintf(stderr, "%s", fmtbuf); to fprintf(stderr, "%s\n", fmtbuf);
Hang on, that undoes the fix for bug #225
Created attachment 421 [details] check options.loglevel and use fprintf Damn, you're right. I thought that looked strangely familiar.
It is now a perfect fix, thank you.
This has now been fixed in OpenBSD, it will appear in Portable's snapshots shortly.
I found one problem with the fix. If there is a banner file defined at the target system and it does not exist or is zero length the ssh command will fail with ax "malloc: zero size" error.
Another problem with 3.7.1p2 and banners, the banner ends with an extra cr and not a crnl
who is printing: "malloc: zero size"? this would be a different bug.
I added some regression tests with the the fix, including a test of a zero- length banner file and I haven't seen the malloc error you reported. Please open a new bug and attach the output of "ssh -vvv" showing the problem. The extra CR thing is also fixed by patch id #421.
Created attachment 479 [details] Trace of ssh -vvv
Error at this end. Somehow the patch was reverted to an older version. Sorry to have bothered you.
*** Bug 753 has been marked as a duplicate of this bug. ***
*** Bug 765 has been marked as a duplicate of this bug. ***
Mass change of RESOLVED bugs to CLOSED