pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/ssh2 Fixed bug, which only appeared in the Ne...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c1e9227ee0ee
branches:  trunk
changeset: 475857:c1e9227ee0ee
user:      kivinen <kivinen%pkgsrc.org@localhost>
date:      Fri May 28 12:00:10 2004 +0000

description:
Fixed bug, which only appeared in the NetBSD 2.0 systems where the
write can return 0 even when the select has indicated that socket
is writable. Do not consider this error, but call select again.

diffstat:

 security/ssh2/Makefile.common  |   3 ++-
 security/ssh2/distinfo         |   3 ++-
 security/ssh2/patches/patch-ah |  28 ++++++++++++++++++++++++++++
 3 files changed, 32 insertions(+), 2 deletions(-)

diffs (61 lines):

diff -r c317cf94ee1e -r c1e9227ee0ee security/ssh2/Makefile.common
--- a/security/ssh2/Makefile.common     Fri May 28 11:34:37 2004 +0000
+++ b/security/ssh2/Makefile.common     Fri May 28 12:00:10 2004 +0000
@@ -1,9 +1,10 @@
-# $NetBSD: Makefile.common,v 1.7 2004/03/12 16:40:08 seb Exp $
+# $NetBSD: Makefile.common,v 1.8 2004/05/28 12:00:10 kivinen Exp $
 #
 
 DISTNAME=      ssh-3.2.9.1
 CATEGORIES=    security
 MASTER_SITES=  ftp://ftp.ssh.com/pub/ssh/
+PKGREVISION=    1
 
 MAINTAINER=    seb%NetBSD.org@localhost
 HOMEPAGE=      http://www.ssh.com
diff -r c317cf94ee1e -r c1e9227ee0ee security/ssh2/distinfo
--- a/security/ssh2/distinfo    Fri May 28 11:34:37 2004 +0000
+++ b/security/ssh2/distinfo    Fri May 28 12:00:10 2004 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.6 2004/03/12 16:40:09 seb Exp $
+$NetBSD: distinfo,v 1.7 2004/05/28 12:00:10 kivinen Exp $
 
 SHA1 (ssh-3.2.9.1.tar.gz) = 22e4589c889aef18e53a8942716084f0d8ede7db
 Size (ssh-3.2.9.1.tar.gz) = 2269281 bytes
@@ -9,3 +9,4 @@
 SHA1 (patch-ae) = 0d1f358bd97290118002cc0fc489cbf7e334e681
 SHA1 (patch-af) = e7c956b858d02dfaf20e1fe1bfc36322d9eb6d67
 SHA1 (patch-ag) = 0f7a448875262e2536255ace27cf1a8f0c2a0517
+SHA1 (patch-ah) = dc9a496187907e34c602a9f99a65f8fe8a83c54e
diff -r c317cf94ee1e -r c1e9227ee0ee security/ssh2/patches/patch-ah
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/ssh2/patches/patch-ah    Fri May 28 12:00:10 2004 +0000
@@ -0,0 +1,28 @@
+$NetBSD: patch-ah,v 1.3 2004/05/28 12:00:10 kivinen Exp $
+
+--- lib/sshutil/sshsysutil/sshunixfdstream.c.orig      2003-12-03 15:17:31.000000000 +0200
++++ lib/sshutil/sshsysutil/sshunixfdstream.c
+@@ -337,16 +337,21 @@ int ssh_stream_fd_write(void *context, c
+   if (sdata->writefd >= 0)
+     {
+       len = write(sdata->writefd, buf, size);
+-      if (len >= 0)
++      if (len > 0)
+         return len;
+ 
+-      if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)
++      if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR ||
++        /* Special case for NetBSD 2.0, it may return len = 0 and errno = 0
++           which simply means, try again */
++        (len == 0 && errno == 0))
+         {
+           /* Cannot write more at this time. */
+           sdata->write_has_failed = TRUE;
+           ssh_stream_fd_request(sdata);
+           return -1;
+         }
++      else if (len == 0)
++      return 0;
+ 
+       /* A real error occurred while writing. */
+       sdata->write_has_failed = TRUE;



Home | Main Index | Thread Index | Old Index