summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/syslogd/privsep_fdpass.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/syslogd/privsep_fdpass.c b/usr.sbin/syslogd/privsep_fdpass.c
index 94f32d199b5..4ef9d107580 100644
--- a/usr.sbin/syslogd/privsep_fdpass.c
+++ b/usr.sbin/syslogd/privsep_fdpass.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: privsep_fdpass.c,v 1.10 2015/07/06 16:12:16 millert Exp $ */
+/* $OpenBSD: privsep_fdpass.c,v 1.11 2015/07/09 20:16:04 bluhm Exp $ */
/*
* Copyright 2001 Niels Provos <provos@citi.umich.edu>
@@ -104,6 +104,9 @@ receive_fd(int sock)
if ((n = recvmsg(sock, &msg, 0)) == -1) {
warn("%s: recvmsg", "receive_fd");
+ /* receive message failed, but the result is in the socket */
+ if (errno == EMSGSIZE)
+ recv(sock, &result, sizeof(int), MSG_DONTWAIT);
return -1;
}
if (n != sizeof(int))