search for: cmsg_firsthdr

Displaying 20 results from an estimated 25 matches for "cmsg_firsthdr".

2002 Jun 27
3
OpenSSH 3.4p1 - compilation problem on Linux
...-o ssh ssh.o sshconnect.o sshconnect1.o sshconnect2.o sshtty.o readconf.o clientloop.o -L. -Lopenbsd-compat/ -L/usr/local/ssl/lib -lssh -lopenbsd-compat -lbsd -lz -lcrypto ./libssh.a(monitor_fdpass.o): In function `mm_send_fd': /tools/openssh-3.4p1/monitor_fdpass.c:54: undefined reference to `CMSG_FIRSTHDR' /tools/openssh-3.4p1/monitor_fdpass.c:58: undefined reference to `CMSG_DATA' ./libssh.a(monitor_fdpass.o): In function `mm_receive_fd': /tools/openssh-3.4p1/monitor_fdpass.c:114: undefined reference to `CMSG_FIRSTHDR' /tools/openssh-3.4p1/monitor_fdpass.c:118: undefined reference t...
2002 May 17
0
openssh-3.2.2p1 on Linux 2.0
Hi I've found that openssh-3.2.2p1 can't be compiled on my Linux 2.0.36, because it doesn't define CMSG_DATA and CMSG_FIRSTHDR in <linux/socket.h>. The patch below solved this problem. Regards, NIDE Maoyuki, nide at ics.nara-wu.ac.jp ------------------------------------------------------------------------ diff -ru openssh-3.2.2p1.orig/defines.h openssh-3.2.2p1/defines.h --- openssh-3.2.2p1.orig/defines.h Fri Ap...
2002 Jun 27
1
(no subject)
Hi Phil, answer to your questions: > Which specific Slackware? Too embarrassed to say? Really, really don't know exactly. :) Installed approx. 5 yeras ago (maybe 4.5, 4.6, maybe 5.0 ... who knows now ... ) > Which OpenSSL? 0.9.6a? 0.9.6b? 0.9.6c? 0.9.6d? Only info I found is 0.9.6. Let's suppose it's 0.9.6. ;) > How about telling me how long you're going
2006 Nov 01
0
No subject
...memset(&msg, 0, sizeof(msg)); > #ifdef HAVE_ACCRIGHTS_IN_MSGHDR > 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)); > cmsg = CMSG_FIRSTHDR(&msg); > cmsg->cmsg_len = CMSG_LEN(sizeof(int)); > cmsg->cmsg_level = SOL_SOCKET; > cmsg->cmsg_type = SCM_RIGHTS; > *(int *)CMSG_DATA(cmsg) = fd; > #endif > > vec.iov_base = &ch; > vec.iov_len = 1; > msg.msg_iov...
2002 Jun 25
0
make fails during linking
...hconnect1.o sshconnect2.o sshtty.o readconf.o clientloop.o -L. -Lopenbsd-compat/ -L/usr/local/ssl/lib -L/usr/local/lib -lssh -lopenbsd-compat -lbsd -lz -lcrypto ./libssh.a(monitor_fdpass.o): In function `mm_send_fd': /home/oliver/test/openssh-3.3p1/monitor_fdpass.c:54: undefined reference to `CMSG_FIRSTHDR' /home/oliver/test/openssh-3.3p1/monitor_fdpass.c:58: undefined reference to `CMSG_DATA' ./libssh.a(monitor_fdpass.o): In function `mm_receive_fd': /home/oliver/test/openssh-3.3p1/monitor_fdpass.c:114: undefined reference to `CMSG_FIRSTHDR' /home/oliver/test/openssh-3.3p1/monitor_fd...
2002 Jul 04
0
[Bug 336] New: ssh does not compile on Linux with libc5 and 2.0 kernel
...em with a 2.0 kernel and libc5, compile errors arise because configure erroneously defines HAVE_CONTROL_IN_MSGHDR in config.h. This results in undefined references: ./libssh.a(monitor_fdpass.o): In function `mm_send_fd': /Packages/ssh/openssh-3.4p1/monitor_fdpass.c:54: undefined reference to `CMSG_FIRSTHDR' /Packages/ssh/openssh-3.4p1/monitor_fdpass.c:58: undefined reference to `CMSG_DATA' ./libssh.a(monitor_fdpass.o): In function `mm_receive_fd': /Packages/ssh/openssh-3.4p1/monitor_fdpass.c:114: undefined reference to `CMSG_FIRSTHDR' /Packages/ssh/openssh-3.4p1/monitor_fdpass.c:118:...
2002 Jan 21
1
help for tftp-hpa with libc5
...+ CMSG_SPACE(sizeof(struct in_pktinfo))]; #else char control[CMSG_SPACE(sizeof(struct in_addr))]; #endif } control_un; int on = 1; #ifdef IP_PKTINFO struct in_pktinfo pktinfo; #endif === 105 if ( msg.msg_controllen < sizeof(struct cmsghdr) || === 109 for ( cmptr = CMSG_FIRSTHDR(&msg) ; cmptr != NULL ; I added the following to recvfrom.h (copied from glibc headers) === #define MSG_CTRUNC 0x08 #define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) #define CMSG_FIRSTHDR(mhdr) \ ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ ? (stru...
2015 Feb 26
4
Call for testing: OpenSSH 6.8
...O)) - errx(1, "Cannot pass file descriptor to tty"); - - bzero(&mh, sizeof(mh)); - bzero(&cmsgbuf, sizeof(cmsgbuf)); - bzero(&iov, sizeof(iov)); - bzero(&pfd, sizeof(pfd)); - - mh.msg_control = (caddr_t)&cmsgbuf.buf; - mh.msg_controllen = sizeof(cmsgbuf.buf); - cmsg = CMSG_FIRSTHDR(&mh); + memset(&msg, 0, sizeof(msg)); +#ifdef HAVE_ACCRIGHTS_IN_MSGHDR + msg.msg_accrights = (caddr_t)&nfd; + msg.msg_accrightslen = sizeof(nfd); +#else + memset(&cmsgbuf, 0, sizeof(cmsgbuf)); + msg.msg_control = (caddr_t)&cmsgbuf.buf; + msg.msg_controllen = sizeof(cmsgbuf.buf);...
2015 Feb 25
2
Call for testing: OpenSSH 6.8
On 24/02/15 21:56, Tim Rice wrote: > On Wed, 25 Feb 2015, Damien Miller wrote: > > | On Tue, 24 Feb 2015, Tom G. Christensen wrote: > | > | > I've switched to HEAD in the git repo and it now builds on Solaris > | > 2.6, 7, 8 and 9 but the testsuite still cannot be built due to the > | > missing <err.h>. > > The err.h issue is fixes but there still
2009 Nov 04
0
PATCH: fast copy of files in local server mode
...(struct msghdr)); + memset(buffer, 0, CMSG_SPACE(sizeof(int))); + + data[0] = 'F'; + iov[0].iov_base = data; + iov[0].iov_len = 1; + + message.msg_iov = iov; + message.msg_iovlen = 1; + + message.msg_control = buffer; + message.msg_controllen = CMSG_SPACE(sizeof(int)); + + control_message = CMSG_FIRSTHDR(&message); + control_message->cmsg_level = SOL_SOCKET; + control_message->cmsg_type = SCM_RIGHTS; + control_message->cmsg_len = CMSG_LEN(sizeof(int)); + + *((int *) CMSG_DATA(control_message)) = fd_to_send; + + message.msg_controllen = control_message->cmsg_len; + + do ret = sendmsg...
2003 May 21
2
[Bug 336] ssh does not compile on Linux with libc5 and 2.0 kernel
http://bugzilla.mindrot.org/show_bug.cgi?id=336 dtucker at zip.com.au changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | ------- Additional Comments From dtucker at zip.com.au 2003-05-21 10:36
2003 Jun 29
0
[Bug 336] ssh does not compile on Linux with libc5 and 2.0 kernel
...t #308 is|0 |1 obsolete| | ------- Additional Comments From dtucker at zip.com.au 2003-06-29 23:16 ------- Created an attachment (id=344) --> (http://bugzilla.mindrot.org/attachment.cgi?id=344&action=view) Add CMSG_DATA and CMSG_FIRSTHDR macros to monitor_fdpass.h It seems that the kernel capabilities are there it's just the macros are missing. How about stealing the macros from OpenBSD rather the messing with configure? Then privsep might even work on those Linux/libc5 boxes. Anyone care to test this? I don't have an...
2003 Aug 06
2
[Bug 336] ssh does not compile on Linux with libc5 and 2.0 kernel
...tachment.cgi?id=365&action=view) Make OpenSSH work on old Linuxes Found a really old redhat CD and installed it on my test machine.... # uname -r 1.2.13 # rpm -q libc libc-5.2.18-1 The patch changes: session.c: only does session_break_req if TIOCSBRK is defined. bsd-misc.h: adds CMSG_DATA and CMSG_FIRSTHDR macros (stolen from OpenBSD). canohost.c: only does check_ip_options if IP_OPTIONS is defined. Everything appears to work OK apart from PrivSep (because mmap seems terminally broken). With a newer kernel with a working mmap, PrivSep might even work. Anyone complaining about older systems is on t...
2002 Jul 01
0
[Bug 327] New: monitor_fdpass.c: Expected 1 got 1075033556 - Privilege Separation
...azo at netcom.no When enabling the Privilege separation, I get this message in line 117 (monitor_fdpass.c,v 1.3 2002/06/04 23:05:49 markus Exp $) It works ok on Linux 2.4.18 but not on 2.0.36 (Yes, I know I should upgrade) How can I help you to sort this out? I wasn't able to locate where CMSG_FIRSTHDR(...) was defined or struct cmsghdr dazo ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
2008 Feb 20
1
alignment problem in monitor_fdpass.c
...y and using -O does not. On architectures that do not like unaligned accesses this will break. An extraction of mm_send_fd() look something like this: ############################## struct msghdr msg; char tmp[CMSG_SPACE(sizeof(int))]; struct cmsghdr *cmsg; msg.msg_control = (caddr_t)tmp; cmsg = CMSG_FIRSTHDR(&msg); cmsg->cmsg_len = CMSG_LEN(sizeof(int)); ############################## The bus error happens on the last line when a value is written into cmsg_len. In effect it does: cmsg = tmp; cmsg->cmsg_len = CMSG_LEN(sizeof(int)); So if tmp is not aligned, then cmsg is not and cmsg_len is...
2010 Jul 07
0
[git pull v2] x86_32, sh4, getrusage()
...usr/include/sys/socket.h b/usr/include/sys/socket.h index c69caaf..53b7ea4 100644 --- a/usr/include/sys/socket.h +++ b/usr/include/sys/socket.h @@ -159,6 +159,86 @@ struct msghdr { unsigned msg_flags; }; +/* Ancillary data structures and cmsg macros are also hidden under __KERNEL__ */ +#ifndef CMSG_FIRSTHDR +/* + * POSIX 1003.1g - ancillary data object information + * Ancillary data consits of a sequence of pairs of + * (cmsghdr, cmsg_data[]) + */ + +struct cmsghdr { + __kernel_size_t cmsg_len; /* data byte count, including hdr */ + int cmsg_level; /* originating protocol */ + int cmsg...
2023 Feb 16
0
[RFC PATCH v1 12/12] test/vsock: MSG_ZEROCOPY support for vsock_perf
..._err *serr; >+ char cmsg_data[128]; >+ struct cmsghdr *cm; >+ struct msghdr msg; >+ int ret; >+ >+ msg.msg_control = cmsg_data; >+ msg.msg_controllen = sizeof(cmsg_data); >+ >+ ret = recvmsg(fd, &msg, MSG_ERRQUEUE); >+ if (ret == -1) >+ return; >+ >+ cm = CMSG_FIRSTHDR(&msg); >+ if (!cm) { >+ fprintf(stderr, "cmsg: no cmsg\n"); >+ return; >+ } >+ >+ if (cm->cmsg_level != SOL_VSOCK) { >+ fprintf(stderr, "cmsg: unexpected 'cmsg_level'\n"); >+ return; >+ } >+ >+ if (cm->cmsg_type) { >+ fp...
2003 Oct 02
1
another Dovecot problem
Hi All-- First, thanks to Timo for solving my last issue. I got dovecot up and running on one of my machines, and it does exactly what I want. Now I'm trying to install dovecot on an older box (glibc 2.0.7 Linux kernel 2.0.36), and encountering some problems: -- firstly autoconf/automake does not seem to correctly deal with the madvise function on this system. It detects that we don't
2009 Sep 11
1
[PATCH] guestfish: Redirect stdout when executing remote commands
...sg_iovlen = 1; + + /* Initialise the control data */ + msg.msg_control = cmptr; + msg.msg_controllen = controllen; + + /* Read a message from the socket */ + ssize_t n = recvmsg (s, &msg, 0); + if (n < 0) { + perror ("recvmsg stdout fd"); + exit (1); + } + + h = CMSG_FIRSTHDR(&msg); + if (NULL == h) { + fprintf (stderr, "didn't receive a stdout file descriptor\n"); + } + + else { + /* Extract the transferred file descriptor from the control data */ + int fd = *(int *)CMSG_DATA (h); + + /* Duplicate the received file descriptor to stdout...
2010 Mar 13
1
klibc build trouble
as the next klibc release 1.5.16 looks like shaping up, I have a trouble to build that for Debian. currently I build depent on linux-libc-dev, I don't know what against I can build latest klibc, see klibc fails to build due too: make -C linux/ ARCH=x86_64 INSTALL_HDR_PATH=debian/tmp/usr/lib/klibc/ headers_install make[3]: *** No rule to make target `headers_install'. Stop. make[2]: ***