[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SSH stdio blocking problem
From: |
Mark D. Baushke |
Subject: |
SSH stdio blocking problem |
Date: |
Fri, 10 Dec 2004 09:37:36 -0800 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
As an FYI, the OpenSSH developers got a bug report on the non-blocking
stdio problem that was previously reported to cvs maintainers:
http://bugzilla.mindrot.org/show_bug.cgi?id=961
I suggested that cvs-1.11.18 and cvs 1.12.10 worked around this SSH
problem and one of the OpenSSH maintainers said that the problem had
never been reported (I thought it had been reported, but I can't find
the message myself), but that a patch was easy and provided one for
review (attached).
-- Mark
The suggested patch for this problem:
http://bugzilla.mindrot.org/attachment.cgi?id=751&action=view
Index: session.c
===================================================================
RCS file: /cvs/src/usr.bin/ssh/session.c,v
retrieving revision 1.180
diff -u -r1.180 session.c
- --- session.c 28 Jul 2004 09:40:29 -0000 1.180
+++ session.c 10 Dec 2004 09:50:44 -0000
@@ -1103,6 +1103,11 @@
/* remove hostkey from the child's memory */
destroy_sensitive_data();
+ /* Make sure stdio is returned to blocking mode */
+ unset_nonblock(STDIN_FILENO);
+ unset_nonblock(STDOUT_FILENO);
+ unset_nonblock(STDERR_FILENO);
+
/* Force a password change */
if (s->authctxt->force_pwchange) {
do_setusercontext(pw);
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)
iD8DBQFBud7f3x41pRYZE/gRAvv1AJ43duBbnZo7qXcSIWUTw7/LR1TULQCeM8J8
7sC3Pnmd2wmXij87ZzeDcJA=
=stiv
-----END PGP SIGNATURE-----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- SSH stdio blocking problem,
Mark D. Baushke <=