Fix check for file descriptor passing

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Fix check for file descriptor passing

Wolfgang Mueller
On a musl-based system, postfix incorrectly assumes that file descriptor
passing is not available, because of this line in sys_defs.h:

> #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)) || (__GLIBC__ < 2)

It builds fine, but when used with a milter or the postscreen daemon, it
will fail at runtime with this error:

> warning: unix_send_fd: your system has no support for file descriptor passing
> warning: pass_accept_attr: cannot receive file descriptor: No error
> information error: accept connection: No error information

See also [1] and [2].

[1] - https://github.com/gentoo/musl/issues/53
[2] - https://bugs.alpinelinux.org/issues/3423

Find attached a patch that will fix this issue.

--
Wolfgang Mueller / vehk.de / GPG 0xc543cfce9465f573

postfix-musl-fd.patch (405 bytes) Download Attachment
signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fix check for file descriptor passing

Wietse Venema
Wolfgang Mueller:
-- Start of PGP signed section.

> On a musl-based system, postfix incorrectly assumes that file descriptor
> passing is not available, because of this line in sys_defs.h:
>
> > #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)) || (__GLIBC__ < 2)
>
> It builds fine, but when used with a milter or the postscreen daemon, it
> will fail at runtime with this error:
>
> > warning: unix_send_fd: your system has no support for file descriptor passing
> > warning: pass_accept_attr: cannot receive file descriptor: No error
> > information error: accept connection: No error information

I have added a few missing "defined(__GLIBC__)" guards.

        Wietse
Loading...