cvs commit: apachen/src/modules/standard mod_access.c

1997-11-08 Thread dgaudet
dgaudet 97/11/08 13:33:09

  Modified:src  CHANGES
   src/modules/standard mod_access.c
  Log:
  Fix a byte ordering problem in mod_access which prevented
  the old-style syntax (i.e. a.b.c. to match a class C)
  from working properly. [Dean Gaudet]
  
  PR:   1248, 1328, 1384
  Reviewed by:  Jim Jagielski, Lars Eilebrecht
  
  Revision  ChangesPath
  1.496 +4 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.495
  retrieving revision 1.496
  diff -u -r1.495 -r1.496
  --- CHANGES   1997/11/08 19:19:13 1.495
  +++ CHANGES   1997/11/08 21:33:07 1.496
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3b3
   
  +  *) Fix a byte ordering problem in mod_access which prevented
  + the old-style syntax (i.e. a.b.c. to match a class C)
  + from working properly. [Dean Gaudet] PR#1248, 1328, 1384
  +
 *) Fix problem with USE_FLOCK_SERIALIZED_ACCEPT not working
properly. Each child needs to open the lockfile instead
of using the passed file-descriptor from the parent. PR#1056
  
  
  
  1.28  +15 -3 apachen/src/modules/standard/mod_access.c
  
  Index: mod_access.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_access.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- mod_access.c  1997/10/22 20:30:11 1.27
  +++ mod_access.c  1997/11/08 21:33:09 1.28
  @@ -204,12 +204,14 @@
/* legacy syntax for ip addrs: a.b.c. == a.b.c.0/24 for example */
int shift;
char *t;
  + int octet;
   
a-type = T_IP;
/* parse components */
s = where;
a-x.ip.net = 0;
  - shift = 0;
  + a-x.ip.mask = 0;
  + shift = 24;
while (*s) {
t = s;
if (!isdigit(*t)) {
  @@ -226,11 +228,21 @@
a-type = T_FAIL;
return invalid ip address;
}
  - a-x.ip.net |= atoi(s)  shift;
  + if (shift  0) {
  + return invalid ip address, only 4 octets allowed;
  + }
  + octet = atoi(s);
  + if (octet  0 || octet  255) {
  + a-type = T_FAIL;
  + return each octet must be between 0 and 255 inclusive;
  + }
  + a-x.ip.net |= octet  shift;
a-x.ip.mask |= 0xFFUL  shift;
  - shift += 8;
s = t;
  + shift -= 8;
}
  + a-x.ip.net = ntohl(a-x.ip.net);
  + a-x.ip.mask = ntohl(a-x.ip.mask);
   }
   else {
a-type = T_HOST;
  
  
  


cvs commit: apachen/src/modules/standard mod_access.c

1997-08-31 Thread Randy Terbush
randy   97/08/31 14:31:00

  Modified:src/modules/standard mod_access.c
  Log:
  Convert log_*() to aplog_error().
  
  Revision  ChangesPath
  1.24  +2 -1  apachen/src/modules/standard/mod_access.c
  
  Index: mod_access.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_access.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- mod_access.c  1997/08/18 13:12:07 1.23
  +++ mod_access.c  1997/08/31 21:30:59 1.24
  @@ -342,7 +342,8 @@
   if (ret == FORBIDDEN  (
   satisfies(r) != SATISFY_ANY || !some_auth_required(r)
   )) {
  - log_reason (Client denied by server configuration, r-filename, r);
  + aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  + Client denied by server configuration: %s, r-filename);
   }
   
   return ret;
  
  
  


cvs commit: apachen/src/modules/standard mod_access.c mod_actions.c mod_alias.c mod_asis.c mod_auth.c mod_auth_anon.c mod_auth_db.c mod_auth_dbm.c mod_auth_msql.c mod_autoindex.c mod_cern_meta.c mod_cgi.c mod_digest.c mod_dir.c mod_dld.c mod_env.c mod_expires.c mod_headers.c mod_imap.c mod_include.c mod_info.c mod_log_agent.c mod_log_config.c mod_log_referer.c mod_mime.c mod_mime_magic.c mod_negotiation.c mod_rewrite.c mod_setenvif.c mod_status.c mod_userdir.c mod_usertrack.c

