Commit 96ee894d authored by Bradley Nicholes's avatar Bradley Nicholes
Browse files

Remove the 'satisfy' directive and the ap_satisfy() and ap_requires() APIs...

Remove the 'satisfy' directive and the ap_satisfy() and ap_requires() APIs since they no longer serve a purpose

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/authz-dev@360207 13f79535-47bb-0310-9956-ffa450edef68
parent e93007de
Loading
Loading
Loading
Loading
+14 −11
Original line number Diff line number Diff line
@@ -303,15 +303,17 @@ AP_DECLARE(const char *) ap_auth_name(request_rec *r);
 *      SATISFY_ALL    -- all of the requirements must be met.
 *      SATISFY_NOSPEC -- There are no applicable satisfy lines
 * </pre>
 */
 *
AP_DE CLARE(int) ap_satisfies(request_rec *r);
*/

/**
 * Retrieve information about all of the requires directives for this request
 * @param r The current request
 * @return An array of all requires directives for this request
 */
 *
AP_DE CLARE(const apr_array_header_t *) ap_requires(request_rec *r);    
*/

#ifdef CORE_PRIVATE

@@ -451,12 +453,12 @@ typedef struct {
    
    char *ap_default_type;
  
    /* Authentication stuff.  Groan... */
    
    int *satisfy; /* for every method one */
    char *ap_auth_type; /* Deprecated see mod_authn */
    char *ap_auth_name; /* Deprecated see mod_authn */
    apr_array_header_t *ap_requires; /* Deprecated see mod_authz */
//    /* Authentication stuff.  Groan... */
//    
//    int *satisfy; /* for every method one */
//    char *ap_auth_type; /* Deprecated see mod_authn */
//    char *ap_auth_name; /* Deprecated see mod_authn */
//    apr_array_header_t *ap_requires; /* Deprecated see mod_authz */

    /* Custom response config. These can contain text or a URL to redirect to.
     * if response_code_strings is NULL then there are none in the config,
@@ -685,8 +687,9 @@ APR_DECLARE_OPTIONAL_FN(const char *, ap_ident_lookup,
 * authorization values with mod_authz_host
 */

APR_DECLARE_OPTIONAL_FN(const apr_array_header_t *, authz_ap_requires,
/*APR_DECLARE_OPTIONAL_FN(const apr_array_header_t *, authz_ap_requires,
                        (request_rec *r));
*/                        
APR_DECLARE_OPTIONAL_FN(int, authz_some_auth_required, (request_rec *r));
APR_DECLARE_OPTIONAL_FN(const char *, authn_ap_auth_type, (request_rec *r));
APR_DECLARE_OPTIONAL_FN(const char *, authn_ap_auth_name, (request_rec *r));
+14 −4
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ static char errordocument_default;
static void *create_core_dir_config(apr_pool_t *a, char *dir)
{
    core_dir_config *conf;
    int i;
/*    int i;*/

    conf = (core_dir_config *)apr_pcalloc(a, sizeof(core_dir_config));

@@ -118,10 +118,12 @@ static void *create_core_dir_config(apr_pool_t *a, char *dir)
    conf->use_canonical_phys_port = USE_CANONICAL_PHYS_PORT_UNSET;

    conf->hostname_lookups = HOSTNAME_LOOKUP_UNSET;
/*
    conf->satisfy = apr_palloc(a, sizeof(*conf->satisfy) * METHODS);
    for (i = 0; i < METHODS; ++i) {
        conf->satisfy[i] = SATISFY_NOSPEC;
    }
*/    

#ifdef RLIMIT_CPU
    conf->limit_cpu = NULL;
@@ -347,7 +349,7 @@ static void *merge_core_dir_configs(apr_pool_t *a, void *basev, void *newv)
     */

    /* use a separate ->satisfy[] array either way */
    conf->satisfy = apr_palloc(a, sizeof(*conf->satisfy) * METHODS);
/*    conf->satisfy = apr_palloc(a, sizeof(*conf->satisfy) * METHODS);
    for (i = 0; i < METHODS; ++i) {
        if (new->satisfy[i] != SATISFY_NOSPEC) {
            conf->satisfy[i] = new->satisfy[i];
@@ -355,6 +357,7 @@ static void *merge_core_dir_configs(apr_pool_t *a, void *basev, void *newv)
            conf->satisfy[i] = base->satisfy[i];
        }
    }
*/    

    if (new->server_signature != srv_sig_unset) {
        conf->server_signature = new->server_signature;
@@ -732,7 +735,7 @@ AP_DECLARE(const char *) ap_document_root(request_rec *r) /* Don't use this! */

/*
 * Optional function coming from mod_ident, used for looking up ident user
 */
 *
static APR_OPTIONAL_FN_TYPE(authz_ap_requires) *authz_ap_requires;

AP_DECLARE(const apr_array_header_t *) ap_requires(request_rec *r)
@@ -742,7 +745,9 @@ AP_DECLARE(const apr_array_header_t *) ap_requires(request_rec *r)
    }
    return NULL;
}
*/

/*
AP_DECLARE(int) ap_satisfies(request_rec *r)
{
    core_dir_config *conf;
@@ -752,6 +757,7 @@ AP_DECLARE(int) ap_satisfies(request_rec *r)

    return conf->satisfy[r->method_number];
}
*/

/* Should probably just get rid of this... the only code that cares is
 * part of the core anyway (and in fact, it isn't publicised to other
@@ -1680,6 +1686,7 @@ static const char *set_enable_sendfile(cmd_parms *cmd, void *d_,
    return NULL;
}

/*
static const char *satisfy(cmd_parms *cmd, void *c_, const char *arg)
{
    core_dir_config *c = c_;
@@ -1704,6 +1711,7 @@ static const char *satisfy(cmd_parms *cmd, void *c_, const char *arg)

    return NULL;
}
*/

/*
 * Report a missing-'>' syntax error.
@@ -3219,8 +3227,10 @@ AP_INIT_RAW_ARGS("<LocationMatch", urlsection, (void*)1, RSRC_CONF,
  "specified URL paths"),
AP_INIT_RAW_ARGS("<FilesMatch", filesection, (void*)1, OR_ALL,
  "Container for directives affecting files matching specified patterns"),
/*
AP_INIT_TAKE1("Satisfy", satisfy, NULL, OR_AUTHCFG,
  "access policy if both allow and require used ('all' or 'any')"),
*/  
#ifdef GPROF
AP_INIT_TAKE1("GprofDir", set_gprof_dir, NULL, RSRC_CONF,
  "Directory to plop gmon.out files"),
@@ -3709,7 +3719,7 @@ static int core_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte
{
    logio_add_bytes_out = APR_RETRIEVE_OPTIONAL_FN(ap_logio_add_bytes_out);
    ident_lookup = APR_RETRIEVE_OPTIONAL_FN(ap_ident_lookup);
    authz_ap_requires = APR_RETRIEVE_OPTIONAL_FN(authz_ap_requires);
/*    authz_ap_requires = APR_RETRIEVE_OPTIONAL_FN(authz_ap_requires); */
    authz_ap_some_auth_required = APR_RETRIEVE_OPTIONAL_FN(authz_some_auth_required);
    authn_ap_auth_type = APR_RETRIEVE_OPTIONAL_FN(authn_ap_auth_type);
    authn_ap_auth_name = APR_RETRIEVE_OPTIONAL_FN(authn_ap_auth_name);