From 8cd1c3fe01d71282c52e3c2661f14024ddda08ea Mon Sep 17 00:00:00 2001 From: baalberith Date: Tue, 5 May 2009 12:39:52 +0000 Subject: [PATCH] tweaked Basic provider support --- src/mod_auth_kerb.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/mod_auth_kerb.c b/src/mod_auth_kerb.c index cc15efd..8d133e8 100644 --- a/src/mod_auth_kerb.c +++ b/src/mod_auth_kerb.c @@ -55,8 +55,6 @@ #define MECH_NEGOTIATE "Negotiate" #define SERVICE_NAME "HTTP" -#include -#include #include #include #include @@ -82,6 +80,11 @@ #define apr_pool_cleanup_register ap_register_cleanup #endif /* STANDARD20_MODULE_STUFF */ +#if AP_SERVER_MAJORVERSION_NUMBER == 2 && AP_SERVER_MINORVERSION_NUMBER== 2 +#define APACHE22 +#include "mod_auth.h" +#endif + #ifdef _WIN32 #define vsnprintf _vsnprintf #define snprintf _snprintf @@ -1837,11 +1840,14 @@ kerb_init_handler(apr_pool_t *p, apr_pool_t *plog, static void kerb_register_hooks(apr_pool_t *p) { +#ifdef APACHE22 static const authn_provider authn_krb_provider = { &authn_krb_password, + NULL }; - ap_register_provider(p, "authn", "kerberos", "0", &authn_krb_provider); + ap_register_provider(p, AUTHN_PROVIDER_GROUP, "kerberos", "0", &authn_krb_provider); +#endif ap_hook_post_config(kerb_init_handler, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_check_user_id(kerb_authenticate_user, NULL, NULL, APR_HOOK_MIDDLE); } -- 2.1.4