Changes with Apache 2.0.12-dev
+ *) Rename the module structures so that the exported symbol matches
+ the file name, and it is easier to automate the installation
+ process (generating LoadModule directives from the module filenames).
+ [Martin Kraemer]
+
*) Remove the coalesce filter. With the ap_f* functions, this filter
is no longer needed. [Ryan Bloom]
APACHE_MODULE(access, host-based access control, , , yes)
APACHE_MODULE(auth, user-based access control, , , yes)
-APACHE_MODULE(auth_anon, anonymous user access, , anon_auth, no)
-APACHE_MODULE(auth_dbm, DBM-based access databases, , dbm_auth, no)
+APACHE_MODULE(auth_anon, anonymous user access, , , no)
+APACHE_MODULE(auth_dbm, DBM-based access databases, , , no)
-APACHE_MODULE(auth_db, DB-based access databases, , db_auth, no, [
+APACHE_MODULE(auth_db, DB-based access databases, , , no, [
AC_CHECK_HEADERS(db.h)
AC_CHECK_LIB(db,main)
])
-APACHE_MODULE(auth_digest, digests, , digest_auth, no)
+APACHE_MODULE(auth_digest, RFC2617 Digest authentication, , , no)
LTFLAGS="$LTFLAGS -export-dynamic"
{NULL}
};
-module AP_MODULE_DECLARE_DATA anon_auth_module;
+module AP_MODULE_DECLARE_DATA auth_anon_module;
static int anon_authenticate_basic_user(request_rec *r)
{
anon_auth_config_rec *sec =
(anon_auth_config_rec *) ap_get_module_config(r->per_dir_config,
- &anon_auth_module);
+ &auth_anon_module);
const char *sent_pw;
int res = DECLINED;
conn_rec *c = r->connection;
anon_auth_config_rec *sec =
(anon_auth_config_rec *) ap_get_module_config(r->per_dir_config,
- &anon_auth_module);
+ &auth_anon_module);
if (!sec->anon_auth)
return DECLINED;
ap_hook_auth_checker(check_anon_access,NULL,NULL,APR_HOOK_MIDDLE);
}
-module AP_MODULE_DECLARE_DATA anon_auth_module =
+module AP_MODULE_DECLARE_DATA auth_anon_module =
{
STANDARD20_MODULE_STUFF,
create_anon_auth_dir_config,/* dir config creater */
* instead of AuthDBMUserFile AuthDBMGroupFile
*
* Also, in the configuration file you need to specify
- * db_auth_module rather than auth_dbm_module
+ * auth_db_module rather than auth_dbm_module
*
* On some BSD systems (e.g. FreeBSD and NetBSD) dbm is automatically
* mapped to Berkeley DB. You can use either mod_auth_dbm or
{NULL}
};
-module db_auth_module;
+module auth_db_module;
static char *get_db_pw(request_rec *r, char *user, const char *auth_dbpwfile)
{
{
db_auth_config_rec *sec =
(db_auth_config_rec *) ap_get_module_config(r->per_dir_config,
- &db_auth_module);
+ &auth_db_module);
const char *sent_pw;
char *real_pw, *colon_pw;
apr_status_t invalid_pw;
{
db_auth_config_rec *sec =
(db_auth_config_rec *) ap_get_module_config(r->per_dir_config,
- &db_auth_module);
+ &auth_db_module);
char *user = r->user;
int m = r->method_number;
ap_hook_auth_checker(db_check_auth,NULL,NULL,APR_HOOK_MIDDLE);
}
-module db_auth_module =
+module auth_db_module =
{
STANDARD20_MODULE_STUFF,
create_db_auth_dir_config, /* dir config creater */
*
* XXX: this needs updating for apache-2.0 configuration method
* MODULE-DEFINITION-START
- * Name: dbm_auth_module
+ * Name: auth_dbm_module
* ConfigStart
. ./helpers/find-dbm-lib
* ConfigEnd
{NULL}
};
-module AP_MODULE_DECLARE_DATA dbm_auth_module;
+module AP_MODULE_DECLARE_DATA auth_dbm_module;
static char *get_dbm_pw(request_rec *r, char *user, char *auth_dbmpwfile)
{
{
dbm_auth_config_rec *sec =
(dbm_auth_config_rec *) ap_get_module_config(r->per_dir_config,
- &dbm_auth_module);
+ &auth_dbm_module);
const char *sent_pw;
char *real_pw, *colon_pw;
apr_status_t invalid_pw;
{
dbm_auth_config_rec *sec =
(dbm_auth_config_rec *) ap_get_module_config(r->per_dir_config,
- &dbm_auth_module);
+ &auth_dbm_module);
char *user = r->user;
int m = r->method_number;
ap_hook_auth_checker(dbm_check_auth, NULL, NULL, APR_HOOK_MIDDLE);
}
-module AP_MODULE_DECLARE_DATA dbm_auth_module =
+module AP_MODULE_DECLARE_DATA auth_dbm_module =
{
STANDARD20_MODULE_STUFF,
create_dbm_auth_dir_config, /* dir config creater */
static long num_buckets = DEF_NUM_BUCKETS;
-module AP_MODULE_DECLARE_DATA digest_auth_module;
+module AP_MODULE_DECLARE_DATA auth_digest_module;
/*
* initialization code
resp->raw_request_uri = r->unparsed_uri;
resp->psd_request_uri = &r->parsed_uri;
resp->needed_auth = 0;
- ap_set_module_config(r->request_config, &digest_auth_module, resp);
+ ap_set_module_config(r->request_config, &auth_digest_module, resp);
res = get_digest_rec(r, resp);
resp->client = get_client(resp->opaque_num, r);
while (mainreq->main != NULL) mainreq = mainreq->main;
while (mainreq->prev != NULL) mainreq = mainreq->prev;
resp = (digest_header_rec *) ap_get_module_config(mainreq->request_config,
- &digest_auth_module);
+ &auth_digest_module);
resp->needed_auth = 1;
/* get our conf */
conf = (digest_config_rec *) ap_get_module_config(r->per_dir_config,
- &digest_auth_module);
+ &auth_digest_module);
/* check for existence and syntax of Auth header */
{
const digest_config_rec *conf =
(digest_config_rec *) ap_get_module_config(r->per_dir_config,
- &digest_auth_module);
+ &auth_digest_module);
const char *user = r->user;
int m = r->method_number;
int method_restricted = 0;
note_digest_auth_failure(r, conf,
(digest_header_rec *) ap_get_module_config(r->request_config,
- &digest_auth_module),
+ &auth_digest_module),
0);
return HTTP_UNAUTHORIZED;
}
{
const digest_config_rec *conf =
(digest_config_rec *) ap_get_module_config(r->per_dir_config,
- &digest_auth_module);
+ &auth_digest_module);
digest_header_rec *resp =
(digest_header_rec *) ap_get_module_config(r->request_config,
- &digest_auth_module);
+ &auth_digest_module);
const char *ai = NULL, *digest = NULL, *nextnonce = "";
if (resp == NULL || !resp->needed_auth || conf == NULL)
ap_hook_fixups(add_auth_info, NULL, NULL, APR_HOOK_MIDDLE);
}
-module AP_MODULE_DECLARE_DATA digest_auth_module =
+module AP_MODULE_DECLARE_DATA auth_digest_module =
{
STANDARD20_MODULE_STUFF,
create_digest_dir_config, /* dir config creater */
APACHE_MODPATH_INIT(filters)
-APACHE_MODULE(include, Server Side Includes, , includes, yes)
+APACHE_MODULE(include, Server Side Includes, , , yes)
LTFLAGS="$LTFLAGS -export-dynamic"
#include "mod_include.h"
#include "util_ebcdic.h"
-module AP_MODULE_DECLARE_DATA includes_module;
+module AP_MODULE_DECLARE_DATA include_module;
static apr_hash_t *include_hash;
static APR_OPTIONAL_FN_TYPE(ap_register_include_handler) *ssi_pfn_register;
/* Basically, it puts a bread crumb in here, then looks */
/* for the crumb later to see if its been here. */
if (rr)
- ap_set_module_config(rr->request_config, &includes_module, r);
+ ap_set_module_config(rr->request_config, &include_module, r);
if (!error_fmt) {
SPLIT_AND_PASS_PRETAG_BUCKETS(*bb, ctx, f->next);
/* destroy the sub request if it's not a nested include (crumb) */
if (rr != NULL
- && ap_get_module_config(rr->request_config, &includes_module)
+ && ap_get_module_config(rr->request_config, &include_module)
!= NESTED_INCLUDE_MAGIC) {
ap_destroy_sub_req(rr);
}
* option only changes the default.
*/
-module includes_module;
+module include_module;
enum xbithack {
xbithack_off, xbithack_on, xbithack_full
};
request_rec *r = f->r;
include_ctx_t *ctx = f->ctx;
enum xbithack *state =
- (enum xbithack *) ap_get_module_config(r->per_dir_config, &includes_module);
+ (enum xbithack *) ap_get_module_config(r->per_dir_config, &include_module);
request_rec *parent;
if (!(ap_allow_options(r) & OPT_INCLUDES)) {
ap_set_last_modified(r);
}
- if ((parent = ap_get_module_config(r->request_config, &includes_module))) {
+ if ((parent = ap_get_module_config(r->request_config, &include_module))) {
/* Kludge --- for nested includes, we want to keep the subprocess
* environment of the base document (for compatibility); that means
* torquing our own last_modified date as well so that the
if (parent) {
/* signify that the sub request should not be killed */
- ap_set_module_config(r->request_config, &includes_module,
+ ap_set_module_config(r->request_config, &include_module,
NESTED_INCLUDE_MAGIC);
}
ap_register_output_filter("INCLUDES", includes_filter, AP_FTYPE_CONTENT);
}
-module AP_MODULE_DECLARE_DATA includes_module =
+module AP_MODULE_DECLARE_DATA include_module =
{
STANDARD20_MODULE_STUFF,
create_includes_dir_config, /* dir config creater */
#endif /*APR_CHARSET_EBCDIC*/
/* just need some arbitrary non-NULL pointer which can't also be a request_rec */
-#define NESTED_INCLUDE_MAGIC (&includes_module)
+#define NESTED_INCLUDE_MAGIC (&include_module)
/****************************************************************************
* Used to keep context information during parsing of a request for SSI tags.
APACHE_MODPATH_INIT(loggers)
-APACHE_MODULE(log_config, logging configuration, , config_log, yes)
+APACHE_MODULE(log_config, logging configuration, , , yes)
APACHE_MODPATH_FINISH
#define DEFAULT_LOG_FORMAT "%h %l %u %t \"%r\" %>s %b"
-module AP_MODULE_DECLARE_DATA config_log_module;
+module AP_MODULE_DECLARE_DATA log_config_module;
static int xfer_flags = (APR_WRITE | APR_APPEND | APR_CREATE);
static apr_fileperms_t xfer_perms = APR_OS_DEFAULT;
static int multi_log_transaction(request_rec *r)
{
multi_log_state *mls = ap_get_module_config(r->server->module_config,
- &config_log_module);
+ &log_config_module);
config_log_state *clsarray;
int i;
{
const char *err_string = NULL;
multi_log_state *mls = ap_get_module_config(cmd->server->module_config,
- &config_log_module);
+ &log_config_module);
/*
* If we were given two arguments, the second is a name to be given to the
{
const char *err_string = NULL;
multi_log_state *mls = ap_get_module_config(cmd->server->module_config,
- &config_log_module);
+ &log_config_module);
config_log_state *cls;
cls = (config_log_state *) apr_array_push(mls->config_logs);
{
int i;
multi_log_state *mls = ap_get_module_config(s->module_config,
- &config_log_module);
+ &log_config_module);
config_log_state *clsarray;
const char *dummy;
const char *format;
int i;
for (; s; s = s->next) {
- mls = ap_get_module_config(s->module_config, &config_log_module);
+ mls = ap_get_module_config(s->module_config, &log_config_module);
log_list = NULL;
if (mls->config_logs->nelts) {
log_list = mls->config_logs;
ap_hook_log_transaction(multi_log_transaction,NULL,NULL,APR_HOOK_MIDDLE);
}
-module AP_MODULE_DECLARE_DATA config_log_module =
+module AP_MODULE_DECLARE_DATA log_config_module =
{
STANDARD20_MODULE_STUFF,
NULL, /* create per-dir config */
APACHE_MODULE(negotiation, content negoatiation, , , yes)
APACHE_MODULE(dir, directory request handling, , , yes)
APACHE_MODULE(imap, internal imagemaps, , , yes)
-APACHE_MODULE(actions, Action triggering on requests, , action, yes)
+APACHE_MODULE(actions, Action triggering on requests, , , yes)
APACHE_MODULE(speling, correct common URL misspellings, , , no)
APACHE_MODULE(userdir, mapping of user requests, , , yes)
APACHE_MODULE(alias, translation of requests, , , yes)
const char *scripted[METHODS]; /* Added with Script... */
} action_dir_config;
-module action_module;
+module actions_module;
static void *create_action_dir_config(apr_pool_t *p, char *dummy)
{
static int action_handler(request_rec *r)
{
action_dir_config *conf = (action_dir_config *)
- ap_get_module_config(r->per_dir_config, &action_module);
+ ap_get_module_config(r->per_dir_config, &actions_module);
const char *t, *action = r->handler ? r->handler :
ap_field_noparam(r->pool, r->content_type);
const char *script;
ap_hook_handler(action_handler,NULL,NULL,APR_HOOK_LAST);
}
-module action_module =
+module actions_module =
{
STANDARD20_MODULE_STUFF,
create_action_dir_config, /* dir config creater */