--- modules/lookup_ldap.c.old 2010-05-28 13:47:33.888723271 +0200 +++ modules/lookup_ldap.c 2010-05-28 13:58:32.048972838 +0200 @@ -141,9 +141,13 @@ { int rv; +#ifdef WITH_SASL if (ctxt->auth_required == LDAP_AUTH_USESIMPLE) rv = ldap_simple_bind_s(ldap, ctxt->user, ctxt->secret); else if (ctxt->version == 2) +#else + if (ctxt->version == 2) +#endif rv = ldap_simple_bind_s(ldap, ctxt->base, NULL); else rv = ldap_simple_bind_s(ldap, NULL, NULL);