]> andersk Git - openssh.git/commitdiff
- deraadt@cvs.openbsd.org 2008/03/13 01:49:53
authordjm <djm>
Wed, 26 Mar 2008 23:53:23 +0000 (23:53 +0000)
committerdjm <djm>
Wed, 26 Mar 2008 23:53:23 +0000 (23:53 +0000)
     [monitor_fdpass.c]
     Correct CMSG_SPACE and CMSG_LEN usage everywhere in the tree. Due to
     an extensive discussion with otto, kettenis, millert, and hshoexer

ChangeLog
monitor_fdpass.c

index 76968f96422ed26f71ed795418a2fbb7b58f4996..1e2f6792d182c119c041a7e261d514d63ef721a1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,10 @@
      [ssh.1 sshd.8 sshd_config.5]
      bump Mdocdate for pages committed in "febuary", necessary because
      of a typo in rcs.c;
+   - deraadt@cvs.openbsd.org 2008/03/13 01:49:53
+     [monitor_fdpass.c]
+     Correct CMSG_SPACE and CMSG_LEN usage everywhere in the tree. Due to
+     an extensive discussion with otto, kettenis, millert, and hshoexer
 
 20080315
  - (djm) [regress/test-exec.sh] Quote putty-related variables in case they are
index fb00ab7abe1592474100e8b1579ebf5fdeaee7ca..a3e995df851618e5d80572c2c558fcfedfe5ceeb 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: monitor_fdpass.c,v 1.14 2008/03/02 18:19:35 deraadt Exp $ */
+/* $OpenBSD: monitor_fdpass.c,v 1.15 2008/03/13 01:49:53 deraadt Exp $ */
 /*
  * Copyright 2001 Niels Provos <provos@citi.umich.edu>
  * All rights reserved.
@@ -52,7 +52,8 @@ mm_send_fd(int sock, int fd)
        union {
                struct cmsghdr hdr;
                char tmp[CMSG_SPACE(sizeof(int))];
-       } tmp;
+               char buf[CMSG_SPACE(sizeof(int))];
+       } cmsgbuf;
        struct cmsghdr *cmsg;
 #endif
 
@@ -61,8 +62,8 @@ mm_send_fd(int sock, int fd)
        msg.msg_accrights = (caddr_t)&fd;
        msg.msg_accrightslen = sizeof(fd);
 #else
-       msg.msg_control = (caddr_t)&tmp;
-       msg.msg_controllen = CMSG_LEN(sizeof(int));
+       msg.msg_control = (caddr_t)&cmsgbuf.buf;
+       msg.msg_controllen = sizeof(cmsgbuf.buf);
        cmsg = CMSG_FIRSTHDR(&msg);
        cmsg->cmsg_len = CMSG_LEN(sizeof(int));
        cmsg->cmsg_level = SOL_SOCKET;
@@ -104,9 +105,9 @@ mm_receive_fd(int sock)
        int fd;
 #ifndef HAVE_ACCRIGHTS_IN_MSGHDR
        union {
-               char tmp[CMSG_SPACE(sizeof(int))];
                struct cmsghdr hdr;
-       } tmp;
+               char buf[CMSG_SPACE(sizeof(int))];
+       } cmsgbuf;
        struct cmsghdr *cmsg;
 #endif
 
@@ -119,8 +120,8 @@ mm_receive_fd(int sock)
        msg.msg_accrights = (caddr_t)&fd;
        msg.msg_accrightslen = sizeof(fd);
 #else
-       msg.msg_control = &tmp;
-       msg.msg_controllen = sizeof(tmp);
+       msg.msg_control = &cmsgbuf.buf;
+       msg.msg_controllen = sizeof(cmsgbuf.buf);
 #endif
 
        if ((n = recvmsg(sock, &msg, 0)) == -1) {
This page took 0.046069 seconds and 5 git commands to generate.