[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: passfd on more platforms

From: Bruno Haible
Subject: Re: passfd on more platforms
Date: Tue, 15 Mar 2011 00:09:15 +0100
User-agent: KMail/1.9.9

Bastien ROUCARIES wrote:
> according to postfix source NETBSD seems really strange... Do you know
> how to test ?
> /*
>      * The CMSG_LEN send/receive workaround was originally developed for
>      * OpenBSD 3.6 on SPARC64. After the workaround was verified to not break
>      * Solaris 8 on SPARC64, it was hard-coded with Postfix 2.3 for all
>      * platforms because of increasing pressure to work on other things. The
>      * workaround does nothing for 32-bit systems.
>      *
>      * The investigation was reopened with Postfix 2.7 because the workaround
>      * broke with NetBSD 5.0 on 64-bit architectures. This time it was found
>      * that OpenBSD <= 4.3 on AMD64 and SPARC64 needed the workaround for
>      * sending only. The following platforms worked with and without the
>      * workaround: OpenBSD 4.5 on AMD64 and SPARC64, FreeBSD 7.2 on AMD64,
>      * Solaris 8 on SPARC64, and Linux 2.6-11 on x86_64.
>      *
>      * As this appears to have been an OpenBSD-specific problem, we revert to
>      * the Postfix 2.2 behavior. Instead of hard-coding the workaround for
>      * all platforms, we now detect sendmsg() errors at run time and turn on
>      * the workaround dynamically.
>      *
>      * The workaround was made run-time configurable to investigate the 
> problem
>      * on multiple platforms. Though set_unix_pass_fd_fix() is over-kill for
>      * this specific problem, it is left in place so that it can serve as an
>      * example of how to add run-time configurable workarounds to Postfix.
>      */

You got this from
right? The "workaround" there consists in adding some alignment to the
msg_controllen field, for the 64-bit case. But here I am testing on NetBSD/i386,
and both CMSG_LEN(sizeof(int)) and CMSG_SPACE(sizeof(int)) are 16. I tried all
values 4, 8, 12, ..., 32 for msg_controllen - doesn't help.

> > On mingw, I haven't even tried the module. It first requires
> >  - a 'socketpair' module for the test,
> In all the case passing fd is done through socket

What do you mean by that? I mean, the test uses the socketpair() function,
which mingw doesn't have, so in order to run the test, we must first have


reply via email to

[Prev in Thread] Current Thread [Next in Thread]