OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: postfix: milter socket: permission denied

From: Wietse Venema (wietseporcupine.org)
Date: Fri Nov 02 2007 - 12:08:36 CDT


rosenfieldusers.sourceforge.net:
> >> Doing an strace revealed that the permission denied error message from
> >> Postfix was completely bogus, in fact it communicated fine through the
> >> socket.
> >
> > The warning:
> >
> > warning: connect to Milter service
> > unix:/var/spool/MIMEDefang/mimedefang.sock: Permission denied
> >
> > was reported BEFORE the socket was opened.
>
> You'd think so. But according to strace the socket opened fine and
> Postfix wrote about 20 characters to it. At least that's how I
> interpret it.

Postfix does not write on a socket before it is open.

> Here's a snippet of the strace output - I've marked interesting lines
> with asterix:
>
> * connect(17, {sa_family=AF_FILE,
> path="/var/run/defang/mimedefang.sock"}, 110) = 0

The connect operation is SUCCESSFUL.

> fcntl(17, F_SETFL, O_RDWR) = 0
> gettimeofday({1193949203, 381172}, NULL) = 0
> time([1193949203]) = 1193949203
> stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2134, ...}) = 0
> stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2134, ...}) = 0
> stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2134, ...}) = 0
> sendto(7, "<22>Nov 1 21:33:23 postfix/smtp"..., 73, MSG_NOSIGNAL, NULL, 0) = 73

And this is supposed to be "proof" that postfix reports a connect error.

        Wieytse