# HG changeset patch # User Timo Sirainen # Date 1196258919 -7200 # Node ID 3069e66789b35b4bc34585643b7478bb6736d70f # Parent 082526b2702e52544acb92ff3bf6851157249ee6 Die if (Solaris) LDAP library returns wrong file descriptor. diff -r 082526b2702e -r 3069e66789b3 src/auth/db-ldap.c --- a/src/auth/db-ldap.c Wed Nov 28 15:50:55 2007 +0200 +++ b/src/auth/db-ldap.c Wed Nov 28 16:08:39 2007 +0200 @@ -527,6 +527,11 @@ i_fatal("LDAP: Can't get connection fd: %s", ldap_err2string(ret)); } + if (conn->fd <= CLIENT_LISTEN_FD) { + /* Solaris LDAP library seems to be broken */ + i_fatal("LDAP: Buggy LDAP library returned wrong fd: %d", + conn->fd); + } i_assert(conn->fd != -1); net_set_nonblock(conn->fd, TRUE); }