search for: cmsg_space

Displaying 20 results from an estimated 22 matches for "cmsg_space".

2004 Jun 15
1
Re: [dovecot-cvs] dovecot/src/lib fdpass.c,1.28,1.29
.../cvs/dovecot/src/lib/fdpass.c,v > retrieving revision 1.28 > retrieving revision 1.29 > diff -u -d -r1.28 -r1.29 > --- fdpass.c 1 Dec 2003 19:07:34 -0000 1.28 > +++ fdpass.c 14 Jun 2004 23:42:23 -0000 1.29 > @@ -31,12 +31,20 @@ > #include <sys/uio.h> > > #ifndef CMSG_SPACE > -# define 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))) > +#...
2009 Nov 04
0
PATCH: fast copy of files in local server mode
.../** If no timeout is specified then use a 60 second select timeout */ #define SELECT_TIMEOUT 60 @@ -1722,6 +1723,82 @@ writefd(f, str, len); } +int send_fd(int socket, int fd_to_send) +{ + struct msghdr message; + struct iovec iov[1]; + struct cmsghdr *control_message = NULL; + char buffer[CMSG_SPACE(sizeof(int))], data[1]; + int ret; + + memset(&message, 0, sizeof(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; + me...
2002 Apr 06
0
[Bug 206] New: -SNAP-20020405: build failures on AIX 3.2.5 with XLC 1.2.1.16
...un/egd-pool --with-mantype=man Compiler complaint, on several lines of monitor_fdpass.c: "monitor_fdpass.c", line 42.36: 1506-043 (S) Sizeof operator cannot be used with functions, void, bit-fields, incomplete types, or arrays of unknown size. monitor_fdpass.c line 42: char tmp[CMSG_SPACE(sizeof(int))]; CMSG_SPACE is being picked up from defines.h, line 464: #define CMSG_SPACE(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(len)) ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
2002 Jan 21
1
help for tftp-hpa with libc5
...applied to an incomplete type recvfrom.c:109: warning: unsigned value >= 0 is always 1 recvfrom.c:72: warning: unused variable `on' make: *** [recvfrom.o] Error 1 === === recvfrom.c line 62 onwards struct cmsghdr *cmptr; union { struct cmsghdr cm; #ifdef IP_PKTINFO char control[CMSG_SPACE(sizeof(struct in_addr)) + 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) ||...
2002 Apr 10
0
[Bug 213] New: -SNAP-20020410 fails to compile under AIX 4.3.3
...ion with a value greater than zero is required. "monitor_fdpass.c", line 87.18: 1506- 195 (S) Integral constant expression with a value greater than zero is required. make: 1254-004 The error code from the last command is 1. This appears to be a problem with the line: char tmp[CMSG_SPACE(sizeof(int))]; It would seem that the IBM compiler does not like array declarations that need to be computed in this way. Hard-coding 16 in place of CMSG_SPACE(sizeof(int)) allows compilation to succeed. Can someone help me to solve this problem? ------- You are receiving this mail because...
2008 Jul 29
1
Question regarding alignment patch
Contrast http://cvsweb.mindrot.org/index.cgi/openssh/monitor_fdpass.c?r1=1.23;r2=1.24 with http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/monitor_fdpass.c.diff?r1=1.14&r2=1.15 The original replaces cmsgbuf.tmp with cmsgbuf.buf, while the -portable version *adds* cmsgbuf.buf but retains cmsgbuf.tmp. I assume this was an oversight, and cmsgbuf.tmp should be removed? DES -- Dag-Erling
2002 Apr 17
4
openssh-SNAP-20020412 and AIX ...
Folks, On AIX 4.3.3-08ML with the IBM C Compiler, and ssh configured to use the prngd-socket "/dev/egd-pool", the make bombs out at: /usr/bin/cc -g -I. -I. -I/usr/local/include -DSSHDIR=\"/usr/local/etc\" -D_PATH_SSH_PROGRAM=\"/usr/local/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/local/libexec/ssh-askpass\"
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 Apr 10
8
[Bug 213] -SNAP-20020410 fails to compile under AIX 4.3.3
http://bugzilla.mindrot.org/show_bug.cgi?id=213 ------- Additional Comments From stevesk at pobox.com 2002-04-11 08:57 ------- can you provide cpp output from the file (e.g., cc -E) for the tmp[] definition? can someone with some AIX knowledge help with this? ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
2015 Jan 25
0
SmartOS: nss_wrapper: conflicting types
...-01 09:17:32.000000000 +0000 +++ source3/lib/unix_msg/unix_msg.c 2015-01-25 02:59:29.958547508 +0000 @@ -505,7 +505,9 @@ * Note: No need to check for overflow here, * since cmsg will store <= INT8_MAX fds. */ +#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL msglen += cmsg_space; +#endif data_len = iov_buflen(iov, iovlen); if (data_len == -1) { @@ -593,7 +595,9 @@ return 0; fail: +#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL close_fd_array(fds_copy, num_fds); +#endif return ret; }
2011 Aug 16
1
dovecot 2.0.13 fd_send(imap, 15) failed, dovecot 1.2.16 fd_send(10) failed
Hi, I am reinstalling my server and i have encoutered a strange problem, both dovecot 2.0.13 and 1.2.16 are reporting me a problem with fd_send Invalid argument on imap login. I am running dragonfly bsd 2.10.1., compiled dovecot from pkgsrc. Can someone help me out or at least point me in some direction, i am a bit lost... :( Aug 15 10:01:00 master: Info: Dovecot v2.0.13 starting up Aug 15
2002 May 17
0
openssh-3.2.2p1 on Linux 2.0
....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 Apr 26 02:56:07 2002 +++ openssh-3.2.2p1/defines.h Fri May 17 17:21:13 2002 @@ -410,6 +410,15 @@ #define CMSG_SPACE(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(len)) #endif +/* Linux 2.0 does not have CMSG_DATA, CMSG_FIRSTHDR */ +#ifndef CMSG_DATA +#define CMSG_DATA(cmsg) ((void *)((char *)(cmsg) + __CMSG_ALIGN(sizeof(struct cmsghdr)))) +#endif +#ifndef CMSG_FIRSTHDR +#define CMSG_FIRSTHDR(msg)...
2008 Feb 20
1
alignment problem in monitor_fdpass.c
...mm_send_fd and mm_receive_fd. Using -O2 used to align the tmp array on a 4 byte boundary 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->cm...
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
2015 Feb 26
4
Call for testing: OpenSSH 6.8
...(int fd, unsigned char *buf, size_t *bufpos) void fdpass(int nfd) { - struct msghdr mh; +#if defined(HAVE_SENDMSG) && (defined(HAVE_ACCRIGHTS_IN_MSGHDR) || defined(HAVE_CONTROL_IN_MSGHDR)) + struct msghdr msg; +#ifndef HAVE_ACCRIGHTS_IN_MSGHDR union { struct cmsghdr hdr; char buf[CMSG_SPACE(sizeof(int))]; } cmsgbuf; struct cmsghdr *cmsg; - struct iovec iov; - char c = '\0'; - ssize_t r; +#endif + struct iovec vec; + char ch = '\0'; struct pollfd pfd; + ssize_t r; - /* Avoid obvious stupidity */ - if (isatty(STDOUT_FILENO)) - errx(1, "Cannot pass file desc...
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
2006 Nov 01
0
No subject
..., int fd) > { > #if defined(HAVE_SENDMSG) && (defined(HAVE_ACCRIGHTS_IN_MSGHDR) || defined(HAVE_CONTROL_IN_MSGHDR)) > struct msghdr msg; > struct iovec vec; > char ch = '\0'; > int n; > #ifndef HAVE_ACCRIGHTS_IN_MSGHDR > char tmp[CMSG_SPACE(sizeof(int))]; > struct 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; &g...
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]: ***
2002 Apr 05
14
PLEASE TEST snapshots
The next OpenSSH release is close, too. If you want OpenSSH 3.2 to be the best version of OpenSSH, then please test the snapshots. If you like to see new features in future OpenSSH releases, then test the snapshots. If you are running OpenBSD then please test the OpenBSD snapshots. If you are running the portable OpenSSH release then please test the nightly snapshots from
2010 Jul 07
0
[git pull v2] x86_32, sh4, getrusage()
...MSG_NXTHDR(ctl, len, cmsg) __cmsg_nxthdr((ctl),(len),(cmsg)) +#define CMSG_NXTHDR(mhdr, cmsg) cmsg_nxthdr((mhdr), (cmsg)) + +#define CMSG_ALIGN(len) ( ((len)+sizeof(long)-1) & ~(sizeof(long)-1) ) + +#define CMSG_DATA(cmsg) ((void *)((char *)(cmsg) + CMSG_ALIGN(sizeof(struct cmsghdr)))) +#define CMSG_SPACE(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(len)) +#define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len)) + +#define __CMSG_FIRSTHDR(ctl,len) ((len) >= sizeof(struct cmsghdr) ? \ + (struct cmsghdr *)(ctl) : \ + (struct cmsghdr *)NULL) +#define CMSG_FIRSTHDR(msg) _...