- djm@cvs.openbsd.org 2003/01/10 10:32:54

[channels.c]
     hush socket() errors, except last. Fixes mindrot bug #408; ok markus@
This commit is contained in:
Damien Miller 2003-01-10 21:45:12 +11:00
parent 86b781c179
commit b46b9f322d
2 changed files with 9 additions and 3 deletions

View File

@ -22,6 +22,9 @@
Don't ftruncate after write error, creating sparse files of
incorrect length
mindrot bug #403, reported by rusr@cup.hp.com; ok markus@
- djm@cvs.openbsd.org 2003/01/10 10:32:54
[channels.c]
hush socket() errors, except last. Fixes mindrot bug #408; ok markus@
20030108
- (djm) Sync openbsd-compat/ with OpenBSD -current
@ -990,4 +993,4 @@
save auth method before monitor_reset_key_state(); bugzilla bug #284;
ok provos@
$Id: ChangeLog,v 1.2562 2003/01/10 10:44:48 djm Exp $
$Id: ChangeLog,v 1.2563 2003/01/10 10:45:12 djm Exp $

View File

@ -39,7 +39,7 @@
*/
#include "includes.h"
RCSID("$OpenBSD: channels.c,v 1.185 2003/01/01 18:08:52 markus Exp $");
RCSID("$OpenBSD: channels.c,v 1.186 2003/01/10 10:32:54 djm Exp $");
#include "ssh.h"
#include "ssh1.h"
@ -2281,7 +2281,10 @@ connect_to(const char *host, u_short port)
}
sock = socket(ai->ai_family, SOCK_STREAM, 0);
if (sock < 0) {
error("socket: %.100s", strerror(errno));
if (ai->ai_next == NULL)
error("socket: %.100s", strerror(errno));
else
verbose("socket: %.100s", strerror(errno));
continue;
}
if (fcntl(sock, F_SETFL, O_NONBLOCK) < 0)