summaryrefslogtreecommitdiff
path: root/monitor_fdpass.c
diff options
context:
space:
mode:
Diffstat (limited to 'monitor_fdpass.c')
-rw-r--r--monitor_fdpass.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/monitor_fdpass.c b/monitor_fdpass.c
index f0dd88e7e..dd1a13984 100644
--- a/monitor_fdpass.c
+++ b/monitor_fdpass.c
@@ -24,7 +24,7 @@
24 */ 24 */
25 25
26#include "includes.h" 26#include "includes.h"
27RCSID("$OpenBSD: monitor_fdpass.c,v 1.5 2004/06/21 17:36:31 avsm Exp $"); 27RCSID("$OpenBSD: monitor_fdpass.c,v 1.6 2004/08/13 02:51:48 djm Exp $");
28 28
29#include <sys/uio.h> 29#include <sys/uio.h>
30 30
@@ -113,6 +113,8 @@ mm_receive_fd(int sock)
113 fatal("%s: no fd", __func__); 113 fatal("%s: no fd", __func__);
114#else 114#else
115 cmsg = CMSG_FIRSTHDR(&msg); 115 cmsg = CMSG_FIRSTHDR(&msg);
116 if (cmsg == NULL)
117 fatal("%s: no message header", __func__);
116#ifndef BROKEN_CMSG_TYPE 118#ifndef BROKEN_CMSG_TYPE
117 if (cmsg->cmsg_type != SCM_RIGHTS) 119 if (cmsg->cmsg_type != SCM_RIGHTS)
118 fatal("%s: expected type %d got %d", __func__, 120 fatal("%s: expected type %d got %d", __func__,