И над ЭТИМ я сидел два дня. Бился лбом в стену. На одной машине код работает, на другой - хренушки.



--- mod_ldap.c.orig Tue Dec 28 13:40:51 2004

+++ mod_ldap.c Tue Dec 28 13:45:34 2004

@@ -244,7 +244,7 @@

#endif /* USE_LDAP_TLS */



if (bind == TRUE) {

- if ((ret = ldap_simple_bind_s(*conn_ld, ldap_dn, ldap_dnpass) != LDAP_SUCCESS)) {

+ if ((ret = ldap_simple_bind_s(*conn_ld, ldap_dn, ldap_dnpass)) != LDAP_SUCCESS) {

pr_log_pri(PR_LOG_ERR, "mod_ldap: pr_ldap_connect(): ldap_simple_bind() as %s failed: %s", ldap_dn, ldap_err2string(ret));

return -1;

}

@@ -1126,7 +1126,7 @@

return DECLINED(cmd);

}



- if ((ret = ldap_simple_bind_s(ld_auth, ldap_authbind_dn, cmd->argv[2]) != LDAP_SUCCESS)) {

+ if ((ret = ldap_simple_bind_s(ld_auth, ldap_authbind_dn, cmd->argv[2])) != LDAP_SUCCESS) {

if (ret != LDAP_INVALID_CREDENTIALS)

pr_log_pri(PR_LOG_ERR, "mod_ldap: handle_ldap_check(): pr_ldap_connect() failed: %s", ldap_err2string(ret));

ldap_unbind(ld_auth);


@настроение: Афигевший