diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-03-06 03:31:34 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-03-06 03:31:34 +0000 |
commit | b3144e58e74ad9cc3c07da94264c3ccbfccb5cf7 (patch) | |
tree | 9ad479c3eef78443192fc92f20a281ac45cca8ed /authfd.c | |
parent | be6a5a6dfe14c516b0982e57bb95f022bf19cf46 (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.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -35,7 +35,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: authfd.c,v 1.37 2001/03/04 17:42:27 millert Exp $"); +RCSID("$OpenBSD: authfd.c,v 1.38 2001/03/06 00:33:03 deraadt Exp $"); #include <openssl/evp.h> @@ -120,6 +120,8 @@ ssh_request_reply(AuthenticationConnection *auth, Buffer *request, Buffer *reply len = 4; while (len > 0) { l = read(auth->fd, buf + 4 - len, len); + if (l == -1 && (errno == EAGAIN || errno == EINTR)) + continue; if (l <= 0) { error("Error reading response length from authentication socket."); return 0; @@ -139,6 +141,8 @@ ssh_request_reply(AuthenticationConnection *auth, Buffer *request, Buffer *reply if (l > sizeof(buf)) l = sizeof(buf); l = read(auth->fd, buf, l); + if (l == -1 && (errno == EAGAIN || errno == EINTR)) + continue; if (l <= 0) { error("Error reading response from authentication socket."); return 0; |