Source-Changes-HG archive

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

[src/trunk]: src/crypto/external/bsd/openssh/dist PR/45200: : J. Hannken-Illj...



details:   https://anonhg.NetBSD.org/src/rev/38bb7be5a5bf
branches:  trunk
changeset: 767849:38bb7be5a5bf
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Aug 01 15:55:00 2011 +0000

description:
PR/45200: : J. Hannken-Illjes: Scp hangs after sending:
- check for vwrite() instead of read() to avoid read() being renamed by SSP

diffstat:

 crypto/external/bsd/openssh/dist/atomicio.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r 0e4d9405082b -r 38bb7be5a5bf crypto/external/bsd/openssh/dist/atomicio.c
--- a/crypto/external/bsd/openssh/dist/atomicio.c       Mon Aug 01 15:41:34 2011 +0000
+++ b/crypto/external/bsd/openssh/dist/atomicio.c       Mon Aug 01 15:55:00 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atomicio.c,v 1.3 2011/07/25 03:03:10 christos Exp $    */
+/*     $NetBSD: atomicio.c,v 1.4 2011/08/01 15:55:00 christos Exp $    */
 /* $OpenBSD: atomicio.c,v 1.26 2010/09/22 22:58:51 djm Exp $ */
 /*
  * Copyright (c) 2006 Damien Miller. All rights reserved.
@@ -28,7 +28,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: atomicio.c,v 1.3 2011/07/25 03:03:10 christos Exp $");
+__RCSID("$NetBSD: atomicio.c,v 1.4 2011/08/01 15:55:00 christos Exp $");
 #include <sys/param.h>
 #include <sys/uio.h>
 
@@ -52,7 +52,11 @@
        struct pollfd pfd;
 
        pfd.fd = fd;
-       pfd.events = f == read ? POLLIN : POLLOUT;
+       /*
+        * check for vwrite instead of read to avoid read being renamed
+        * by SSP issues
+        */
+       pfd.events = f == vwrite ? POLLOUT : POLLIN;
        while (n > pos) {
                res = (f) (fd, s + pos, n - pos);
                switch (res) {



Home | Main Index | Thread Index | Old Index