summaryrefslogtreecommitdiff
path: root/monitor_fdpass.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-06-06 21:40:51 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-06-06 21:40:51 +0000
commit7d9c38f37ae608265c3f7fa2f87795419afe6069 (patch)
tree621c8078e155f13b2251f7bc0df2b36333314128 /monitor_fdpass.c
parent3dca4f55f20cb62c8cfc5d050027a49bf3590b55 (diff)
- markus@cvs.openbsd.org 2002/06/04 23:05:49
[cipher.c monitor.c monitor_fdpass.c monitor_mm.c monitor_wrap.c] __FUNCTION__ -> __func__ NOTE: This includes all portable references also.
Diffstat (limited to 'monitor_fdpass.c')
-rw-r--r--monitor_fdpass.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/monitor_fdpass.c b/monitor_fdpass.c
index 5401ea466..0d7628fa2 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.2 2002/03/24 17:53:16 stevesk Exp $"); 27RCSID("$OpenBSD: monitor_fdpass.c,v 1.3 2002/06/04 23:05:49 markus Exp $");
28 28
29#include <sys/uio.h> 29#include <sys/uio.h>
30 30
@@ -64,14 +64,14 @@ mm_send_fd(int socket, int fd)
64 msg.msg_iovlen = 1; 64 msg.msg_iovlen = 1;
65 65
66 if ((n = sendmsg(socket, &msg, 0)) == -1) 66 if ((n = sendmsg(socket, &msg, 0)) == -1)
67 fatal("%s: sendmsg(%d): %s", __FUNCTION__, fd, 67 fatal("%s: sendmsg(%d): %s", __func__, fd,
68 strerror(errno)); 68 strerror(errno));
69 if (n != 1) 69 if (n != 1)
70 fatal("%s: sendmsg: expected sent 1 got %d", 70 fatal("%s: sendmsg: expected sent 1 got %d",
71 __FUNCTION__, n); 71 __func__, n);
72#else 72#else
73 fatal("%s: UsePrivilegeSeparation=yes not supported", 73 fatal("%s: UsePrivilegeSeparation=yes not supported",
74 __FUNCTION__); 74 __func__);
75#endif 75#endif
76} 76}
77 77
@@ -102,24 +102,24 @@ mm_receive_fd(int socket)
102#endif 102#endif
103 103
104 if ((n = recvmsg(socket, &msg, 0)) == -1) 104 if ((n = recvmsg(socket, &msg, 0)) == -1)
105 fatal("%s: recvmsg: %s", __FUNCTION__, strerror(errno)); 105 fatal("%s: recvmsg: %s", __func__, strerror(errno));
106 if (n != 1) 106 if (n != 1)
107 fatal("%s: recvmsg: expected received 1 got %d", 107 fatal("%s: recvmsg: expected received 1 got %d",
108 __FUNCTION__, n); 108 __func__, n);
109 109
110#ifdef HAVE_ACCRIGHTS_IN_MSGHDR 110#ifdef HAVE_ACCRIGHTS_IN_MSGHDR
111 if (msg.msg_accrightslen != sizeof(fd)) 111 if (msg.msg_accrightslen != sizeof(fd))
112 fatal("%s: no fd", __FUNCTION__); 112 fatal("%s: no fd", __func__);
113#else 113#else
114 cmsg = CMSG_FIRSTHDR(&msg); 114 cmsg = CMSG_FIRSTHDR(&msg);
115 if (cmsg->cmsg_type != SCM_RIGHTS) 115 if (cmsg->cmsg_type != SCM_RIGHTS)
116 fatal("%s: expected type %d got %d", __FUNCTION__, 116 fatal("%s: expected type %d got %d", __func__,
117 SCM_RIGHTS, cmsg->cmsg_type); 117 SCM_RIGHTS, cmsg->cmsg_type);
118 fd = (*(int *)CMSG_DATA(cmsg)); 118 fd = (*(int *)CMSG_DATA(cmsg));
119#endif 119#endif
120 return fd; 120 return fd;
121#else 121#else
122 fatal("%s: UsePrivilegeSeparation=yes not supported", 122 fatal("%s: UsePrivilegeSeparation=yes not supported",
123 __FUNCTION__); 123 __func__);
124#endif 124#endif
125} 125}