From: Bradley Nicholes Date: Mon, 23 May 2005 23:07:49 +0000 (+0000) Subject: Add the auth provider name as a note in the request so that authn_provider_alias... X-Git-Tag: 2.1.5~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=556fb599b57016c91d7c0bc41ccad2d7e7ffd0f3;p=thirdparty%2Fapache%2Fhttpd.git Add the auth provider name as a note in the request so that authn_provider_alias is able to look up the original provider along with the per_dir configuration. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@178052 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/aaa/mod_auth.h b/modules/aaa/mod_auth.h index fcc172ee712..7595f8b3934 100644 --- a/modules/aaa/mod_auth.h +++ b/modules/aaa/mod_auth.h @@ -30,6 +30,7 @@ extern "C" { #define AUTHN_DEFAULT_PROVIDER "file" #define AUTHZ_GROUP_NOTE "authz_group_note" +#define AUTHN_PROVIDER_NAME_NOTE "authn_provider_name" typedef enum { AUTH_DENIED, diff --git a/modules/aaa/mod_auth_basic.c b/modules/aaa/mod_auth_basic.c index fc27b71a16f..b4b48a6f216 100644 --- a/modules/aaa/mod_auth_basic.c +++ b/modules/aaa/mod_auth_basic.c @@ -237,8 +237,12 @@ static int authenticate_basic_user(request_rec *r) provider = current_provider->provider; } + apr_table_setn(r->notes, AUTHN_PROVIDER_NAME_NOTE, current_provider->provider_name); + auth_result = provider->check_password(r, sent_user, sent_pw); + apr_table_unset(r->notes, AUTHN_PROVIDER_NAME_NOTE); + /* Something occured. Stop checking. */ if (auth_result != AUTH_USER_NOT_FOUND) { break; diff --git a/modules/aaa/mod_auth_digest.c b/modules/aaa/mod_auth_digest.c index 2e02f38b052..7edf3201836 100644 --- a/modules/aaa/mod_auth_digest.c +++ b/modules/aaa/mod_auth_digest.c @@ -1358,10 +1358,14 @@ static authn_status get_hash(request_rec *r, const char *user, provider = current_provider->provider; } + apr_table_setn(r->notes, AUTHN_PROVIDER_NAME_NOTE, current_provider->provider_name); + /* We expect the password to be md5 hash of user:realm:password */ auth_result = provider->get_realm_hash(r, user, conf->realm, &password); + apr_table_unset(r->notes, AUTHN_PROVIDER_NAME_NOTE); + /* Something occured. Stop checking. */ if (auth_result != AUTH_USER_NOT_FOUND) { break;