Deleted Added
full compact
sshconnect.c (294336) sshconnect.c (294496)
1/* $OpenBSD: sshconnect.c,v 1.262 2015/05/28 05:41:29 dtucker Exp $ */
1/* $OpenBSD: sshconnect.c,v 1.263 2015/08/20 22:32:42 deraadt Exp $ */
2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
5 * All rights reserved
6 * Code to connect to a remote host, and to perform the client side of the
7 * login (authentication) dialog.
8 *
9 * As far as I am concerned, the code I have written for this software
10 * can be used freely for any purpose. Any derived versions of this
11 * software must be clearly marked as such, and if the derived work is
12 * incompatible with the protocol description in the RFC file, it must be
13 * called by a name other than "ssh" or "Secure Shell".
14 */
15
16#include "includes.h"
2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
5 * All rights reserved
6 * Code to connect to a remote host, and to perform the client side of the
7 * login (authentication) dialog.
8 *
9 * As far as I am concerned, the code I have written for this software
10 * can be used freely for any purpose. Any derived versions of this
11 * software must be clearly marked as such, and if the derived work is
12 * incompatible with the protocol description in the RFC file, it must be
13 * called by a name other than "ssh" or "Secure Shell".
14 */
15
16#include "includes.h"
17__RCSID("$FreeBSD: head/crypto/openssh/sshconnect.c 294336 2016-01-19 18:55:44Z des $");
17__RCSID("$FreeBSD: head/crypto/openssh/sshconnect.c 294496 2016-01-21 11:54:34Z des $");
18
19#include <sys/param.h> /* roundup */
20#include <sys/types.h>
21#include <sys/wait.h>
22#include <sys/stat.h>
23#include <sys/socket.h>
24#ifdef HAVE_SYS_TIME_H
25# include <sys/time.h>

--- 327 unchanged lines hidden (view full) ---

353 result = 0;
354 goto done;
355 }
356 if (errno != EINPROGRESS) {
357 result = -1;
358 goto done;
359 }
360
18
19#include <sys/param.h> /* roundup */
20#include <sys/types.h>
21#include <sys/wait.h>
22#include <sys/stat.h>
23#include <sys/socket.h>
24#ifdef HAVE_SYS_TIME_H
25# include <sys/time.h>

--- 327 unchanged lines hidden (view full) ---

353 result = 0;
354 goto done;
355 }
356 if (errno != EINPROGRESS) {
357 result = -1;
358 goto done;
359 }
360
361 fdset = (fd_set *)xcalloc(howmany(sockfd + 1, NFDBITS),
361 fdset = xcalloc(howmany(sockfd + 1, NFDBITS),
362 sizeof(fd_mask));
363 FD_SET(sockfd, fdset);
364 ms_to_timeval(&tv, *timeoutp);
365
366 for (;;) {
367 rc = select(sockfd + 1, NULL, fdset, NULL, &tv);
368 if (rc != -1 || errno != EINTR)
369 break;

--- 1121 unchanged lines hidden ---
362 sizeof(fd_mask));
363 FD_SET(sockfd, fdset);
364 ms_to_timeval(&tv, *timeoutp);
365
366 for (;;) {
367 rc = select(sockfd + 1, NULL, fdset, NULL, &tv);
368 if (rc != -1 || errno != EINTR)
369 break;

--- 1121 unchanged lines hidden ---