]> andersk Git - openssh.git/blobdiff - ssh-agent.c
- stevesk@cvs.openbsd.org 2008/12/09 22:37:33
[openssh.git] / ssh-agent.c
index 8f9e2e8cec53a6bcc1365d5db82c2fa517d1259c..9123cfe6baf886b087c95c139ef2d96811231634 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.158 2008/06/28 13:58:23 djm Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.159 2008/06/28 14:05:15 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -312,6 +312,7 @@ process_sign_request2(SocketEntry *e)
        u_char *blob, *data, *signature = NULL;
        u_int blen, dlen, slen = 0;
        extern int datafellows;
+       int odatafellows;
        int ok = -1, flags;
        Buffer msg;
        Key *key;
@@ -322,6 +323,7 @@ process_sign_request2(SocketEntry *e)
        data = buffer_get_string(&e->request, &dlen);
 
        flags = buffer_get_int(&e->request);
+       odatafellows = datafellows;
        if (flags & SSH_AGENT_OLD_SIGNATURE)
                datafellows = SSH_BUG_SIGBLOB;
 
@@ -347,6 +349,7 @@ process_sign_request2(SocketEntry *e)
        xfree(blob);
        if (signature != NULL)
                xfree(signature);
+       datafellows = odatafellows;
 }
 
 /* shared */
@@ -958,7 +961,8 @@ after_select(fd_set *readset, fd_set *writeset)
                                            buffer_ptr(&sockets[i].output),
                                            buffer_len(&sockets[i].output));
                                        if (len == -1 && (errno == EAGAIN ||
-                                           errno == EINTR))
+                                           errno == EINTR ||
+                                           errno == EWOULDBLOCK))
                                                continue;
                                        break;
                                } while (1);
@@ -972,7 +976,8 @@ after_select(fd_set *readset, fd_set *writeset)
                                do {
                                        len = read(sockets[i].fd, buf, sizeof(buf));
                                        if (len == -1 && (errno == EAGAIN ||
-                                           errno == EINTR))
+                                           errno == EINTR ||
+                                           errno == EWOULDBLOCK))
                                                continue;
                                        break;
                                } while (1);
This page took 0.037737 seconds and 4 git commands to generate.