dovecot-2.0: lib-master: Properly fixed accepting FIFO connectio...

dovecot at dovecot.org dovecot at dovecot.org
Fri Oct 15 18:16:26 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/3385e9028410
changeset: 12278:3385e9028410
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Oct 15 16:16:23 2010 +0100
description:
lib-master: Properly fixed accepting FIFO connections with BSDI.

diffstat:

 src/lib-master/master-service.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 80097e5c38e9 -r 3385e9028410 src/lib-master/master-service.c
--- a/src/lib-master/master-service.c	Fri Oct 15 16:09:13 2010 +0100
+++ b/src/lib-master/master-service.c	Fri Oct 15 16:16:23 2010 +0100
@@ -718,7 +718,7 @@
 		if (errno == ENOTSOCK) {
 			/* it's not a socket. should be a fifo. */
 		} else if (errno == EINVAL &&
-			   (fstat(l->fd, &st) < 0 || !S_ISFIFO(st.st_mode))) {
+			   (fstat(l->fd, &st) == 0 && S_ISFIFO(st.st_mode))) {
 			/* BSDI fails accept(fifo) with EINVAL. */
 		} else {
 			errno = orig_errno;


More information about the dovecot-cvs mailing list