[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: passfd on more platforms
From: |
Bastien ROUCARIES |
Subject: |
Re: passfd on more platforms |
Date: |
Mon, 14 Mar 2011 14:12:10 +0100 |
On Mon, Mar 14, 2011 at 12:38 AM, Bruno Haible <address@hidden> wrote:
> Here's the result of testing passfd:
>
> Linux OK BSD4.4 way, MSG_CMSG_CLOEXEC
> FreeBSD OK BSD4.4 way
> OpenBSD OK BSD4.4 way
> NetBSD FAIL BSD4.4 way
> AIX OK BSD4.4 way
> HP-UX OK BSD4.3 way
> IRIX OK BSD4.3 way
> OSF/1 OK BSD4.4 way
> Solaris OK BSD4.3 way
> Cygwin FAIL BSD4.4 way
>
> It is a bit surprising that Solaris 10 says that it doesn't support the
> BSD4.4 way. That is because
> checking for UNIX domain sockets SCM_RIGHTS that behave in BSD4.4 way... no
> because CMSG_SPACE etc. are not declared by <sys/socket.h> by default.
> I'm not sure whether gnulib should define _XOPEN_SOURCE,
> _XOPEN_SOURCE_EXTENDED,
> or _POSIX_C_SOURCE. But's let's leave it as is for now, since the BSD4.3 way
> works.
>
> On NetBSD 5.0, the test reports
> sendfd: Invalid argument
> and then hangs.
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.
*/
> On Cygwin, the test fails:
> recvfd: Permission denied
> FAIL: test-passfd.exe
cygwin does not implement this feature and will resort to use mingw
emulation of part of, until fixed in core...
> 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
> - to rewrite the test to use the 'execute' module instead of fork().
Bastien
- [PATCH 2/4] sendfd, recvf pass file descriptors along Unix domain sockets, (continued)
- [PATCH 2/4] sendfd, recvf pass file descriptors along Unix domain sockets, Bastien ROUCARIES, 2011/03/07
- [PATCH 4/4] Add test for passfd, Bastien ROUCARIES, 2011/03/07
- passfd on glibc, Bruno Haible, 2011/03/13
- passfd on OpenBSD, Bruno Haible, 2011/03/13
- passfd on FreeBSD, Bruno Haible, 2011/03/13
- passfd on AIX 5.2, Bruno Haible, 2011/03/13
- passfd on Solaris, Bruno Haible, 2011/03/13
- passfd on more platforms, Bruno Haible, 2011/03/13
- Re: passfd on more platforms, Eric Blake, 2011/03/14
- Re: passfd on more platforms, Paolo Bonzini, 2011/03/14