From: Garrett Rooney Date: Fri, 31 Mar 2006 21:35:44 +0000 (+0000) Subject: Clean up some stuff found by Coverity. X-Git-Tag: 2.3.0~2480 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=292e59fa35db7dccff1ed9df670cfb084c5a08df;p=thirdparty%2Fapache%2Fhttpd.git Clean up some stuff found by Coverity. * modules/aaa/mod_authz_core.c (check_provider_list): Remove redundant code. * modules/aaa/mod_auth.h (AUTHZ_DEFAULT_PROVIDER): Remove redundant definition. Submitted by: Max Bowsher Reviewed by: bnicholes, rooneg git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@390506 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/aaa/mod_auth.h b/modules/aaa/mod_auth.h index 9d772d49ac4..20654085d73 100644 --- a/modules/aaa/mod_auth.h +++ b/modules/aaa/mod_auth.h @@ -38,7 +38,6 @@ extern "C" { #define AUTHN_PROVIDER_GROUP "authn" #define AUTHZ_PROVIDER_GROUP "authz" #define AUTHN_DEFAULT_PROVIDER "file" -#define AUTHZ_DEFAULT_PROVIDER "default" #define AUTHZ_GROUP_NOTE "authz_group_note" #define AUTHN_PROVIDER_NAME_NOTE "authn_provider_name" diff --git a/modules/aaa/mod_authz_core.c b/modules/aaa/mod_authz_core.c index 1caa1e9458d..f3adc24c2f1 100644 --- a/modules/aaa/mod_authz_core.c +++ b/modules/aaa/mod_authz_core.c @@ -482,27 +482,9 @@ static authz_status check_provider_list (request_rec *r, authz_provider_list *cu const authz_provider *provider; - /* For now, if a provider isn't set, we'll be nice and use the file - * provider. - */ - if (!current_provider) { - provider = ap_lookup_provider(AUTHZ_PROVIDER_GROUP, - AUTHZ_DEFAULT_PROVIDER, "0"); - - if (!provider || !provider->check_authorization) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "No default authz provider configured"); - auth_result = AUTHZ_GENERAL_ERROR; - return auth_result; - } - apr_table_setn(r->notes, AUTHZ_PROVIDER_NAME_NOTE, - AUTHZ_DEFAULT_PROVIDER); - } - else { - provider = current_provider->provider; - apr_table_setn(r->notes, AUTHZ_PROVIDER_NAME_NOTE, - current_provider->provider_name); - } + provider = current_provider->provider; + apr_table_setn(r->notes, AUTHZ_PROVIDER_NAME_NOTE, + current_provider->provider_name); /* check to make sure that the request method requires * authorization before calling the provider