Commit abc2520c authored by Bradley Nicholes's avatar Bradley Nicholes
Browse files

switch the internal names from authn to authn_core and authz to authz_core

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/authz-dev@354699 13f79535-47bb-0310-9956-ffa450edef68
parent c45c6f84
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ APACHE_MODULE(authn_alias, auth provider alias, , , no)
dnl General Authentication modules; module which implements the 
dnl non-authn module specific directives.
dnl
APACHE_MODULE(authn, general authentication module, , , yes)
APACHE_MODULE(authn_core, core authentication module, , , yes)

dnl Authorization modules: modules which verify a certain property such as
dnl membership of a group, value of the IP address against a list of pre
@@ -41,7 +41,7 @@ APACHE_MODULE(authz_dbd, SQL based authorization and Login/Session support, , ,
dnl General Authorization modules; provider module which implements the 
dnl non-authz module specific directives.
dnl
APACHE_MODULE(authz, general authorization provider vector module, , , yes)
APACHE_MODULE(authz_core, core authorization provider vector module, , , yes)

dnl LDAP authentication module. This module has both the authn and authz
dnl modules in one, so as to share the LDAP server config directives.
+22 −22
Original line number Diff line number Diff line
@@ -53,29 +53,29 @@
typedef struct {
    char *ap_auth_type;
    char *ap_auth_name;
} authn_dir_conf;
} authn_core_dir_conf;

module AP_MODULE_DECLARE_DATA authn_module;
module AP_MODULE_DECLARE_DATA authn_core_module;

static void *create_authn_dir_config(apr_pool_t *p, char *dummy)
static void *create_authn_core_dir_config(apr_pool_t *p, char *dummy)
{
    authn_dir_conf *conf =
            (authn_dir_conf *)apr_pcalloc(p, sizeof(authn_dir_conf));
    authn_core_dir_conf *conf =
            (authn_core_dir_conf *)apr_pcalloc(p, sizeof(authn_core_dir_conf));

    return (void *)conf;
}

