summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2008-12-01 21:42:13 +1100
committerDarren Tucker <dtucker@zip.com.au>2008-12-01 21:42:13 +1100
commit23645649bb97d510a7eab33d36882ef34d2e2d1f (patch)
tree24975a40bff63f6e48bb7209058497185f79e6f8
parent99d11a3ed2eb13e2f3ba13280d416369c45a30a6 (diff)
- dtucker@cvs.openbsd.org 2008/11/30 11:59:26
[monitor_fdpass.c] Retry sendmsg/recvmsg on EAGAIN and EINTR; ok djm@
-rw-r--r--ChangeLog5
-rw-r--r--monitor_fdpass.c12
2 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index af6b99458..8915d9a69 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,9 @@
8 packet_disconnect() on padding error, too. should reduce the success 8 packet_disconnect() on padding error, too. should reduce the success
9 probability for the CPNI-957037 Plaintext Recovery Attack to 2^-18 9 probability for the CPNI-957037 Plaintext Recovery Attack to 2^-18
10 ok djm@ 10 ok djm@
11 - dtucker@cvs.openbsd.org 2008/11/30 11:59:26
12 [monitor_fdpass.c]
13 Retry sendmsg/recvmsg on EAGAIN and EINTR; ok djm@
11 14
1220081123 1520081123
13 - (dtucker) [monitor_fdpass.c] Reduce diff vs OpenBSD by moving some 16 - (dtucker) [monitor_fdpass.c] Reduce diff vs OpenBSD by moving some
@@ -4942,5 +4945,5 @@
4942 OpenServer 6 and add osr5bigcrypt support so when someone migrates 4945 OpenServer 6 and add osr5bigcrypt support so when someone migrates
4943 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 4946 passwords between UnixWare and OpenServer they will still work. OK dtucker@
4944 4947
4945$Id: ChangeLog,v 1.5146 2008/12/01 10:40:48 dtucker Exp $ 4948$Id: ChangeLog,v 1.5147 2008/12/01 10:42:13 dtucker Exp $
4946 4949
diff --git a/monitor_fdpass.c b/monitor_fdpass.c
index f68c3728a..4b9a066bc 100644
--- a/monitor_fdpass.c
+++ b/monitor_fdpass.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor_fdpass.c,v 1.17 2008/03/24 16:11:07 deraadt Exp $ */ 1/* $OpenBSD: monitor_fdpass.c,v 1.18 2008/11/30 11:59:26 dtucker Exp $ */
2/* 2/*
3 * Copyright 2001 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2001 Niels Provos <provos@citi.umich.edu>
4 * All rights reserved. 4 * All rights reserved.
@@ -75,7 +75,10 @@ mm_send_fd(int sock, int fd)
75 msg.msg_iov = &vec; 75 msg.msg_iov = &vec;
76 msg.msg_iovlen = 1; 76 msg.msg_iovlen = 1;
77 77
78 if ((n = sendmsg(sock, &msg, 0)) == -1) { 78 while ((n = sendmsg(sock, &msg, 0)) == -1 && (errno == EAGAIN ||
79 errno == EINTR))
80 debug3("%s: sendmsg(%d): %s", __func__, fd, strerror(errno));
81 if (n == -1) {
79 error("%s: sendmsg(%d): %s", __func__, fd, 82 error("%s: sendmsg(%d): %s", __func__, fd,
80 strerror(errno)); 83 strerror(errno));
81 return -1; 84 return -1;
@@ -123,7 +126,10 @@ mm_receive_fd(int sock)
123 msg.msg_controllen = sizeof(cmsgbuf.buf); 126 msg.msg_controllen = sizeof(cmsgbuf.buf);
124#endif 127#endif
125 128
126 if ((n = recvmsg(sock, &msg, 0)) == -1) { 129 while ((n = recvmsg(sock, &msg, 0)) == -1 && (errno == EAGAIN ||
130 errno == EINTR))
131 debug3("%s: recvmsg: %s", __func__, strerror(errno));
132 if (n == -1) {
127 error("%s: recvmsg: %s", __func__, strerror(errno)); 133 error("%s: recvmsg: %s", __func__, strerror(errno));
128 return -1; 134 return -1;
129 } 135 }