Bugzilla – Attachment 1671 Details for
Bug 1633
Race condition in ssh-agent AUTH_CONNECTION
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix the root cause of the problem too
ssh-agent-retry.diff (text/plain), 1.94 KB, created by
Damien Miller
on 2009-08-19 06:50:43 AEST
(
hide
)
Description:
fix the root cause of the problem too
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2009-08-19 06:50:43 AEST
Size:
1.94 KB
patch
obsolete
>Index: ssh-agent.c >=================================================================== >RCS file: /var/cvs/openssh/ssh-agent.c,v >retrieving revision 1.179 >diff -u -p -r1.179 ssh-agent.c >--- ssh-agent.c 21 Jun 2009 07:50:15 -0000 1.179 >+++ ssh-agent.c 18 Aug 2009 20:49:45 -0000 >@@ -919,11 +919,11 @@ after_select(fd_set *readset, fd_set *wr > socklen_t slen; > char buf[1024]; > int len, sock; >- u_int i; >+ u_int i, orig_alloc; > uid_t euid; > gid_t egid; > >- for (i = 0; i < sockets_alloc; i++) >+ for (i = 0, orig_alloc = sockets_alloc; i < orig_alloc; i++) > switch (sockets[i].type) { > case AUTH_UNUSED: > break; >@@ -956,16 +956,13 @@ after_select(fd_set *readset, fd_set *wr > case AUTH_CONNECTION: > if (buffer_len(&sockets[i].output) > 0 && > FD_ISSET(sockets[i].fd, writeset)) { >- do { >- len = write(sockets[i].fd, >- buffer_ptr(&sockets[i].output), >- buffer_len(&sockets[i].output)); >- if (len == -1 && (errno == EAGAIN || >- errno == EINTR || >- errno == EWOULDBLOCK)) >- continue; >- break; >- } while (1); >+ len = write(sockets[i].fd, >+ buffer_ptr(&sockets[i].output), >+ buffer_len(&sockets[i].output)); >+ if (len == -1 && (errno == EAGAIN || >+ errno == EINTR || >+ errno == EWOULDBLOCK)) >+ continue; > if (len <= 0) { > close_socket(&sockets[i]); > break; >@@ -973,14 +970,11 @@ after_select(fd_set *readset, fd_set *wr > buffer_consume(&sockets[i].output, len); > } > if (FD_ISSET(sockets[i].fd, readset)) { >- do { >- len = read(sockets[i].fd, buf, sizeof(buf)); >- if (len == -1 && (errno == EAGAIN || >- errno == EINTR || >- errno == EWOULDBLOCK)) >- continue; >- break; >- } while (1); >+ len = read(sockets[i].fd, buf, sizeof(buf)); >+ if (len == -1 && (errno == EAGAIN || >+ errno == EINTR || >+ errno == EWOULDBLOCK)) >+ continue; > if (len <= 0) { > close_socket(&sockets[i]); > break;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1633
:
1670
| 1671