From: Colm MacCarthaigh Date: Mon, 23 Jan 2006 20:08:42 +0000 (+0000) Subject: Fix PR37566: write to the log if the authgroupfile cannot be opened. X-Git-Tag: 2.0.56~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18522befa5ab06d6e01f384069bb2c9318e6203b;p=thirdparty%2Fapache%2Fhttpd.git Fix PR37566: write to the log if the authgroupfile cannot be opened. Submitted by: rpluem git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@371644 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 741dd36384d..82522c4aedb 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.0.56 + *) Write message to error log if AuthGroupFile cannot be opened. + PR 37566. [Rüdiger Plüm] + *) SECURITY: CVE-2005-3357 (cve.mitre.org) mod_ssl: Fix a possible crash during access control checks if a non-SSL request is processed for an SSL vhost (such as the diff --git a/modules/aaa/mod_auth.c b/modules/aaa/mod_auth.c index 4e7befd7011..b43ac86095e 100644 --- a/modules/aaa/mod_auth.c +++ b/modules/aaa/mod_auth.c @@ -113,8 +113,9 @@ static char *get_pw(request_rec *r, char *user, char *auth_pwfile) return NULL; } -static apr_table_t *groups_for_user(apr_pool_t *p, char *user, char *grpfile) +static apr_table_t *groups_for_user(request_rec *r, char *user, char *grpfile) { + apr_pool_t *p = r->pool; ap_configfile_t *f; apr_table_t *grps = apr_table_make(p, 15); apr_pool_t *sp; @@ -123,8 +124,8 @@ static apr_table_t *groups_for_user(apr_pool_t *p, char *user, char *grpfile) apr_status_t status; if ((status = ap_pcfg_openfile(&f, p, grpfile)) != APR_SUCCESS) { -/*add? aplog_error(APLOG_MARK, APLOG_ERR, NULL, - "Could not open group file: %s", grpfile);*/ + ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, + "Could not open group file: %s", grpfile); return NULL; } @@ -228,7 +229,7 @@ static int check_user_access(request_rec *r) reqs = (require_line *)reqs_arr->elts; if (conf->auth_grpfile) { - grpstatus = groups_for_user(r->pool, user, conf->auth_grpfile); + grpstatus = groups_for_user(r, user, conf->auth_grpfile); } else { grpstatus = NULL;