From: Graham Leggett Date: Tue, 25 May 2004 16:18:22 +0000 (+0000) Subject: Throw an error message if an attempt is made to use the LDAPTrustedCA X-Git-Tag: 2.0.50~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d3ce6644afbd64dbc1635f1cc29e5944fc2c5fd;p=thirdparty%2Fapache%2Fhttpd.git Throw an error message if an attempt is made to use the LDAPTrustedCA or LDAPTrustedCAType directives in a VirtualHost. PR: 26390 Obtained from: Submitted by: Reviewed by: minfrin, bnicholes, jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@103757 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index b7f3afaa451..426050d38b5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,9 @@ Changes with Apache 2.0.50 + *) Throw an error message if an attempt is made to use the LDAPTrustedCA + or LDAPTrustedCAType directives in a VirtualHost. PR 26390 + [Brad Nicholes] + *) Fix a potential segfault if the bind password in the LDAP cache is NULL. PR 28250 [Jari Ahonen ] diff --git a/modules/experimental/util_ldap.c b/modules/experimental/util_ldap.c index afc546ede70..444c0ab2ed4 100644 --- a/modules/experimental/util_ldap.c +++ b/modules/experimental/util_ldap.c @@ -1070,6 +1070,10 @@ static const char *util_ldap_set_cert_auth(cmd_parms *cmd, void *dummy, const ch util_ldap_state_t *st = (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config, &ldap_module); + const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); + if (err != NULL) { + return err; + } ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, cmd->server, "LDAP: SSL trusted certificate authority file - %s", @@ -1086,6 +1090,10 @@ const char *util_ldap_set_cert_type(cmd_parms *cmd, void *dummy, const char *Typ util_ldap_state_t *st = (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config, &ldap_module); + const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); + if (err != NULL) { + return err; + } ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, cmd->server, "LDAP: SSL trusted certificate authority file type - %s",