summaryrefslogtreecommitdiff
path: root/authfd.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-03-06 03:31:34 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-03-06 03:31:34 +0000
commitb3144e58e74ad9cc3c07da94264c3ccbfccb5cf7 (patch)
tree9ad479c3eef78443192fc92f20a281ac45cca8ed /authfd.c
parentbe6a5a6dfe14c516b0982e57bb95f022bf19cf46 (diff)
- deraadt@cvs.openbsd.org 2001/03/06 00:33:04
[authfd.c cli.c ssh-agent.c] EINTR/EAGAIN handling is required in more cases
Diffstat (limited to 'authfd.c')
-rw-r--r--authfd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/authfd.c b/authfd.c
index 76e917755..8613b9a52 100644
--- a/authfd.c
+++ b/authfd.c
@@ -35,7 +35,7 @@
35 */ 35 */
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$OpenBSD: authfd.c,v 1.37 2001/03/04 17:42:27 millert Exp $"); 38RCSID("$OpenBSD: authfd.c,v 1.38 2001/03/06 00:33:03 deraadt Exp $");
39 39
40#include <openssl/evp.h> 40#include <openssl/evp.h>
41 41
@@ -120,6 +120,8 @@ ssh_request_reply(AuthenticationConnection *auth, Buffer *request, Buffer *reply
120 len = 4; 120 len = 4;
121 while (len > 0) { 121 while (len > 0) {
122 l = read(auth->fd, buf + 4 - len, len); 122 l = read(auth->fd, buf + 4 - len, len);
123 if (l == -1 && (errno == EAGAIN || errno == EINTR))
124 continue;
123 if (l <= 0) { 125 if (l <= 0) {
124 error("Error reading response length from authentication socket."); 126 error("Error reading response length from authentication socket.");
125 return 0; 127 return 0;
@@ -139,6 +141,8 @@ ssh_request_reply(AuthenticationConnection *auth, Buffer *request, Buffer *reply
139 if (l > sizeof(buf)) 141 if (l > sizeof(buf))
140 l = sizeof(buf); 142 l = sizeof(buf);
141 l = read(auth->fd, buf, l); 143 l = read(auth->fd, buf, l);
144 if (l == -1 && (errno == EAGAIN || errno == EINTR))
145 continue;
142 if (l <= 0) { 146 if (l <= 0) {
143 error("Error reading response from authentication socket."); 147 error("Error reading response from authentication socket.");
144 return 0; 148 return 0;