httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roy Fielding <field...@hyperreal.com>
Subject cvs commit: apache/src http_core.c mod_access.c
Date Mon, 18 Nov 1996 03:38:08 GMT
fielding    96/11/17 19:38:07

  Modified:    src       http_core.c mod_access.c
  Log:
  Reversed earlier patch for satisfy directive since it doesn't work,
  causes warnings when compiled, and will be replaced by a better patch
  from somewhere else.
  
  Revision  Changes    Path
  1.48      +0 -11     apache/src/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/http_core.c,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -C3 -r1.47 -r1.48
  *** http_core.c	1996/11/17 21:40:10	1.47
  --- http_core.c	1996/11/18 03:38:04	1.48
  ***************
  *** 243,259 ****
        core_dir_config *conf = 
          (core_dir_config *)get_module_config(r->per_dir_config, &core_module); 
    
  -     if (satisfy_any(r, 0))
  - 	return NULL;
  -     else
  -         return conf->auth_type;
  - }
  - 
  - char *real_auth_type (request_rec *r)
  - {
  -     core_dir_config *conf =
  - 	(core_dir_config *)get_module_config(r->per_dir_config, &core_module);
  - 
        return conf->auth_type;
    }
    
  --- 243,248 ----
  
  
  
  1.9       +2 -27     apache/src/mod_access.c
  
  Index: mod_access.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/mod_access.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -C3 -r1.8 -r1.9
  *** mod_access.c	1996/11/17 21:40:11	1.8
  --- mod_access.c	1996/11/18 03:38:05	1.9
  ***************
  *** 76,82 ****
        int order[METHODS];
        array_header *allows;
        array_header *denys;
  -     char *satisfy;
    } access_dir_conf;
    
    module access_module;
  --- 76,81 ----
  ***************
  *** 90,120 ****
        for (i = 0; i < METHODS; ++i) conf->order[i] = DENY_THEN_ALLOW;
        conf->allows = make_array (p, 1, sizeof (allowdeny));
        conf->denys = make_array (p, 1, sizeof (allowdeny));
  -     conf->satisfy = NULL;
        
        return (void *)conf;
    }
    
  - int satisfy_any (request_rec *r, int reset)
  - {
  -     char *satisfy;
  -     access_dir_conf *conf =
  -       (access_dir_conf *)get_module_config(r->per_dir_config, &access_module);
  - 
  -     if (!(satisfy = conf->satisfy)) 
  - 	return 0;
  -     
  -     if (!strcasecmp(satisfy, "any")) {
  - 	if (reset) strcpy(satisfy, "all");
  - 	return 1;
  -     } else if (!strcasecmp(satisfy, "all"))
  - 	return 0;
  - 
  -     log_error("Invalid satisfy value.", r->server);
  -     return 0;
  - } 
  - 
  - 
    const char *order (cmd_parms *cmd, void *dv, char *arg)
    {
        access_dir_conf *d = (access_dir_conf *)dv;
  --- 89,98 ----
  ***************
  *** 155,161 ****
        "'from' followed by hostnames or IP-address wildcards" },
    { "deny", allow_cmd, NULL, OR_LIMIT, ITERATE2,
        "'from' followed by hostnames or IP-address wildcards" },
  - { "Satisfy", set_string_slot, (void*)XtOffsetOf(access_dir_conf, satisfy), OR_AUTHCFG,
TAKE1, NULL },
    {NULL}
    };
    
  --- 133,138 ----
  ***************
  *** 258,267 ****
        }
    
        if (ret == FORBIDDEN)
  ! 	if (satisfy_any(r, 1) && real_auth_type(r))
  ! 	    ret = OK;
  ! 	else 
  ! 	    log_reason ("Client denied by server configuration", r->filename, r);
        return ret;
    }
    
  --- 235,242 ----
        }
    
        if (ret == FORBIDDEN)
  ! 	log_reason ("Client denied by server configuration", r->filename, r);
  ! 
        return ret;
    }
    
  
  
  

Mime
View raw message