Bugzilla – Attachment 985 Details for
Bug 1067
ssh-keyscan does not work with F-Secure SSH 3.2.0 sometimes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Ignore leading junk from the server
ssh-keyscan-ignore-leading-junk.diff (text/plain), 833 bytes, created by
Damien Miller
on 2005-10-10 21:41:36 AEST
(
hide
)
Description:
Ignore leading junk from the server
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2005-10-10 21:41:36 AEST
Size:
833 bytes
patch
obsolete
>Index: ssh-keyscan.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/ssh-keyscan.c,v >retrieving revision 1.56 >diff -u -p -r1.56 ssh-keyscan.c >--- ssh-keyscan.c 13 Sep 2005 23:40:07 -0000 1.56 >+++ ssh-keyscan.c 10 Oct 2005 11:39:11 -0000 >@@ -490,12 +491,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 (strncmp(buf, "SSH-", 4) == 0) >+ break; > } > if (n == 0) { > switch (errno) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1067
:
985
|
986