1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

* modules/ldap/util_ldap.c (util_ldap_post_config): Fail if

util_ldap_cache_init fails; let ap_log_error call strerror.
Downgrade informational messages to APLOG_INFO from APLOG_NOTICE.
(util_ldap_child_init): Remove some noisy but fairly pointless
debugging output.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@226974 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Joe Orton
2005-08-02 09:26:51 +00:00
parent c1e4ed78b3
commit 9562ffb5cc

View File

@@ -1790,7 +1790,6 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
apr_pool_t *ptemp, server_rec *s) apr_pool_t *ptemp, server_rec *s)
{ {
apr_status_t result; apr_status_t result;
char buf[MAX_STRING_LEN];
server_rec *s_vhost; server_rec *s_vhost;
util_ldap_state_t *st_vhost; util_ldap_state_t *st_vhost;
@@ -1831,10 +1830,9 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
#endif #endif
result = util_ldap_cache_init(p, st); result = util_ldap_cache_init(p, st);
if (result != APR_SUCCESS) { if (result != APR_SUCCESS) {
apr_strerror(result, buf, sizeof(buf));
ap_log_error(APLOG_MARK, APLOG_ERR, result, s, ap_log_error(APLOG_MARK, APLOG_ERR, result, s,
"LDAP cache: error while creating a shared memory " "LDAP cache: could not create shared memory segment");
"segment: %s", buf); return DONE;
} }
@@ -1897,7 +1895,7 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
apr_ldap_err_t *result = NULL; apr_ldap_err_t *result = NULL;
apr_ldap_info(p, &(result)); apr_ldap_info(p, &(result));
if (result != NULL) { if (result != NULL) {
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, "%s", result->reason); ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, "%s", result->reason);
} }
} }
@@ -1921,17 +1919,15 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
if (APR_SUCCESS == rc) { if (APR_SUCCESS == rc) {
st->ssl_supported = 1; st->ssl_supported = 1;
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
"LDAP: SSL support available" ); "LDAP: SSL support available" );
} }
else { else {
st->ssl_supported = 0; st->ssl_supported = 0;
if (NULL != result_err) { ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, "%s", "LDAP: SSL support unavailable%s%s",
result_err->reason); result_err ? ": " : "",
} result_err ? result_err->reason : "");
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s,
"LDAP: SSL support unavailable" );
} }
return(OK); return(OK);
@@ -1952,14 +1948,6 @@ static void util_ldap_child_init(apr_pool_t *p, server_rec *s)
"Failed to initialise global mutex %s in child process %" "Failed to initialise global mutex %s in child process %"
APR_PID_T_FMT ".", APR_PID_T_FMT ".",
st->lock_file, getpid()); st->lock_file, getpid());
return;
}
else {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"Initialisation of global mutex %s in child process %"
APR_PID_T_FMT
" successful.",
st->lock_file, getpid());
} }
} }