mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
Preserve the return value from the apr_stat() call so that it can be displayed in the error log message.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104817 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1045,6 +1045,7 @@ static const char *util_ldap_set_cert_auth(cmd_parms *cmd, void *dummy, const ch
|
|||||||
&ldap_module);
|
&ldap_module);
|
||||||
const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
|
const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
|
||||||
apr_finfo_t finfo;
|
apr_finfo_t finfo;
|
||||||
|
apr_status_t rv;
|
||||||
|
|
||||||
if (err != NULL) {
|
if (err != NULL) {
|
||||||
return err;
|
return err;
|
||||||
@@ -1057,11 +1058,11 @@ static const char *util_ldap_set_cert_auth(cmd_parms *cmd, void *dummy, const ch
|
|||||||
st->cert_auth_file = ap_server_root_relative(cmd->pool, file);
|
st->cert_auth_file = ap_server_root_relative(cmd->pool, file);
|
||||||
|
|
||||||
if (st->cert_auth_file &&
|
if (st->cert_auth_file &&
|
||||||
(apr_stat (&finfo, st->cert_auth_file, APR_FINFO_MIN, cmd->pool) != APR_SUCCESS))
|
((rv = apr_stat (&finfo, st->cert_auth_file, APR_FINFO_MIN, cmd->pool)) != APR_SUCCESS))
|
||||||
{
|
{
|
||||||
ap_log_error(APLOG_MARK, APLOG_ERR, 0, cmd->server,
|
ap_log_error(APLOG_MARK, APLOG_ERR, 0, cmd->server,
|
||||||
"LDAP: Could not open SSL trusted certificate authority file - %s",
|
"LDAP: Could not open SSL trusted certificate authority file - %s error: %d",
|
||||||
st->cert_auth_file == NULL ? file : st->cert_auth_file);
|
st->cert_auth_file == NULL ? file : st->cert_auth_file, rv);
|
||||||
return "Invalid file path";
|
return "Invalid file path";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user