1997-08-18 Thread Rodent of Unusual Size
coar97/08/18 06:12:30

  Modified:src/modules/example mod_example.c
   src/modules/proxy mod_proxy.c
   src/modules/standard mod_access.c mod_actions.c mod_alias.c
mod_asis.c mod_auth.c mod_auth_anon.c mod_auth_db.c
mod_auth_dbm.c mod_auth_msql.c mod_autoindex.c
mod_cern_meta.c mod_cgi.c mod_digest.c mod_dir.c
mod_dld.c mod_env.c mod_expires.c mod_headers.c
mod_imap.c mod_include.c mod_info.c mod_log_agent.c
mod_log_config.c mod_log_referer.c mod_mime.c
mod_mime_magic.c mod_negotiation.c mod_rewrite.c
mod_setenvif.c mod_status.c mod_userdir.c
mod_usertrack.c
  Log:
Add the post read-request phase placeholder to the structures
in the standard modules.
  
  PR:   1009
  
  Revision  ChangesPath
  1.14  +52 -1 apachen/src/modules/example/mod_example.c
  
  Index: mod_example.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/example/mod_example.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- mod_example.c 1997/07/28 18:23:27 1.13
  +++ mod_example.c 1997/08/18 13:12:05 1.14
  @@ -702,6 +702,33 @@
   trace_add (s, NULL, NULL, note);
   }
   
  +/* 
  + * This function is called when an heavy-weight process (such as a child) is
  + * being run down or destroyed.  As with the child-initialisation function,
  + * any information that needs to be recorded must be in static cells, since
  + * there's no configuration record.
  + *
  + * There is no return value.
  + */
  +
  +/*
  + * All our process-death routine does is add its trace to the log.
  + */
  +static void example_child_exit
  +(server_rec *s, pool *p) {
  +
  +char*note;
  +char*sname = s-server_hostname;
  +
  +/*
  + * The arbitrary text we add to our trace entry indicates for which 
server
  + * we're being called.
  + */
  +sname = (sname != NULL) ? sname : ;
  +note = pstrcat (p, example_child_exit(, sname, ), NULL);
  +trace_add (s, NULL, NULL, note);
  +}
  +
   /*
* This function gets called to create up a per-directory configuration
* record.  This will be called for the default server environment, and for
  @@ -888,6 +915,29 @@
   }
   
   /*
  + * This routine is called after the request has been read but before any 
other
  + * phases have been processed.  This allows us to make decisions based upon
  + * the input header fields.
  + *
  + * The return value is OK, DECLINED, or HTTP_mumble.  If we return OK, no
  + * further modules are called for this phase.
  + */
  +static int example_post_readreq
  +(request_rec *r) {
  +
  +example_config
  +*cfg;
  +
  +cfg = our_dconfig (r);
  +/*
  + * We don't actually *do* anything here, except note the fact that we 
were
  + * called.
  + */
  +trace_add (r-server, r, cfg, example_post_readreq());
  +return DECLINED;
  +}
  +
  +/*
* This routine gives our module an opportunity to translate the URI into an
* actual filename.  If we don't do anything special, the server's default
* rules (Alias directives and the like) will continue to be followed.
  @@ -1139,5 +1189,6 @@
   example_logger, /* [9] logger */
   example_hparser,/* [2] header parser */
   example_child_init, /* process initializer */
  -NULL /* process exit/cleanup */
  +example_child_exit,  /* process exit/cleanup */
  +example_post_readreq /* ? */
   };
  
  
  
  1.22  +2 -2  apachen/src/modules/proxy/mod_proxy.c
  
  Index: mod_proxy.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/proxy/mod_proxy.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- mod_proxy.c   1997/08/01 04:58:01 1.21
  +++ mod_proxy.c   1997/08/18 13:12:06 1.22
  @@ -756,6 +756,6 @@
  NULL,/* logger */
  NULL,/* header parser */
  NULL, /* child_init */
  -   NULL  /* child_exit */
  +   NULL, /* child_exit */
  +   NULL  /* post read-request */
   };
  -
  
  
  
  1.23  +2 -1  apachen/src/modules/standard/mod_access.c
  
  Index: mod_access.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_access.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- mod_access.c  1997/07/30 18:41:53 1.22
  +++ mod_access.c  1997/08/18