From: baalberith Date: Tue, 5 May 2009 12:39:52 +0000 (+0000) Subject: tweaked Basic provider support X-Git-Tag: gssweb-apache-2014-09-08~37 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=mod_auth_kerb.cvs%2F.git;a=commitdiff_plain;h=8cd1c3fe01d71282c52e3c2661f14024ddda08ea tweaked Basic provider support --- 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); }