mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-12-23 18:32:26 +00:00
- djm@cvs.openbsd.org 2005/10/30 04:01:03
[ssh-keyscan.c] make ssh-keygen discard junk from server before SSH- ident, spotted by dave AT cirt.net; ok dtucker@
This commit is contained in:
parent
b3bfbb7355
commit
4bbacb706b
@ -58,6 +58,10 @@
|
||||
[ssh_config.5]
|
||||
mention control socket fallback behaviour, reported by
|
||||
tryponraj AT gmail.com
|
||||
- djm@cvs.openbsd.org 2005/10/30 04:01:03
|
||||
[ssh-keyscan.c]
|
||||
make ssh-keygen discard junk from server before SSH- ident, spotted by
|
||||
dave AT cirt.net; ok dtucker@
|
||||
|
||||
20051102
|
||||
- (dtucker) [openbsd-compat/bsd-misc.c] Bug #1108: fix broken strdup().
|
||||
@ -3191,4 +3195,4 @@
|
||||
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
|
||||
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
|
||||
|
||||
$Id: ChangeLog,v 1.3940 2005/11/05 04:11:48 djm Exp $
|
||||
$Id: ChangeLog,v 1.3941 2005/11/05 04:12:28 djm Exp $
|
||||
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: ssh-keyscan.c,v 1.56 2005/09/13 23:40:07 djm Exp $");
|
||||
RCSID("$OpenBSD: ssh-keyscan.c,v 1.57 2005/10/30 04:01:03 djm Exp $");
|
||||
|
||||
#include "openbsd-compat/sys-queue.h"
|
||||
|
||||
@ -499,12 +499,18 @@ congreet(int s)
|
||||
size_t bufsiz;
|
||||
con *c = &fdcon[s];
|
||||
|
||||
bufsiz = sizeof(buf);
|
||||
cp = buf;
|
||||
while (bufsiz-- && (n = atomicio(read, s, cp, 1)) == 1 && *cp != '\n') {
|
||||
if (*cp == '\r')
|
||||
*cp = '\n';
|
||||
cp++;
|
||||
for (;;) {
|
||||
memset(buf, '\0', sizeof(buf));
|
||||
bufsiz = sizeof(buf);
|
||||
cp = buf;
|
||||
while (bufsiz-- &&
|
||||
(n = atomicio(read, s, cp, 1)) == 1 && *cp != '\n') {
|
||||
if (*cp == '\r')
|
||||
*cp = '\n';
|
||||
cp++;
|
||||
}
|
||||
if (n != 1 || strncmp(buf, "SSH-", 4) == 0)
|
||||
break;
|
||||
}
|
||||
if (n == 0) {
|
||||
switch (errno) {
|
||||
|
Loading…
Reference in New Issue
Block a user