httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject svn commit: r355577 - /httpd/httpd/branches/authz-dev/modules/aaa/mod_authz_groupfile.c
Date Fri, 09 Dec 2005 19:40:56 GMT
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",



Mime
View raw message