static void *merge_authn_dir_config(apr_pool_t *a, void *basev, void *newv)
static void *merge_authn_core_dir_config(apr_pool_t *a, void *basev, void *newv)
{
    authn_dir_conf *base = (authn_dir_conf *)basev;
    authn_dir_conf *new = (authn_dir_conf *)newv;
    authn_dir_conf *conf;
    authn_core_dir_conf *base = (authn_core_dir_conf *)basev;
    authn_core_dir_conf *new = (authn_core_dir_conf *)newv;
    authn_core_dir_conf *conf;

    /* Create this conf by duplicating the base, replacing elements
    * (or creating copies for merging) where new-> values exist.
    */
    conf = (authn_dir_conf *)apr_palloc(a, sizeof(authn_dir_conf));
    memcpy(conf, base, sizeof(authn_dir_conf));
    conf = (authn_core_dir_conf *)apr_palloc(a, sizeof(authn_core_dir_conf));
    memcpy(conf, base, sizeof(authn_core_dir_conf));

    if (new->ap_auth_type) {
        conf->ap_auth_type = new->ap_auth_type;
@@ -95,7 +95,7 @@ static void *merge_authn_dir_config(apr_pool_t *a, void *basev, void *newv)
static const char *set_authname(cmd_parms *cmd, void *mconfig,
                                const char *word1)
{
    authn_dir_conf *aconfig = (authn_dir_conf *)mconfig;
    authn_core_dir_conf *aconfig = (authn_core_dir_conf *)mconfig;

    aconfig->ap_auth_name = ap_escape_quotes(cmd->pool, word1);
    return NULL;
@@ -104,20 +104,20 @@ static const char *set_authname(cmd_parms *cmd, void *mconfig,

static const char *authn_ap_auth_type(request_rec *r)
{
    authn_dir_conf *conf;
    authn_core_dir_conf *conf;

    conf = (authn_dir_conf *)ap_get_module_config(r->per_dir_config,
        &authn_module);
    conf = (authn_core_dir_conf *)ap_get_module_config(r->per_dir_config,
        &authn_core_module);

    return apr_pstrdup(r->pool, conf->ap_auth_type);
}

static const char *authn_ap_auth_name(request_rec *r)
{
    authn_dir_conf *conf;
    authn_core_dir_conf *conf;

    conf = (authn_dir_conf *)ap_get_module_config(r->per_dir_config,
        &authn_module);
    conf = (authn_core_dir_conf *)ap_get_module_config(r->per_dir_config,
        &authn_core_module);

    return apr_pstrdup(r->pool, conf->ap_auth_name);
}
@@ -125,7 +125,7 @@ static const char *authn_ap_auth_name(request_rec *r)
static const command_rec authn_cmds[] =
{
    AP_INIT_TAKE1("AuthType", ap_set_string_slot,
                  (void*)APR_OFFSETOF(authn_dir_conf, ap_auth_type), OR_AUTHCFG,
                  (void*)APR_OFFSETOF(authn_core_dir_conf, ap_auth_type), OR_AUTHCFG,
                  "An HTTP authorization type (e.g., \"Basic\")"),
    AP_INIT_TAKE1("AuthName", set_authname, NULL, OR_AUTHCFG,
                  "The authentication realm (e.g. \"Members Only\")"),
@@ -138,11 +138,11 @@ static void register_hooks(apr_pool_t *p)
    APR_REGISTER_OPTIONAL_FN(authn_ap_auth_name);
}

module AP_MODULE_DECLARE_DATA authn_module =
module AP_MODULE_DECLARE_DATA authn_core_module =
{
    STANDARD20_MODULE_STUFF,
    create_authn_dir_config,        /* dir config creater */
    merge_authn_dir_config,         /* dir merger --- default is to override */
    create_authn_core_dir_config,        /* dir config creater */
    merge_authn_core_dir_config,         /* dir merger --- default is to override */
    NULL,                           /* server config */
    NULL,                           /* merge server config */
    authn_cmds,
+21 −21
Original line number Diff line number Diff line
@@ -81,29 +81,29 @@
typedef struct {
    apr_array_header_t *ap_requires;
    authz_provider_list *providers;
} authz_dir_conf;
} authz_core_dir_conf;

module AP_MODULE_DECLARE_DATA authz_module;
module AP_MODULE_DECLARE_DATA authz_core_module;

static void *create_authz_dir_config(apr_pool_t *p, char *dummy)
static void *create_authz_core_dir_config(apr_pool_t *p, char *dummy)
{
    authz_dir_conf *conf =
            (authz_dir_conf *)apr_pcalloc(p, sizeof(authz_dir_conf));
    authz_core_dir_conf *conf =
            (authz_core_dir_conf *)apr_pcalloc(p, sizeof(authz_core_dir_conf));

    return (void *)conf;
}

static void *merge_authz_dir_config(apr_pool_t *a, void *basev, void *newv)
static void *merge_authz_core_dir_config(apr_pool_t *a, void *basev, void *newv)
{
    authz_dir_conf *base = (authz_dir_conf *)basev;
    authz_dir_conf *new = (authz_dir_conf *)newv;
    authz_dir_conf *conf;
    authz_core_dir_conf *base = (authz_core_dir_conf *)basev;
    authz_core_dir_conf *new = (authz_core_dir_conf *)newv;
    authz_core_dir_conf *conf;

    /* Create this conf by duplicating the base, replacing elements
    * (or creating copies for merging) where new-> values exist.
    */
    conf = (authz_dir_conf *)apr_palloc(a, sizeof(authz_dir_conf));
    memcpy(conf, base, sizeof(authz_dir_conf));
    conf = (authz_core_dir_conf *)apr_palloc(a, sizeof(authz_core_dir_conf));
    memcpy(conf, base, sizeof(authz_core_dir_conf));

    if (new->ap_requires) {
        conf->ap_requires = new->ap_requires;
@@ -115,7 +115,7 @@ static void *merge_authz_dir_config(apr_pool_t *a, void *basev, void *newv)
static const char *add_authz_provider(cmd_parms *cmd, void *config,
                                      const char *arg)
{
    authz_dir_conf *conf = (authz_dir_conf*)config;
    authz_core_dir_conf *conf = (authz_core_dir_conf*)config;
    authz_provider_list *newp;

    newp = apr_pcalloc(cmd->pool, sizeof(authz_provider_list));
@@ -171,8 +171,8 @@ static const command_rec authz_cmds[] =

static int authorize_user(request_rec *r)
{
    authz_dir_conf *conf = ap_get_module_config(r->per_dir_config,
            &authz_module);
    authz_core_dir_conf *conf = ap_get_module_config(r->per_dir_config,
            &authz_core_module);
    authz_status auth_result;
    authz_provider_list *current_provider;

@@ -258,18 +258,18 @@ static int authorize_user(request_rec *r)

static const apr_array_header_t *authz_ap_requires(request_rec *r)
{
    authz_dir_conf *conf;
    authz_core_dir_conf *conf;

    conf = (authz_dir_conf *)ap_get_module_config(r->per_dir_config,
        &authz_module);
    conf = (authz_core_dir_conf *)ap_get_module_config(r->per_dir_config,
        &authz_core_module);

    return conf->ap_requires;
}

static int authz_some_auth_required(request_rec *r)
{
    authz_dir_conf *conf = ap_get_module_config(r->per_dir_config,
            &authz_module);
    authz_core_dir_conf *conf = ap_get_module_config(r->per_dir_config,
            &authz_core_module);
    authz_provider_list *current_provider;
    int req_authz = 0;

@@ -297,10 +297,10 @@ static void register_hooks(apr_pool_t *p)
    ap_hook_auth_checker(authorize_user, NULL, NULL, APR_HOOK_MIDDLE);
}

module AP_MODULE_DECLARE_DATA authz_module =
module AP_MODULE_DECLARE_DATA authz_core_module =
{
    STANDARD20_MODULE_STUFF,
    create_authz_dir_config,   /* dir config creater */
    create_authz_core_dir_config,   /* dir config creater */
    NULL,                           /* dir merger --- default is to override */
    NULL,                           /* server config */
    NULL,                           /* merge server config */