From ef6b924ffbea7a86f7b0c306ce460394e54eaac9 Mon Sep 17 00:00:00 2001 From: Jan Marc Hoffmann Date: Fri, 18 Jan 2013 01:42:58 +0100 Subject: [PATCH] The tls allow option will cause problems when no ldap.conf is defined on the client system. If the certificate option fails, warn and keep going. --- ngx_http_auth_ldap_module.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ngx_http_auth_ldap_module.c b/ngx_http_auth_ldap_module.c index 67175ed..7daa63b 100644 --- a/ngx_http_auth_ldap_module.c +++ b/ngx_http_auth_ldap_module.c @@ -448,9 +448,8 @@ static ngx_int_t ngx_http_auth_ldap_authenticate(ngx_http_request_t *r, ngx_http rc = ldap_set_option(NULL, LDAP_OPT_X_TLS_REQUIRE_CERT, &reqcert); if (rc != LDAP_OPT_SUCCESS) { - ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "LDAP: unable to set require cert option: %s", + ngx_log_error(NGX_LOG_WARN, r->connection->log, 0, "LDAP: unable to set require cert option: %s", ldap_err2string(rc)); - return NGX_HTTP_INTERNAL_SERVER_ERROR; } ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "LDAP: URL: %s", conf->url.data);