Module Name:    src
Committed By:   christos
Date:           Mon Aug  1 15:55:00 UTC 2011

Modified Files:
        src/crypto/external/bsd/openssh/dist: atomicio.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/crypto/external/bsd/openssh/dist/atomicio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssh/dist/atomicio.c
diff -u src/crypto/external/bsd/openssh/dist/atomicio.c:1.3 src/crypto/external/bsd/openssh/dist/atomicio.c:1.4
--- src/crypto/external/bsd/openssh/dist/atomicio.c:1.3	Sun Jul 24 23:03:10 2011
+++ src/crypto/external/bsd/openssh/dist/atomicio.c	Mon Aug  1 11:55:00 2011
@@ -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) {

Reply via email to