You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ch...@apache.org on 2008/05/22 19:01:15 UTC
svn commit: r659160 - in /httpd/httpd/trunk: CHANGES configure.in
modules/aaa/mod_auth_basic.c modules/aaa/mod_auth_digest.c
modules/aaa/mod_authn_core.c modules/aaa/mod_authz_core.c server/request.c
Author: chrisd
Date: Thu May 22 10:01:14 2008
New Revision: 659160
URL: http://svn.apache.org/viewvc?rev=659160&view=rev
Log:
Determine registered authn/z providers directly in ap_setup_auth_internal(),
which allows optional functions that just wrapped ap_list_provider_names()
to be removed from authn/z modules.
This change requires modules/aaa/mod_auth.h to be included into
server/request.c, which necessitates a minor change to configure.in for
Unix platforms.
I'm unable to tell whether a similar change is necessary for Windows and
NetWare builds or not. Could developers with access to those platforms
please test and make any needed configuration or build alterations? Thanks!
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/configure.in
httpd/httpd/trunk/modules/aaa/mod_auth_basic.c
httpd/httpd/trunk/modules/aaa/mod_auth_digest.c
httpd/httpd/trunk/modules/aaa/mod_authn_core.c
httpd/httpd/trunk/modules/aaa/mod_authz_core.c
httpd/httpd/trunk/server/request.c
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=659160&r1=659159&r2=659160&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Thu May 22 10:01:14 2008
@@ -2,6 +2,11 @@
Changes with Apache 2.3.0
[ When backported to 2.2.x, remove entry from this file ]
+ *) core, authn/z: Determine registered authn/z providers directly in
+ ap_setup_auth_internal(), which allows optional functions that just
+ wrapped ap_list_provider_names() to be removed from authn/z modules.
+ [Chris Darroch]
+
*) authn/z: Convert common provider version strings to macros.
[Chris Darroch]
Modified: httpd/httpd/trunk/configure.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/configure.in?rev=659160&r1=659159&r2=659160&view=diff
==============================================================================
--- httpd/httpd/trunk/configure.in (original)
+++ httpd/httpd/trunk/configure.in Thu May 22 10:01:14 2008
@@ -204,7 +204,7 @@
APR_ADDTO(INCLUDES, [-I\$(top_builddir)/include])
fi
-APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/os/\$(OS_DIR) -I\$(top_srcdir)/server/mpm/\$(MPM_SUBDIR_NAME) -I\$(top_srcdir)/modules/http -I\$(top_srcdir)/modules/filters -I\$(top_srcdir)/modules/proxy -I\$(top_srcdir)/modules/session -I\$(top_srcdir)/include -I\$(top_srcdir)/modules/generators -I\$(top_srcdir)/modules/mappers -I\$(top_srcdir)/modules/database])
+APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/os/\$(OS_DIR) -I\$(top_srcdir)/server/mpm/\$(MPM_SUBDIR_NAME) -I\$(top_srcdir)/modules/http -I\$(top_srcdir)/modules/aaa -I\$(top_srcdir)/modules/filters -I\$(top_srcdir)/modules/proxy -I\$(top_srcdir)/modules/session -I\$(top_srcdir)/include -I\$(top_srcdir)/modules/generators -I\$(top_srcdir)/modules/mappers -I\$(top_srcdir)/modules/database])
# apr/apr-util --includes may pick up system paths for dependent
# libraries, so ensure these are later in INCLUDES than local source
Modified: httpd/httpd/trunk/modules/aaa/mod_auth_basic.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_auth_basic.c?rev=659160&r1=659159&r2=659160&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_auth_basic.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_auth_basic.c Thu May 22 10:01:14 2008
@@ -286,16 +286,8 @@
return OK;
}
-static apr_array_header_t *authn_ap_list_provider_names(apr_pool_t *ptemp)
-{
- return ap_list_provider_names(ptemp, AUTHN_PROVIDER_GROUP,
- AUTHN_PROVIDER_VERSION);
-}
-
static void register_hooks(apr_pool_t *p)
{
- APR_REGISTER_OPTIONAL_FN(authn_ap_list_provider_names);
-
ap_hook_check_authn(authenticate_basic_user, NULL, NULL, APR_HOOK_MIDDLE,
AP_AUTH_INTERNAL_PER_CONF);
}
Modified: httpd/httpd/trunk/modules/aaa/mod_auth_digest.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_auth_digest.c?rev=659160&r1=659159&r2=659160&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_auth_digest.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_auth_digest.c Thu May 22 10:01:14 2008
@@ -1963,19 +1963,11 @@
return OK;
}
-static apr_array_header_t *authn_ap_list_provider_names(apr_pool_t *ptemp)
-{
- return ap_list_provider_names(ptemp, AUTHN_PROVIDER_GROUP,
- AUTHN_PROVIDER_VERSION);
-}
-
static void register_hooks(apr_pool_t *p)
{
static const char * const cfgPost[]={ "http_core.c", NULL };
static const char * const parsePre[]={ "mod_proxy.c", NULL };
- APR_REGISTER_OPTIONAL_FN(authn_ap_list_provider_names);
-
ap_hook_post_config(initialize_module, NULL, cfgPost, APR_HOOK_MIDDLE);
ap_hook_child_init(initialize_child, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_post_read_request(parse_hdr_and_update_nc, parsePre, NULL, APR_HOOK_MIDDLE);
Modified: httpd/httpd/trunk/modules/aaa/mod_authn_core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_authn_core.c?rev=659160&r1=659159&r2=659160&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_authn_core.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_authn_core.c Thu May 22 10:01:14 2008
@@ -299,12 +299,6 @@
return apr_pstrdup(r->pool, conf->ap_auth_name);
}
-static apr_array_header_t *authn_ap_list_provider_names(apr_pool_t *ptemp)
-{
- return ap_list_provider_names(ptemp, AUTHN_PROVIDER_GROUP,
- AUTHN_PROVIDER_VERSION);
-}
-
static const command_rec authn_cmds[] =
{
AP_INIT_TAKE1("AuthType", ap_set_string_slot,
@@ -322,7 +316,6 @@
{
APR_REGISTER_OPTIONAL_FN(authn_ap_auth_type);
APR_REGISTER_OPTIONAL_FN(authn_ap_auth_name);
- APR_REGISTER_OPTIONAL_FN(authn_ap_list_provider_names);
}
module AP_MODULE_DECLARE_DATA authn_core_module =
Modified: httpd/httpd/trunk/modules/aaa/mod_authz_core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_authz_core.c?rev=659160&r1=659159&r2=659160&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_authz_core.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_authz_core.c Thu May 22 10:01:14 2008
@@ -805,16 +805,9 @@
return req_authz;
}
-static apr_array_header_t *authz_ap_list_provider_names(apr_pool_t *ptemp)
-{
- return ap_list_provider_names(ptemp, AUTHZ_PROVIDER_GROUP,
- AUTHZ_PROVIDER_VERSION);
-}
-
static void register_hooks(apr_pool_t *p)
{
APR_REGISTER_OPTIONAL_FN(authz_some_auth_required);
- APR_REGISTER_OPTIONAL_FN(authz_ap_list_provider_names);
ap_hook_check_authz(authorize_user, NULL, NULL, APR_HOOK_MIDDLE,
AP_AUTH_INTERNAL_PER_CONF);
Modified: httpd/httpd/trunk/server/request.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/request.c?rev=659160&r1=659159&r2=659160&view=diff
==============================================================================
--- httpd/httpd/trunk/server/request.c (original)
+++ httpd/httpd/trunk/server/request.c Thu May 22 10:01:14 2008
@@ -48,6 +48,7 @@
#include "mod_request.h"
#include "mod_core.h"
+#include "mod_auth.h"
#if APR_HAVE_STDARG_H
#include <stdarg.h>
@@ -1685,10 +1686,6 @@
AP_DECLARE(void) ap_setup_auth_internal(apr_pool_t *ptemp)
{
- APR_OPTIONAL_FN_TYPE(authn_ap_list_provider_names)
- *authn_ap_list_provider_names;
- APR_OPTIONAL_FN_TYPE(authz_ap_list_provider_names)
- *authz_ap_list_provider_names;
int total_auth_hooks = 0;
int total_auth_providers = 0;
@@ -1708,18 +1705,12 @@
return;
}
- authn_ap_list_provider_names =
- APR_RETRIEVE_OPTIONAL_FN(authn_ap_list_provider_names);
- authz_ap_list_provider_names =
- APR_RETRIEVE_OPTIONAL_FN(authz_ap_list_provider_names);
-
- if (authn_ap_list_provider_names) {
- total_auth_providers += authn_ap_list_provider_names(ptemp)->nelts;
- }
-
- if (authz_ap_list_provider_names) {
- total_auth_providers += authz_ap_list_provider_names(ptemp)->nelts;
- }
+ total_auth_providers +=
+ ap_list_provider_names(ptemp, AUTHN_PROVIDER_GROUP,
+ AUTHN_PROVIDER_VERSION)->nelts;
+ total_auth_providers +=
+ ap_list_provider_names(ptemp, AUTHZ_PROVIDER_GROUP,
+ AUTHZ_PROVIDER_VERSION)->nelts;
if (total_auth_providers > auth_internal_per_conf_providers) {
return;