diff options
Diffstat (limited to 'authfd.c')
-rw-r--r-- | authfd.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include "includes.h" | 37 | #include "includes.h" |
38 | RCSID("$OpenBSD: authfd.c,v 1.37 2001/03/04 17:42:27 millert Exp $"); | 38 | RCSID("$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; |