mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-27 15:54:22 +02:00
- deraadt@cvs.openbsd.org 2008/03/02 18:19:35
[monitor_fdpass.c] use a union to ensure alignment of the cmsg (pay attention: various other parts of the tree need this treatment too); ok djm
This commit is contained in:
parent
7c29661471
commit
c0c53c3114
@ -30,6 +30,10 @@
|
|||||||
add an extension method "posix-rename@openssh.com" to perform POSIX atomic
|
add an extension method "posix-rename@openssh.com" to perform POSIX atomic
|
||||||
rename() operations. based on patch from miklos AT szeredi.hu in bz#1400;
|
rename() operations. based on patch from miklos AT szeredi.hu in bz#1400;
|
||||||
ok dtucker@ markus@
|
ok dtucker@ markus@
|
||||||
|
- deraadt@cvs.openbsd.org 2008/03/02 18:19:35
|
||||||
|
[monitor_fdpass.c]
|
||||||
|
use a union to ensure alignment of the cmsg (pay attention: various other
|
||||||
|
parts of the tree need this treatment too); ok djm
|
||||||
|
|
||||||
20080302
|
20080302
|
||||||
- (dtucker) [configure.ac] FreeBSD's glob() doesn't behave the way we expect
|
- (dtucker) [configure.ac] FreeBSD's glob() doesn't behave the way we expect
|
||||||
@ -3690,4 +3694,4 @@
|
|||||||
OpenServer 6 and add osr5bigcrypt support so when someone migrates
|
OpenServer 6 and add osr5bigcrypt support so when someone migrates
|
||||||
passwords between UnixWare and OpenServer they will still work. OK dtucker@
|
passwords between UnixWare and OpenServer they will still work. OK dtucker@
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.4857 2008/03/07 07:33:53 djm Exp $
|
$Id: ChangeLog,v 1.4858 2008/03/07 07:35:26 djm Exp $
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: monitor_fdpass.c,v 1.13 2007/09/04 03:21:03 djm Exp $ */
|
/* $OpenBSD: monitor_fdpass.c,v 1.14 2008/03/02 18:19:35 deraadt Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright 2001 Niels Provos <provos@citi.umich.edu>
|
* Copyright 2001 Niels Provos <provos@citi.umich.edu>
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@ -49,7 +49,10 @@ mm_send_fd(int sock, int fd)
|
|||||||
char ch = '\0';
|
char ch = '\0';
|
||||||
ssize_t n;
|
ssize_t n;
|
||||||
#ifndef HAVE_ACCRIGHTS_IN_MSGHDR
|
#ifndef HAVE_ACCRIGHTS_IN_MSGHDR
|
||||||
char tmp[CMSG_SPACE(sizeof(int))];
|
union {
|
||||||
|
struct cmsghdr hdr;
|
||||||
|
char tmp[CMSG_SPACE(sizeof(int))];
|
||||||
|
} tmp;
|
||||||
struct cmsghdr *cmsg;
|
struct cmsghdr *cmsg;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -58,7 +61,7 @@ mm_send_fd(int sock, int fd)
|
|||||||
msg.msg_accrights = (caddr_t)&fd;
|
msg.msg_accrights = (caddr_t)&fd;
|
||||||
msg.msg_accrightslen = sizeof(fd);
|
msg.msg_accrightslen = sizeof(fd);
|
||||||
#else
|
#else
|
||||||
msg.msg_control = (caddr_t)tmp;
|
msg.msg_control = (caddr_t)&tmp;
|
||||||
msg.msg_controllen = CMSG_LEN(sizeof(int));
|
msg.msg_controllen = CMSG_LEN(sizeof(int));
|
||||||
cmsg = CMSG_FIRSTHDR(&msg);
|
cmsg = CMSG_FIRSTHDR(&msg);
|
||||||
cmsg->cmsg_len = CMSG_LEN(sizeof(int));
|
cmsg->cmsg_len = CMSG_LEN(sizeof(int));
|
||||||
@ -100,7 +103,10 @@ mm_receive_fd(int sock)
|
|||||||
char ch;
|
char ch;
|
||||||
int fd;
|
int fd;
|
||||||
#ifndef HAVE_ACCRIGHTS_IN_MSGHDR
|
#ifndef HAVE_ACCRIGHTS_IN_MSGHDR
|
||||||
char tmp[CMSG_SPACE(sizeof(int))];
|
union {
|
||||||
|
char tmp[CMSG_SPACE(sizeof(int))];
|
||||||
|
struct cmsghdr hdr;
|
||||||
|
} tmp;
|
||||||
struct cmsghdr *cmsg;
|
struct cmsghdr *cmsg;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -113,7 +119,7 @@ mm_receive_fd(int sock)
|
|||||||
msg.msg_accrights = (caddr_t)&fd;
|
msg.msg_accrights = (caddr_t)&fd;
|
||||||
msg.msg_accrightslen = sizeof(fd);
|
msg.msg_accrightslen = sizeof(fd);
|
||||||
#else
|
#else
|
||||||
msg.msg_control = tmp;
|
msg.msg_control = &tmp;
|
||||||
msg.msg_controllen = sizeof(tmp);
|
msg.msg_controllen = sizeof(tmp);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user