--- lighttpd-1.4.13/src/Makefile.am.old 2006-10-09 12:19:34.000000000 -0400 +++ lighttpd-1.4.13/src/Makefile.am 2007-03-26 10:10:26.000000000 -0400 @@ -213,6 +213,7 @@ mod_auth_la_SOURCES = mod_auth.c http_auth_digest.c http_auth.c mod_auth_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined mod_auth_la_LIBADD = $(CRYPT_LIB) $(LDAP_LIB) $(LBER_LIB) $(common_libadd) +mod_auth_la_CFLAGS = -DLDAP_DEPRECATED lib_LTLIBRARIES += mod_rewrite.la mod_rewrite_la_SOURCES = mod_rewrite.c --- lighttpd-1.4.13/src/http_auth.c.old 2006-10-04 09:29:17.000000000 -0400 +++ lighttpd-1.4.13/src/http_auth.c 2007-03-26 10:29:20.000000000 -0400 @@ -774,11 +774,20 @@ ldap_msgfree(lm); +#ifdef LDAP_API_FEATURE_X_OPENLDAP + ret = ldap_initialize(&ldap, p->conf.auth_ldap_hostname->ptr); + if (ret != LDAP_SUCCESS) + { + log_error_write(srv, __FILE__, __LINE__, "ss", "ldap ...", ldap_err2string(ret)); + return -1; + } +#else /* 3. */ if (NULL == (ldap = ldap_init(p->conf.auth_ldap_hostname->ptr, LDAP_PORT))) { log_error_write(srv, __FILE__, __LINE__, "ss", "ldap ...", strerror(errno)); return -1; } +#endif ret = LDAP_VERSION3; if (LDAP_OPT_SUCCESS != (ret = ldap_set_option(ldap, LDAP_OPT_PROTOCOL_VERSION, &ret))) {