httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <br...@hyperreal.com>
Subject cvs commit: apache/src mod_access.c
Date Tue, 08 Oct 1996 20:34:11 GMT
brian       96/10/08 13:34:11

  Modified:    src       mod_access.c
  Log:
  Reviewed by:	Brian Behlendorf
  Submitted by:	Rob Hartill <robh@imdb.com>
  
  Adds "user-agents" to "deny" logic, to prevent accesses on a per-user-agent basis.
  
  Revision  Changes    Path
  1.6       +13 -1     apache/src/mod_access.c
  
  Index: mod_access.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/mod_access.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -C3 -r1.5 -r1.6
  *** mod_access.c	1996/09/24 12:11:21	1.5
  --- mod_access.c	1996/10/08 20:34:07	1.6
  ***************
  *** 50,56 ****
     *
     */
    
  ! /* $Id: mod_access.c,v 1.5 1996/09/24 12:11:21 mjc Exp $  */
    
    /*
     * Security options etc.
  --- 50,56 ----
     *
     */
    
  ! /* $Id: mod_access.c,v 1.6 1996/10/08 20:34:07 brian Exp $  */
    
    /*
     * Security options etc.
  ***************
  *** 178,183 ****
  --- 178,195 ----
        for (i = 0; i < a->nelts; ++i) {
            if (!(mmask & ap[i].limited))
    	    continue;
  +         if (ap[i].from && !strcmp(ap[i].from, "user-agents")) {
  + 	    char * this_agent = table_get(r->headers_in, "User-Agent");
  + 	    int j;
  +   
  + 	    if (!this_agent) return 0;
  +   
  + 	    for (j = i+1; j < a->nelts; ++j) {
  + 	        if (strstr(this_agent, ap[j].from)) return 1;
  + 	    }
  + 	    return 0;
  + 	}
  + 	
    	if (!strcmp (ap[i].from, "all"))
    	    return 1;
    	if (!gothost)
  
  
  

Mime
View raw message