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);
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",