Sync SCM_RIGHTS passing code with the version used in racoon (i.e.
set message header and controll message size to the same value again)
This commit is contained in:
parent
72582f8379
commit
41de77d985
5
crypto/dist/ssh/monitor_fdpass.c
vendored
5
crypto/dist/ssh/monitor_fdpass.c
vendored
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: monitor_fdpass.c,v 1.7 2008/04/13 21:44:14 christos Exp $ */
|
||||
/* $NetBSD: monitor_fdpass.c,v 1.8 2008/04/19 22:15:30 martin Exp $ */
|
||||
/* $OpenBSD: monitor_fdpass.c,v 1.17 2008/03/24 16:11:07 deraadt Exp $ */
|
||||
/*
|
||||
* Copyright 2001 Niels Provos <provos@citi.umich.edu>
|
||||
@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
__RCSID("$NetBSD: monitor_fdpass.c,v 1.7 2008/04/13 21:44:14 christos Exp $");
|
||||
__RCSID("$NetBSD: monitor_fdpass.c,v 1.8 2008/04/19 22:15:30 martin Exp $");
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/uio.h>
|
||||
@ -65,6 +65,7 @@ mm_send_fd(int sock, int fd)
|
||||
cmsg->cmsg_level = SOL_SOCKET;
|
||||
cmsg->cmsg_type = SCM_RIGHTS;
|
||||
*(int *)CMSG_DATA(cmsg) = fd;
|
||||
msg.msg_controllen = cmsg->cmsg_len;
|
||||
|
||||
vec.iov_base = &ch;
|
||||
vec.iov_len = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user