mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-25 04:43:33 +00:00
It fixes a really annoying error
reporting bug which happens if the remote end uses tcp_wrappers to control sshd access (it says something like "read: no such file or directory" or "read: permission denied" instead of "connection closed"). I already sent it in to the ssh mailing list. Submitted by: fenner
This commit is contained in:
parent
781b71b2a6
commit
3c3ae1773e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=4020
32
security/ssh/files/patch-ad
Normal file
32
security/ssh/files/patch-ad
Normal file
@ -0,0 +1,32 @@
|
||||
*** sshconnect.c.orig Wed Oct 16 10:10:26 1996
|
||||
--- sshconnect.c Wed Oct 16 10:23:49 1996
|
||||
***************
|
||||
*** 797,802 ****
|
||||
--- 797,803 ----
|
||||
char buf[256], remote_version[256]; /* must be same size! */
|
||||
int remote_major, remote_minor, i;
|
||||
int my_major, my_minor;
|
||||
+ int len;
|
||||
int connection_in = packet_get_connection_in();
|
||||
int connection_out = packet_get_connection_out();
|
||||
|
||||
***************
|
||||
*** 803,809 ****
|
||||
/* Read other side\'s version identification. */
|
||||
for (i = 0; i < sizeof(buf) - 1; i++)
|
||||
{
|
||||
! if (read(connection_in, &buf[i], 1) != 1)
|
||||
fatal("read: %.100s", strerror(errno));
|
||||
if (buf[i] == '\r')
|
||||
{
|
||||
--- 804,813 ----
|
||||
/* Read other side\'s version identification. */
|
||||
for (i = 0; i < sizeof(buf) - 1; i++)
|
||||
{
|
||||
! len = read(connection_in, &buf[i], 1);
|
||||
! if (len == 0)
|
||||
! fatal("Connection closed by foreign host.");
|
||||
! else if (len < 0)
|
||||
fatal("read: %.100s", strerror(errno));
|
||||
if (buf[i] == '\r')
|
||||
{
|
32
security/ssh2/files/patch-ad
Normal file
32
security/ssh2/files/patch-ad
Normal file
@ -0,0 +1,32 @@
|
||||
*** sshconnect.c.orig Wed Oct 16 10:10:26 1996
|
||||
--- sshconnect.c Wed Oct 16 10:23:49 1996
|
||||
***************
|
||||
*** 797,802 ****
|
||||
--- 797,803 ----
|
||||
char buf[256], remote_version[256]; /* must be same size! */
|
||||
int remote_major, remote_minor, i;
|
||||
int my_major, my_minor;
|
||||
+ int len;
|
||||
int connection_in = packet_get_connection_in();
|
||||
int connection_out = packet_get_connection_out();
|
||||
|
||||
***************
|
||||
*** 803,809 ****
|
||||
/* Read other side\'s version identification. */
|
||||
for (i = 0; i < sizeof(buf) - 1; i++)
|
||||
{
|
||||
! if (read(connection_in, &buf[i], 1) != 1)
|
||||
fatal("read: %.100s", strerror(errno));
|
||||
if (buf[i] == '\r')
|
||||
{
|
||||
--- 804,813 ----
|
||||
/* Read other side\'s version identification. */
|
||||
for (i = 0; i < sizeof(buf) - 1; i++)
|
||||
{
|
||||
! len = read(connection_in, &buf[i], 1);
|
||||
! if (len == 0)
|
||||
! fatal("Connection closed by foreign host.");
|
||||
! else if (len < 0)
|
||||
fatal("read: %.100s", strerror(errno));
|
||||
if (buf[i] == '\r')
|
||||
{
|
Loading…
Reference in New Issue
Block a user