search for: cmsg_len

Displaying 20 results from an estimated 26 matches for "cmsg_len".

2008 Feb 20
1
alignment problem in monitor_fdpass.c
...ectures 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 of type socklen_t (at least...
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
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
2004 Jun 15
1
Re: [dovecot-cvs] dovecot/src/lib fdpass.c,1.28,1.29
...efine CMSG_ALIGN(len) \ > +# if defined(_CMSG_DATA_ALIGN) && defined(_CMSG_HDR_ALIGN) /* for Solaris */ > +# define CMSG_ALIGN(len) _CMSG_DATA_ALIGN(len) > +# define CMSG_SPACE(len) \ > + (_CMSG_DATA_ALIGN(len) + _CMSG_HDR_ALIGN(sizeof(struct cmsghdr))) > +# define CMSG_LEN(len) \ > + (_CMSG_HDR_ALIGN(sizeof(struct cmsghdr)) + (len)) > +# else > +# define CMSG_ALIGN(len) \ > (((len) + sizeof(size_t) - 1) & ~(sizeof(size_t) - 1)) > -# define CMSG_SPACE(len) \ > +# define CMSG_SPACE(len) \ > (CMSG_ALIGN(len) + CMSG_ALIGN(sizeof(struc...
2002 Jan 21
1
help for tftp-hpa with libc5
...struct cmsghdr *__cmsg)); #ifdef __USE_EXTERN_INLINES # ifndef _EXTERN_INLINE # define _EXTERN_INLINE extern __inline # endif _EXTERN_INLINE struct cmsghdr * __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW { if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) /* The kernel header does this so there may be a reason. */ return 0; __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)); if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mh...
2004 Jul 22
3
Dovecot auth problem on FreeBSD 4.10
Hello. I am trying to setup Dovecot on an Alpha running FreeBSD 4.10. I am simply trying the imap/pop3 protocols at this time. But with both protocols the log message I get is: pop3-login: fd_send(5) failed: Bad file descriptor dovecot: child 275 (login) returned error 89 or imap-login: fd_send(5) failed: Bad file descriptor dovecot: child 275 (login) returned error 89 I have tried
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]: ***
2006 Nov 01
0
No subject
...uct cmsghdr *cmsg; > #endif > > 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; >...
2010 Jul 07
0
[git pull v2] x86_32, sh4, getrusage()
..._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_type; /* protocol-specific type */ +}; + +/* + * Ancilliary data object information MACROS + * Table 5-14 of POSIX 1003.1g + */ + +#define __CMSG_NXTHDR(ctl, len, cmsg) __cmsg_nxthdr((ctl),...
2009 Nov 04
0
PATCH: fast copy of files in local server mode
...essage.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(socket, &message, 0); + while (ret == -1 && (errno == EINTR || errno == EAGAIN)); + return ret; +} + +int recv_fd(int socket)...
2015 Jul 29
2
Bug#793921: tftpd-hpa: IPv6 address cannonization breaks IPv4
...es and > > fails: > > > > recvmsg(0, {msg_name(28)={sa_family=AF_INET6, sin6_port=htons(34500), inet_pton(AF_INET6, "::ffff:10.0.0.192", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, msg_iov(1)=[{"\0\1pxelinux.0\0netascii\0", 65468}], msg_controllen=40, {cmsg_len=36, cmsg_level=SOL_IPV6, cmsg_type=, ...}, msg_flags=0}, 0) = 22 > > [..] > > [pid 3757] socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 0 > > [..] > > [pid 3757] bind(0, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("10.0.0.2")}, 16) = 0 > > [pid 37...
2003 Apr 19
4
[Bug 544] sshd w/privsep fails on Linux 2.0, mm_receive_fd: expected type 1 got 1074276337
...pe 26 mm_receive_fd: expected type 1 got 1074276337 It seems to be a bug in 2.0 kernels, cmsg_level and cmsg_type returned by recvmsg() make no sense. I built a test program (which I will attach) from code from monitor_fdpass.c. After the fd pass, a 2.0.38 kernel gives: (gdb) print *cmsg $1 = {cmsg_len = 16, cmsg_level = 134514016, cmsg_type = -1073742828, __cmsg_data = 0xbffffc08 "\005"} A 2.4.18 kernel gives: (gdb) print *cmsg $1 = {cmsg_len = 16, cmsg_level = 1, cmsg_type = 1, __cmsg_data = 0xbffff5fc "\a"} If you comment out the "if (cmsg->cmsg_type != SCM_RI...
2009 Mar 20
0
tftpd-hpa can't reopen /dev/log
...LL, NULL, NULL) = 1 (in [4]) setsockopt(4, SOL_IP, IP_PKTINFO, [1], 4) = 0 recvmsg(4, {msg_name(16)={sa_family=AF_INET, sin_port=htons(57109), sin_addr=inet_addr("169.254.1.4")}, msg_iov(1)=[{"\0\1dal\0octet\0tsize\0000\0blksize\0001408\0"..., 65468}], msg_controllen=24, {cmsg_len=24, cmsg_level=SOL_IP, cmsg_type=, ...}, msg_flags=0}, 0) = 33 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 5 connect(5, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("169.254.1.1")}, 16) = 0 getsockname(5, {sa_family=AF_INET, sin_port=htons(58102), sin_addr=inet_addr("169.2...
2009 Sep 11
1
[PATCH] guestfish: Redirect stdout when executing remote commands
...#include <signal.h> +#include <sys/socket.h> #include <rpc/types.h> #include <rpc/xdr.h> @@ -49,6 +50,124 @@ create_sockpath (pid_t pid, char *sockpath, int len, struct sockaddr_un *addr) strcpy (addr->sun_path, sockpath); } +static const socklen_t controllen = CMSG_LEN (sizeof (int)); + +static void +receive_stdout (int s) +{ + static struct cmsghdr *cmptr = NULL, *h; + struct msghdr msg; + struct iovec iov[1]; + + /* Our 1 byte buffer */ + char buf[1]; + + if (NULL == cmptr) { + cmptr = malloc (controllen); + if (NULL == cmptr) { +...
2015 Feb 26
4
Call for testing: OpenSSH 6.8
...+#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); + 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) = nfd; +#endif - iov.iov_base = &c; - iov.iov_len = 1; - mh.msg_iov = &iov; - mh.msg_iovlen = 1; + vec.iov_base = &ch; + vec.iov_len = 1; + msg.msg_iov = &vec;...
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
2015 Aug 07
0
Bug#793921: tftpd-hpa: IPv6 address cannonization breaks IPv4
...gt;>> fails: >>> >>> recvmsg(0, {msg_name(28)={sa_family=AF_INET6, sin6_port=htons(34500), inet_pton(AF_INET6, "::ffff:10.0.0.192", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, msg_iov(1)=[{"\0\1pxelinux.0\0netascii\0", 65468}], msg_controllen=40, {cmsg_len=36, cmsg_level=SOL_IPV6, cmsg_type=, ...}, msg_flags=0}, 0) = 22 >>> [..] >>> [pid 3757] socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 0 >>> [..] >>> [pid 3757] bind(0, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("10.0.0.2")}, 16) = 0 >&g...
2006 Sep 12
1
openssh (OpenBSD) , bsdauth and tis authsrv
nuqneH, I've tried using TIS authsrv authentication via bsd auth and found it quite limited. The most important restriction it does not log ip and fqdn of the remote peer, nor the application name, to the authentication server. It does not matter much for TIS authsrv, but since other applications do provide such information, our authsrv version uses it for extra authentication restrictions.
2019 Apr 04
1
Proof of concept for GPU forwarding for Linux guest on Linux host.
Hi, This is a proof of concept of GPU forwarding for Linux guest on Linux host. I'd like to get comments and suggestions from community before I put more time on it. To summarize what it is: 1. It's a solution to bring GPU acceleration for Linux vm guest on Linux host. It could works with different GPU although the current proof of concept only works with Intel GPU. 2. The basic idea
2009 Dec 07
7
Name Resolution Broken for One Address
..., 110) = 0 send(4, "\2\0\0\0\r\0\0\0\6\0\0\0hosts\0", 18, MSG_NOSIGNAL) = 18 poll([{fd=4, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 1 ([{fd=4, revents=POLLIN}]) recvmsg(4, {msg_name(0)=NULL, msg_iov(2)=[{"hosts\0", 6}, {"\270O\3\0\0\0\0\0", 8}], msg_controllen=16, {cmsg_len=16, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, {5}}, msg_flags=0}, 0) = 14 mmap2(NULL, 217016, PROT_READ, MAP_SHARED, 5, 0) = 0xb7f54000 close(5) = 0 close(4) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4 connect(4, {sa_family=AF_IN...