Bug 707 - missing banner file now prints empty line
Summary: missing banner file now prints empty line
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: -current
Hardware: All All
: P5 trivial
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-24 01:30 AEST by Al Smith
Modified: 2004-04-14 12:24 AEST (History)
0 users

See Also:


Attachments
patch (382 bytes, patch)
2003-09-24 01:31 AEST, Al Smith
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Al Smith 2003-09-24 01:30:33 AEST
New in 3.7p1 and above, if the banner file is missing then sshd will send a
banner to an SSH2 client, containing a newline.

auth2_read_banner() correctly returns a NULL if the file is missing, but
this is lost in the privsep: if in auth2-none.c the PRIVSEP() is removed from
auth2_read_banner() then everything works fine.

Upon further analysis I came to the conclusion that
mm_answer_auth2_read_banner() will return either a banner string,
or an empty string. It will never return NULL, so presumably
mm_auth2_read_banner() will also never return NULL to its caller
in userauth_banner().

A patch will be attached. It could be better.
And a better solution is to just not point UseBanner to an non-existant file!
Comment 1 Al Smith 2003-09-24 01:31:42 AEST
Created attachment 459 [details]
patch
Comment 2 Darren Tucker 2003-10-07 16:50:26 AEST
This has been fixed in OpenBSD and will appear in -Portable's snapshots shortly.
Comment 3 Damien Miller 2004-04-14 12:24:19 AEST
Mass change of RESOLVED bugs to CLOSED