version 1.184, 2006/06/08 14:45:49 |
version 1.185, 2006/06/14 10:50:42 |
|
|
int connection_in = packet_get_connection_in(); |
int connection_in = packet_get_connection_in(); |
int connection_out = packet_get_connection_out(); |
int connection_out = packet_get_connection_out(); |
int minor1 = PROTOCOL_MINOR_1; |
int minor1 = PROTOCOL_MINOR_1; |
u_int i; |
u_int i, n; |
|
|
/* Read other side's version identification. */ |
/* Read other side's version identification. */ |
for (;;) { |
for (n = 0;;) { |
for (i = 0; i < sizeof(buf) - 1; i++) { |
for (i = 0; i < sizeof(buf) - 1; i++) { |
size_t len = atomicio(read, connection_in, &buf[i], 1); |
size_t len = atomicio(read, connection_in, &buf[i], 1); |
|
|
|
|
buf[i + 1] = 0; |
buf[i + 1] = 0; |
break; |
break; |
} |
} |
|
if (++n > 65536) |
|
fatal("ssh_exchange_identification: No banner received"); |
} |
} |
buf[sizeof(buf) - 1] = 0; |
buf[sizeof(buf) - 1] = 0; |
if (strncmp(buf, "SSH-", 4) == 0) |
if (strncmp(buf, "SSH-", 4) == 0) |