Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 31981 invoked from network); 9 Dec 2005 19:41:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Dec 2005 19:41:56 -0000 Received: (qmail 76582 invoked by uid 500); 9 Dec 2005 19:41:29 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 76342 invoked by uid 500); 9 Dec 2005 19:41:23 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 75861 invoked by uid 99); 9 Dec 2005 19:41:19 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Dec 2005 11:41:19 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 09 Dec 2005 11:41:17 -0800 Received: (qmail 30844 invoked by uid 65534); 9 Dec 2005 19:40:57 -0000 Message-ID: <20051209194057.30843.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r355577 - /httpd/httpd/branches/authz-dev/modules/aaa/mod_authz_groupfile.c Date: Fri, 09 Dec 2005 19:40:56 -0000 To: cvs@httpd.apache.org From: bnicholes@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: bnicholes Date: Fri Dec 9 11:40:37 2005 New Revision: 355577 URL: http://svn.apache.org/viewcvs?rev=355577&view=rev Log: clean up a few loose ends Modified: httpd/httpd/branches/authz-dev/modules/aaa/mod_authz_groupfile.c Modified: httpd/httpd/branches/authz-dev/modules/aaa/mod_authz_groupfile.c URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/authz-dev/modules/aaa/mod_authz_groupfile.c?rev=355577&r1=355576&r2=355577&view=diff ============================================================================== --- httpd/httpd/branches/authz-dev/modules/aaa/mod_authz_groupfile.c (original) +++ httpd/httpd/branches/authz-dev/modules/aaa/mod_authz_groupfile.c Fri Dec 9 11:40:37 2005 @@ -280,6 +280,15 @@ apr_table_t *grpstatus = NULL; apr_status_t status; + /* If there is no group file - then we are not + * configured. So decline. + */ + if (!(conf->groupfile)) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + "No group file was specified in the configuration"); + return AUTHZ_DENIED; + } + status = groups_for_user(r->pool, user, conf->groupfile, &grpstatus); @@ -319,18 +328,24 @@ static authz_status filegroup_check_authorization(request_rec *r, const char *require_args) { - const char *filegroup = NULL; - - authz_groupfile_config_rec *conf = ap_get_module_config(r->per_dir_config, &authz_groupfile_module); char *user = r->user; apr_table_t *grpstatus = NULL; apr_status_t status; + const char *filegroup = NULL; + + /* If there is no group file - then we are not + * configured. So decline. + */ + if (!(conf->groupfile)) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + "No group file was specified in the configuration"); + return AUTHZ_DENIED; + } status = groups_for_user(r->pool, user, conf->groupfile, &grpstatus); - if (status != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, "Could not open group file: %s",