Wednesday, November 7, 2012

OpenVPN: ldap_parse_sasl_bind_result: Assertion failed.

My OpenVPN server crashes occasionally, with the following messages in log file:
openvpn: ../../../libraries/libldap/sasl.c:262: ldap_parse_sasl_bind_result: Assertion `res != ((void *)0)' failed.
This occurs if openvpn uses auth-ldap but can not bind to the LDAP server.  It's a bug of openvpn-auth-ldap.

To fix it, open auth-ldap-2.0.3/src/LFLDAPConnection.m, change `== -1' to `<= 0' at line 462:
if (ldap_result(ldapConn, msgid, 1, &timeout, &res) <= 0) {
and recompile the package.

See the following link for more information:

http://code.google.com/p/openvpn-auth-ldap/issues/detail?id=11

No comments:

Post a Comment