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

1997-08-31 Thread Rodent of Unusual Size
coar97/08/31 06:30:53

  Modified:src/modules/example mod_example.c
   src/modules/standard mod_info.c
  Log:
Add the server build time to some other useful places.
  
  Revision  ChangesPath
  1.15  +6 -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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- mod_example.c 1997/08/18 13:12:05 1.14
  +++ mod_example.c 1997/08/31 13:30:51 1.15
  @@ -548,6 +548,11 @@
   rputs (  H1SAMPmod_example/SAMP Module Content-Handler Output\n, 
r);
   rputs (  /H1\n, r);
   rputs (  P\n, r);
  +rprintf (r,   Apache HTTP Server version: \%s\\n, SERVER_VERSION);
  +rputs (  BR\n, r);
  +rprintf (r,   Server built: \%s\\n, SERVER_BUILT);
  +rputs (  /P\n, r);;
  +rputs (  P\n, r);
   rputs (  The format for the callback trace is:\n, r);
   rputs (  /P\n, r);
   rputs (  DL\n, r);
  @@ -1190,5 +1195,5 @@
   example_hparser,/* [2] header parser */
   example_child_init, /* process initializer */
   example_child_exit,  /* process exit/cleanup */
  -example_post_readreq /* ? */
  +example_post_readreq /* [?] post read_request handling */
   };
  
  
  
  1.26  +2 -0  apachen/src/modules/standard/mod_info.c
  
  Index: mod_info.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_info.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- mod_info.c1997/08/18 13:12:13 1.25
  +++ mod_info.c1997/08/31 13:30:52 1.26
  @@ -350,6 +350,8 @@
if(!r-args || !strcasecmp(r-args,server)) { 
ap_snprintf(buf, sizeof(buf), a 
name=\server\strongServer Version:/strong font 
size=+1tt%s/tt/a/fontbr\n,SERVER_VERSION);
rputs(buf,r);
  + ap_snprintf(buf, sizeof(buf), strongServer 
Built:/strong font size=+1tt%s/tt/a/fontbr\n,SERVER_BUILT);
  + rputs(buf,r);
ap_snprintf(buf, sizeof(buf), strongAPI 
Version:/strong tt%d/ttbr\n,MODULE_MAGIC_NUMBER);
rputs(buf,r);
ap_snprintf(buf, sizeof(buf), strongRun 
Mode:/strong tt%s/ttbr\n,standalone?standalone:inetd);
  
  
  


cvs commit: apachen/src/main http_request.c

1997-08-31 Thread Ben Laurie
ben 97/08/31 09:28:52

  Modified:src/main http_request.c
  Log:
  Temporary(?) fix for Win32 Auth not working.
  
  Revision  ChangesPath
  1.80  +3 -0  apachen/src/main/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_request.c,v
  retrieving revision 1.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- http_request.c1997/08/25 16:02:27 1.79
  +++ http_request.c1997/08/31 16:28:51 1.80
  @@ -382,7 +382,10 @@
entry_dir = entry_core-d;
   
if (entry_core-r
  +/* FIXME: Temporarily removed, pending an explanation of function, in order 
to
  +  fix Win32 [Ben]
|| entry_dir[0] != '/'
  +*/
|| entry_core-d_components  i) break;
   
this_conf = NULL;
  
  
  


cvs commit: apachen/src/main http_main.c

1997-08-31 Thread Randy Terbush
randy   97/08/31 13:13:08

  Modified:src/main http_main.c
  Log:
  Begin conversion of log_*() to aplog_error(). Change some code style to
  Apache format while we're at it.
  
  Revision  ChangesPath
  1.213 +163 -149  apachen/src/main/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
  retrieving revision 1.212
  retrieving revision 1.213
  diff -u -r1.212 -r1.213
  --- http_main.c   1997/08/28 01:36:59 1.212
  +++ http_main.c   1997/08/31 20:13:05 1.213
  @@ -540,8 +540,8 @@
continue;
   
   if (ret  0) {
  - log_unixerr(fcntl, F_SETLKW, Error getting accept lock. Exiting!,
  - server_conf);
  + aplog_error(APLOG_MARK, APLOG_EMERG, server_conf,
  + fcntl: F_SETLKW: Error getting accept lock. Exiting!);
exit(1);
   }
   }
  @@ -550,8 +550,8 @@
   {
   if (fcntl (lock_fd, F_SETLKW, unlock_it)  0)
   {
  - log_unixerr(fcntl, F_SETLKW, Error freeing accept lock. Exiting!,
  - server_conf);
  + aplog_error(APLOG_MARK, APLOG_EMERG, server_conf,
  + fcntl: F_SETLKW: Error freeing accept lock. Exiting!);
exit(1);
   }
   }
  @@ -571,10 +571,9 @@
   
   expand_lock_fname (p);
   lock_fd = popenf(p, lock_fname, O_CREAT | O_WRONLY | O_EXCL, 0644);
  -if (lock_fd == -1)
  -{
  - perror (open);
  - fprintf (stderr, Cannot open lock file: %s\n, lock_fname);
  +if (lock_fd == -1) {
  + aplog_error(APLOG_MARK, APLOG_EMERG, server_conf,
  + Cannot open lock file: %s\n, lock_fname);
exit (1);
   }
   unlink(lock_fname);
  @@ -588,8 +587,8 @@
continue;
   
   if (ret  0) {
  - log_unixerr(flock, LOCK_EX, Error getting accept lock. Exiting!,
  - server_conf);
  + aplog_error(APLOG_MARK, APLOG_EMERG, server_conf,
  + flock: LOCK_EX: Error getting accept lock. Exiting!);
exit(1);
   }
   }
  @@ -598,8 +597,8 @@
   {
   if (flock (lock_fd, LOCK_UN)  0)
   {
  - log_unixerr(flock, LOCK_UN, Error freeing accept lock. Exiting!,
  - server_conf);
  + aplog_error(APLOG_MARK, APLOG_EMERG, server_conf,
  + flock: LOCK_UN: Error freeing accept lock. Exiting!);
exit(1);
   }
   }
  @@ -691,17 +690,17 @@
   else dirconf = current_conn-server-lookup_defaults;
   if (sig == SIGPIPE) {
   ap_snprintf(errstr, sizeof(errstr), %s lost connection to client 
%s,
  - timeout_name ? timeout_name : request,
  - get_remote_host(current_conn, dirconf, REMOTE_NAME));
  + timeout_name ? timeout_name : request,
  + get_remote_host(current_conn, dirconf, REMOTE_NAME));
   } else {
   ap_snprintf(errstr, sizeof(errstr), %s timed out for %s,
  - timeout_name ? timeout_name : request,
  - get_remote_host(current_conn, dirconf, REMOTE_NAME));
  + timeout_name ? timeout_name : request,
  + get_remote_host(current_conn, dirconf, REMOTE_NAME));
   }
   
   if (!current_conn-keptalive) 
  -   log_error(errstr, current_conn-server);
  -  
  + aplog_error(APLOG_MARK, APLOG_WARNING, current_conn-server, errstr);
  +  
   if (timeout_req) {
/* Someone has asked for this transaction to just be aborted
 * if it times out...
  @@ -930,7 +929,7 @@
   
   if (setsockopt(s, SOL_SOCKET, SO_LINGER,
  (char *)li, sizeof(struct linger))  0) {
  -log_unixerr(setsockopt, (SO_LINGER), NULL, server_conf);
  +aplog_error(APLOG_MARK, APLOG_WARNING, server_conf, setsockopt: 
(SO_LINGER));
   /* not a fatal error */
   }
   }
  @@ -1231,7 +1230,7 @@
   }
   
   ap_snprintf(errstr, sizeof(errstr), created shared memory segment #%d, 
shmid);
  -log_error(errstr, server_conf);
  +aplog_error(APLOG_MARK, APLOG_INFO, server_conf, errstr);
   
   #ifdef MOVEBREAK
   /*
  @@ -1282,8 +1281,10 @@
   if (shmctl(shmid, IPC_RMID, NULL) != 0) {
perror(shmctl);
fprintf(stderr, httpd: Could not delete segment #%d\n, shmid);
  - ap_snprintf(errstr, sizeof(errstr), could not remove shared memory 
segment #%d, shmid);
  - log_unixerr(shmctl,IPC_RMID,errstr, server_conf);
  + ap_snprintf(errstr, sizeof(errstr),
  + could not remove shared memory segment #%d, shmid);
  + aplog_error(APLOG_MARK, APLOG_WARNING, server_conf,
  + shmctl: IPC_RMID: %s, errstr);
   }
   if (scoreboard_image == BADSHMAT)/* now bailout */
exit(1);
  @@ -1628,17 +1629,23 @@
switch (tries) {
case 1:
/* perhaps it missed the SIGHUP, lets try again */
  - 

cvs commit: apachen/src/main http_config.c http_core.c http_log.c http_protocol.c http_request.c rfc1413.c util_script.c

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

  Modified:src/main http_config.c http_core.c http_log.c
http_protocol.c http_request.c rfc1413.c
util_script.c
  Log:
  Complete conversion of src/main/* to aplog_error(). On to the modules...
  
  Revision  ChangesPath
  1.78  +8 -7  apachen/src/main/http_config.c
  
  Index: http_config.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_config.c,v
  retrieving revision 1.77
  retrieving revision 1.78
  diff -u -r1.77 -r1.78
  --- http_config.c 1997/08/27 05:45:34 1.77
  +++ http_config.c 1997/08/31 21:28:49 1.78
  @@ -934,9 +934,9 @@
   while (!f  access_name[0]) {
char *w = getword_conf(r-pool, access_name);
filename = make_full_path(r-pool, d, w);
  - f=pfopen(r-pool, filename, r);
  + f = pfopen(r-pool, filename, r);
   }
  -if(f) {
  +if (f) {
   dc = create_per_dir_config (r-pool);

   parms.infile = f;
  @@ -947,18 +947,19 @@
   pfclose(r-pool, f);
   
if (errmsg) {
  - log_reason (errmsg, filename, r);
  + aplog_error(APLOG_MARK, APLOG_ALERT, r-server, %s: %s, filename, 
errmsg);
return SERVER_ERROR;
}

*result = dc;
  -} else {
  +}
  +else {
if (errno == ENOENT || errno == ENOTDIR)
dc = NULL;
else {
  - log_unixerr(pfopen, filename, 
  - unable to check htaccess file, ensure it is readable,
  - r-server);
  + aplog_error(APLOG_MARK, APLOG_CRIT, r-server,
  + %s pfopen: unable to check htaccess file, ensure it is 
readable,
  + filename);
return HTTP_FORBIDDEN;
}
   }
  
  
  
  1.116 +23 -18apachen/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_core.c,v
  retrieving revision 1.115
  retrieving revision 1.116
  diff -u -r1.115 -r1.116
  --- http_core.c   1997/08/27 05:45:35 1.115
  +++ http_core.c   1997/08/31 21:28:50 1.116
  @@ -1224,14 +1224,14 @@
   rlim_t cur = 0;
   rlim_t max = 0;
   
  -*plimit=(struct rlimit *)pcalloc(cmd-pool,sizeof **plimit);
  -limit=*plimit;
  -if ((getrlimit(type, limit)) != 0)
  - {
  +*plimit = (struct rlimit *)pcalloc(cmd-pool,sizeof **plimit);
  +limit = *plimit;
  +if ((getrlimit(type, limit)) != 0)   {
*plimit = NULL;
  - log_unixerr(getrlimit,cmd-cmd-name,failed,cmd-server);
  + aplog_error(APLOG_MARK, APLOG_ERR, cmd-server,
  + %s: getrlimit failed, cmd-cmd-name);
return;
  - }
  +}
   
   if ((str = getword_conf(cmd-pool, arg)))
if (!strcasecmp(str, max))
  @@ -1239,7 +1239,8 @@
else
cur = atol(str);
   else {
  - log_printf(cmd-server, Invalid parameters for %s, cmd-cmd-name);
  + aplog_error(APLOG_MARK, APLOG_ERR, cmd-server,
  + Invalid parameters for %s, cmd-cmd-name);
return;
   }
   
  @@ -1250,8 +1251,8 @@
   if (geteuid()) {
limit-rlim_cur = cur;
if (max)
  - log_printf(cmd-server, Must be uid 0 to raise maximum %s,
  -   cmd-cmd-name);
  + aplog_error(APLOG_MARK, APLOG_ERR, cmd-server,
  + Must be uid 0 to raise maximum %s, cmd-cmd-name);
   }
   else {
if (cur)
  @@ -1266,8 +1267,8 @@
   static const char *no_set_limit (cmd_parms *cmd, core_dir_config *conf,
 char *arg, char *arg2)
   {
  -log_printf(cmd-server, %s not supported on this platform,
  -cmd-cmd-name);
  +aplog_error(APLOG_MARK, APLOG_ERR, cmd-server,
  + %s not supported on this platform, cmd-cmd-name);
   return NULL;
   }
   #endif
  @@ -1542,7 +1543,8 @@
 
   if (r-proxyreq) return HTTP_FORBIDDEN;
   if ((r-uri[0] != '/')  strcmp(r-uri, *)) {
  - log_printf(r-server, Invalid URI in request %s, r-the_request);
  + aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  + Invalid URI in request %s, r-the_request);
return BAD_REQUEST;
   }
   
  @@ -1603,16 +1605,17 @@
   r-allowed |= (1  M_OPTIONS);
   
   if (r-method_number == M_INVALID) {
  - log_printf(r-server, Invalid method in request %s, r-the_request);
  + aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  + Invalid method in request %s, r-the_request);
return NOT_IMPLEMENTED;
   }
   if (r-method_number == M_OPTIONS) return send_http_options(r);
   if (r-method_number == M_PUT) return METHOD_NOT_ALLOWED;
   
   if (r-finfo.st_mode == 0 || (r-path_info  *r-path_info)) {
  - log_reason(File does not exist,
  - 

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_actions.c

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

  Modified:src/modules/standard mod_actions.c
  Log:
  Convert log_*() to aplog_error().
  
  Revision  ChangesPath
  1.17  +2 -1  apachen/src/modules/standard/mod_actions.c
  
  Index: mod_actions.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_actions.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- mod_actions.c 1997/08/18 13:12:08 1.16
  +++ mod_actions.c 1997/08/31 21:33:08 1.17
  @@ -181,7 +181,8 @@
action ? action : default_type(r {
   script = t;
if (r-finfo.st_mode == 0) {
  - log_reason(File does not exist, r-filename, r);
  + aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  + File does not exist: %s, r-filename);
return NOT_FOUND;
}
   }
  
  
  


cvs commit: apachen/src/main http_log.c

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

  Modified:src/main http_log.c
  Log:
  Fix a warning.
  
  Revision  ChangesPath
  1.31  +0 -1  apachen/src/main/http_log.c
  
  Index: http_log.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_log.c,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- http_log.c1997/08/31 21:28:51 1.30
  +++ http_log.c1997/08/31 22:14:07 1.31
  @@ -160,7 +160,6 @@
   
   #ifdef HAVE_SYSLOG
   else if (!strncasecmp(s-error_fname, syslog, 6)) {
  - register TRANS *fac;
if ((fname = strchr(s-error_fname, ':'))) {
fname++;
for (fac = facilities; fac-t_name; fac++) {
  
  
  


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

1997-08-31 Thread Randy Terbush
randy   97/08/31 15:23:22

  Modified:src/modules/standard mod_auth_dbm.c
  Log:
  Convert log_*() to aplog_error().
  Style changes.
  
  Revision  ChangesPath
  1.28  +34 -29apachen/src/modules/standard/mod_auth_dbm.c
  
  Index: mod_auth_dbm.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_auth_dbm.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- mod_auth_dbm.c1997/08/24 16:43:26 1.27
  +++ mod_auth_dbm.c1997/08/31 22:23:20 1.28
  @@ -151,7 +151,8 @@
   
   module dbm_auth_module;
   
  -static char *get_dbm_pw(request_rec *r, char *user, char *auth_dbmpwfile) {
  +static char *get_dbm_pw (request_rec *r, char *user, char *auth_dbmpwfile)
  +{
   DBM *f; 
   datum d, q; 
   char *pw = NULL;
  @@ -164,15 +165,16 @@
   #endif
   
   
  -if(!(f=dbm_open(auth_dbmpwfile,O_RDONLY,0664))) {
  -log_reason (could not open dbm auth file, auth_dbmpwfile, r);
  +if (!(f=dbm_open(auth_dbmpwfile,O_RDONLY,0664))) {
  +aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  + could not open dbm auth file: %s, auth_dbmpwfile);
return NULL;
   }
   
   d = dbm_fetch(f, q);
   
   if (d.dptr) {
  -pw = palloc (r-pool, d.dsize + 1);
  +pw = palloc(r-pool, d.dsize + 1);
strncpy(pw,d.dptr,d.dsize);
pw[d.dsize] = '\0'; /* Terminate the string */
   }
  @@ -209,36 +211,36 @@
   static int dbm_authenticate_basic_user (request_rec *r)
   {
   dbm_auth_config_rec *sec =
  -  (dbm_auth_config_rec *)get_module_config (r-per_dir_config,
  - dbm_auth_module);
  + (dbm_auth_config_rec *)get_module_config(r-per_dir_config,
  +  dbm_auth_module);
   conn_rec *c = r-connection;
   char *sent_pw, *real_pw, *colon_pw;
   char errstr[MAX_STRING_LEN];
   int res;
   
  -if ((res = get_basic_auth_pw (r, sent_pw)))
  +if ((res = get_basic_auth_pw(r, sent_pw)))
   return res;
   
  -if(!sec-auth_dbmpwfile)
  +if (!sec-auth_dbmpwfile)
   return DECLINED;

   if(!(real_pw = get_dbm_pw(r, c-user, sec-auth_dbmpwfile))) {
if (!(sec-auth_dbmauthoritative))
return DECLINED;
   ap_snprintf(errstr, sizeof(errstr), DBM user %s not found, 
c-user);
  - log_reason (errstr, r-filename, r);
  - note_basic_auth_failure (r);
  + aplog_error(APLOG_MARK, APLOG_ERR, r-server, %s: %s, errstr, 
r-filename);
  + note_basic_auth_failure(r);
return AUTH_REQUIRED;
   }
   /* Password is up to first : if exists */
   colon_pw = strchr(real_pw,':');
   if (colon_pw) *colon_pw='\0';   
   /* anyone know where the prototype for crypt is? */
  -if(strcmp(real_pw,(char *)crypt(sent_pw,real_pw))) {
  +if (strcmp(real_pw,(char *)crypt(sent_pw,real_pw))) {
   ap_snprintf(errstr, sizeof(errstr), 
  - user %s: password mismatch,c-user);
  - log_reason (errstr, r-uri, r);
  - note_basic_auth_failure (r);
  + user %s: password mismatch,c-user);
  + aplog_error(APLOG_MARK, APLOG_ERR, r-server, %s: %s, errstr, r-uri);
  + note_basic_auth_failure(r);
return AUTH_REQUIRED;
   }
   return OK;
  @@ -246,15 +248,16 @@
   
   /* Checking ID */
   
  -static int dbm_check_auth(request_rec *r) {
  +static int dbm_check_auth (request_rec *r)
  +{
   dbm_auth_config_rec *sec =
  -  (dbm_auth_config_rec *)get_module_config (r-per_dir_config,
  - dbm_auth_module);
  + (dbm_auth_config_rec *)get_module_config(r-per_dir_config,
  +  dbm_auth_module);
   char *user = r-connection-user;
   int m = r-method_number;
   char errstr[MAX_STRING_LEN];
   
  -array_header *reqs_arr = requires (r);
  +array_header *reqs_arr = requires(r);
   require_line *reqs = reqs_arr ? (require_line *)reqs_arr-elts : NULL;
   
   register int x;
  @@ -264,14 +267,14 @@
   if (!sec-auth_dbmgrpfile) return DECLINED;
   if (!reqs_arr) return DECLINED;
   
  -for(x=0; x  reqs_arr-nelts; x++) {
  +for (x = 0; x  reqs_arr-nelts; x++) {
 
if (! (reqs[x].method_mask  (1  m))) continue;

   t = reqs[x].requirement;
   w = getword(r-pool, t, ' ');

  -if(!strcmp(w,group)  sec-auth_dbmgrpfile) {
  +if (!strcmp(w,group)  sec-auth_dbmgrpfile) {
  const char *orig_groups,*groups;
   char *v;
   
  @@ -279,25 +282,27 @@
   if (!(sec-auth_dbmauthoritative))
   return DECLINED;
  ap_snprintf(errstr, sizeof(errstr), 
  - user %s not in DBM group file %s,
 

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

1997-08-31 Thread Randy Terbush
randy   97/08/31 15:24:50

  Modified:src/modules/standard mod_auth_db.c
  Log:
  Convert log_*() to aplog_error().
  Style changes.
  
  Revision  ChangesPath
  1.21  +30 -28apachen/src/modules/standard/mod_auth_db.c
  
  Index: mod_auth_db.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_auth_db.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- mod_auth_db.c 1997/08/23 04:00:35 1.20
  +++ mod_auth_db.c 1997/08/31 22:24:49 1.21
  @@ -134,7 +134,8 @@
   
   module db_auth_module;
   
  -static char *get_db_pw(request_rec *r, char *user, const char 
*auth_dbpwfile) {
  +static char *get_db_pw(request_rec *r, char *user, const char *auth_dbpwfile)
  +{
   DB *f; 
   DBT d, q; 
   char *pw = NULL;
  @@ -142,13 +143,14 @@
   q.data = user; 
   q.size = strlen(q.data); 
   
  -if(!(f=dbopen(auth_dbpwfile,O_RDONLY,0664,DB_HASH,NULL))) {
  -log_reason (could not open db auth file, auth_dbpwfile, r);
  +if (!(f = dbopen(auth_dbpwfile,O_RDONLY,0664,DB_HASH,NULL))) {
  +aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  + could not open db auth file: %s, auth_dbpwfile);
return NULL;
   }
   
   if (!((f-get)(f,q,d,0))) {
  -pw = palloc (r-pool, d.size + 1);
  +pw = palloc(r-pool, d.size + 1);
strncpy(pw,d.data,d.size);
pw[d.size] = '\0'; /* Terminate the string */
   }
  @@ -185,36 +187,35 @@
   static int db_authenticate_basic_user (request_rec *r)
   {
   db_auth_config_rec *sec =
  -  (db_auth_config_rec *)get_module_config (r-per_dir_config,
  + (db_auth_config_rec *)get_module_config(r-per_dir_config,
db_auth_module);
   conn_rec *c = r-connection;
   char *sent_pw, *real_pw, *colon_pw;
   char errstr[MAX_STRING_LEN];
   int res;
   
  -if ((res = get_basic_auth_pw (r, sent_pw)))
  +if ((res = get_basic_auth_pw(r, sent_pw)))
   return res;
   
  -if(!sec-auth_dbpwfile)
  +if (!sec-auth_dbpwfile)
   return DECLINED;

  -if(!(real_pw = get_db_pw(r, c-user, sec-auth_dbpwfile))) {
  +if (!(real_pw = get_db_pw(r, c-user, sec-auth_dbpwfile))) {
if (!(sec - auth_dbauthoritative))
return DECLINED; 
   ap_snprintf(errstr, sizeof(errstr), DB user %s not found, c-user);
  - log_reason (errstr, r-filename, r);
  - note_basic_auth_failure (r);
  + aplog_error(APLOG_MARK, APLOG_ERR, r-server, %s: %s, errstr, 
r-filename);
  + note_basic_auth_failure(r);
return AUTH_REQUIRED;
   }
   /* Password is up to first : if exists */
   colon_pw = strchr(real_pw,':');
   if (colon_pw) *colon_pw='\0';   
   /* anyone know where the prototype for crypt is? */
  -if(strcmp(real_pw,(char *)crypt(sent_pw,real_pw))) {
  -ap_snprintf(errstr, sizeof(errstr), 
  - user %s: password mismatch,c-user);
  - log_reason (errstr, r-uri, r);
  - note_basic_auth_failure (r);
  +if (strcmp(real_pw,(char *)crypt(sent_pw,real_pw))) {
  +ap_snprintf(errstr, sizeof(errstr), user %s: password 
mismatch,c-user);
  + aplog_error(APLOG_MARK, APLOG_ERR, r-server, %s: %s, errstr, r-uri);
  + note_basic_auth_failure(r);
return AUTH_REQUIRED;
   }
   return OK;
  @@ -222,9 +223,10 @@
   
   /* Checking ID */
   
  -static int db_check_auth(request_rec *r) {
  +static int db_check_auth(request_rec *r)
  +{
   db_auth_config_rec *sec =
  -  (db_auth_config_rec *)get_module_config (r-per_dir_config,
  + (db_auth_config_rec *)get_module_config(r-per_dir_config,
db_auth_module);
   char *user = r-connection-user;
   int m = r-method_number;
  @@ -240,14 +242,14 @@
   if (!sec-auth_dbgrpfile) return DECLINED;
   if (!reqs_arr) return DECLINED;
   
  -for(x=0; x  reqs_arr-nelts; x++) {
  +for (x = 0; x  reqs_arr-nelts; x++) {
 
if (! (reqs[x].method_mask  (1  m))) continue;

   t = reqs[x].requirement;
   w = getword(r-pool, t, ' ');

  -if(!strcmp(w,group)  sec-auth_dbgrpfile) {
  +if (!strcmp(w,group)  sec-auth_dbgrpfile) {
   const char *orig_groups,*groups;
  char *v;
   
  @@ -255,25 +257,25 @@
   if (!(sec-auth_dbauthoritative))
 return DECLINED;
  ap_snprintf(errstr, sizeof(errstr), 
  - user %s not in DB group file %s,
  - user, sec-auth_dbgrpfile);
  -log_reason (errstr, r-filename, r);
  -note_basic_auth_failure (r);
  +user %s not in DB group file %s,
  +user, sec-auth_dbgrpfile);
  +   

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

1997-08-31 Thread Randy Terbush
randy   97/08/31 15:47:51

  Modified:src/modules/standard mod_autoindex.c
  Log:
  Conver log_*() to aplog_error().
  Style changes. One change to correct problems Emacs was having with formating.
  
  Revision  ChangesPath
  1.47  +14 -11apachen/src/modules/standard/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_autoindex.c,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- mod_autoindex.c   1997/08/23 02:55:31 1.46
  +++ mod_autoindex.c   1997/08/31 22:47:49 1.47
  @@ -961,7 +961,8 @@
   char direction;
   
   if (!(d = popendir(r-pool, name))) {
  -log_reason (Can't open directory for index, r-filename, r);
  +aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  + Can't open directory for index: %s, r-filename);
   return HTTP_FORBIDDEN;
   }
   
  @@ -1037,10 +1038,10 @@
   p = p-next;
   }
   
  -qsort((void *)ar, num_ent, sizeof(struct ent *),
   #ifdef ULTRIX_BRAIN_DEATH
  -  (int (*))dsortf);
  +qsort((void *)ar, num_ent, sizeof(struct ent *), (int (*))dsortf);
   #else
  +qsort((void *)ar, num_ent, sizeof(struct ent *),
 (int (*)(const void *, const void *))dsortf);
   #endif
   }
  @@ -1048,13 +1049,13 @@
   direction);
   pclosedir(r-pool, d);
   
  -if (autoindex_opts  FANCY_INDEXING)
  +if (autoindex_opts  FANCY_INDEXING) {
   if ((tmp = find_readme(autoindex_conf, r)))
   insert_readme(name, tmp, , HRULE, END_MATTER, r);
  -else {
  -rputs(/UL, r);
  + else {
  + rputs(/UL, r);
  + }
   }
  -
   rputs (/BODY/HTML\n, r);
   
   kill_timeout(r);
  @@ -1066,8 +1067,8 @@
   static int handle_autoindex (request_rec *r)
   {
   autoindex_config_rec *d =
  -  (autoindex_config_rec *)get_module_config (r-per_dir_config,
  -  autoindex_module);
  + (autoindex_config_rec *)get_module_config(r-per_dir_config,
  +   autoindex_module);
   int allow_opts = allow_options (r);
   
   if (r-method_number != M_GET) return NOT_IMPLEMENTED;
  @@ -1084,8 +1085,10 @@
   r-filename = pstrcat (r-pool, r-filename, /, NULL);
   }
   return index_directory (r, d);
  -} else {
  -log_reason (Directory index forbidden by rule, r-filename, r);
  +}
  + else {
  +aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  + Directory index forbidden by rule: %s, r-filename);
   return HTTP_FORBIDDEN;
   }
   }
  
  
  


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

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

  Modified:src/modules/standard mod_cern_meta.c
  Log:
  Convert log_*() to aplog_error().
  Style changes.
  
  Revision  ChangesPath
  1.19  +20 -16apachen/src/modules/standard/mod_cern_meta.c
  
  Index: mod_cern_meta.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_cern_meta.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- mod_cern_meta.c   1997/08/23 02:19:01 1.18
  +++ mod_cern_meta.c   1997/08/31 22:53:12 1.19
  @@ -236,41 +236,42 @@
else w[p-1] = '\0';
}
   
  -if(w[0] == '\0') {
  +if (w[0] == '\0') {
return OK;
}
  
/* if we see a bogus header don't ignore it. Shout and scream */

  -if(!(l = strchr(w,':'))) {
  - log_reason (malformed header in meta file, r-filename, r);
  +if (!(l = strchr(w,':'))) {
  + aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  + malformed header in meta file: %s, r-filename);
return SERVER_ERROR;
   }
   
   *l++ = '\0';
while (*l  isspace (*l)) ++l;

  -if(!strcasecmp(w,Content-type)) {
  +if (!strcasecmp(w,Content-type)) {
   
/* Nuke trailing whitespace */

char *endp = l + strlen(l) - 1;
while (endp  l  isspace(*endp)) *endp-- = '\0';

  - r-content_type = pstrdup (r-pool, l);
  + r-content_type = pstrdup(r-pool, l);
}
  -else if(!strcasecmp(w,Status)) {
  +else if (!strcasecmp(w,Status)) {
   sscanf(l, %d, r-status);
   r-status_line = pstrdup(r-pool, l);
   }
   else {
  - table_set (r-headers_out, w, l);
  + table_set(r-headers_out, w, l);
   }
   }
   return OK;
   }
   
  -int add_cern_meta_data(request_rec *r)
  +int add_cern_meta_data (request_rec *r)
   {
   char *metafilename;
   char *last_slash;
  @@ -281,7 +282,7 @@
   int rv;
   request_rec *rr;
   
  -dconf = get_module_config (r-per_dir_config, cern_meta_module); 
  +dconf = get_module_config(r-per_dir_config, cern_meta_module); 
   
   if (!dconf-metafiles) {
   return DECLINED;
  @@ -308,9 +309,11 @@
real_file = last_slash;
real_file++;
*last_slash = '\0';
  -} else {
  +}
  +else {
/* no last slash, buh?! */
  -log_reason(internal error in mod_cern_meta, r-filename, r);
  +aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  + internal error in mod_cern_meta, r-filename);
/* should really barf, but hey, let's be friends... */
return DECLINED;
   };
  @@ -326,19 +329,20 @@
* A better solution might be a safe open feature of pfopen to avoid
* pipes, symlinks, and crap like that.
*/
  -rr = sub_req_lookup_file (metafilename, r);
  +rr = sub_req_lookup_file(metafilename, r);
   if (rr-status != HTTP_OK) {
  - destroy_sub_req (rr);
  + destroy_sub_req(rr);
return DECLINED;
   }
  -destroy_sub_req (rr);
  +destroy_sub_req(rr);
   
  -f = pfopen (r-pool, metafilename, r);
  +f = pfopen(r-pool, metafilename, r);
   if (f == NULL) {
if (errno == ENOENT) {
return DECLINED;
}
  -log_reason(meta file permissions deny server access, metafilename, 
r);
  +aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  + meta file permissions deny server access: %s, 
metafilename);
   return FORBIDDEN;
   };
   
  
  
  


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

1997-08-31 Thread Randy Terbush
randy   97/08/31 15:59:09

  Modified:src/modules/standard mod_cgi.c
  Log:
  Convert log_*() to aplog_error().
  
  Revision  ChangesPath
  1.55  +12 -11apachen/src/modules/standard/mod_cgi.c
  
  Index: mod_cgi.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_cgi.c,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- mod_cgi.c 1997/08/18 13:12:11 1.54
  +++ mod_cgi.c 1997/08/31 22:59:08 1.55
  @@ -155,12 +155,12 @@
   { NULL}
   };
   
  -static int log_scripterror(request_rec *r, cgi_server_conf *conf, int ret,
  - char *error)
  +static int log_scripterror (request_rec *r, cgi_server_conf *conf, int ret,
  + char *error)
   {
   FILE *f;
   
  -log_reason(error, r-filename, r);
  +aplog_error(APLOG_MARK, APLOG_ERR, r-server, error, r-filename);
   
   if (!conf-logname ||
((stat(server_root_relative(r-pool, conf-logname), r-finfo) == 0)
  @@ -182,8 +182,8 @@
   return ret;
   }
   
  -static int log_script(request_rec *r, cgi_server_conf *conf, int ret,
  - char *dbuf, char *sbuf, BUFF *script_in, BUFF *script_err)
  +static int log_script (request_rec *r, cgi_server_conf *conf, int ret,
  +char *dbuf, char *sbuf, BUFF *script_in, BUFF 
*script_err)
   {
   table *hdrs_arr = r-headers_in;
   table_entry *hdrs = (table_entry *)hdrs_arr-elts;
  @@ -323,7 +323,7 @@
*
* Oh, well.  Muddle through as best we can...
*
  - * (NB we can't use log_error, or anything like that, because we
  + * (NB we can't use aplog_error, or anything like that, because we
* just closed the file descriptor which r-server-error_log
* was tied to in cleanup_for_exec().  It's only available on stderr
* now, so that's what we use).
  @@ -412,11 +412,12 @@
* SSI request -djg
*/
   if (!(child_pid =
  -   spawn_child_err_buff (r-main ? r-main-pool : r-pool, cgi_child,
  - (void *)cld,
  - kill_after_timeout,
  - script_out, script_in, script_err))) {
  -log_reason (couldn't spawn child process, r-filename, r);
  +   spawn_child_err_buff(r-main ? r-main-pool : r-pool, cgi_child,
  +(void *)cld,
  +kill_after_timeout,
  +script_out, script_in, script_err))) {
  +aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  + couldn't spawn child process: %s, r-filename);
   return SERVER_ERROR;
   }
   
  
  
  


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

1997-08-31 Thread Randy Terbush
randy   97/08/31 16:11:28

  Modified:src/modules/standard mod_expires.c
  Log:
  Convert log_*() to aplog_error().
  
  Revision  ChangesPath
  1.17  +4 -2  apachen/src/modules/standard/mod_expires.c
  
  Index: mod_expires.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_expires.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- mod_expires.c 1997/08/18 13:12:12 1.16
  +++ mod_expires.c 1997/08/31 23:11:27 1.17
  @@ -402,7 +402,8 @@
   
   conf = (expires_dir_config *)get_module_config(r-per_dir_config, 
expires_module);
   if ( conf == NULL ) {
  -log_reason (internal error in expires_module; add_expires(), conf 
== NULL, r-filename, r);
  +aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  + internal error: %s, r-filename);
return SERVER_ERROR;
   };
   
  @@ -451,7 +452,8 @@
/* expecting the add_* routines to be case-hardened this 
 * is just a reminder that module is beta
 */
  -log_reason (internal error in expires_module; bad expires 
code, r-filename, r);
  +aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  + internal error: bad expires code: %s, r-filename);
   return SERVER_ERROR;
   };
   
  
  
  


cvs commit: apachen/src/modules/example mod_example.c

1997-08-31 Thread Rodent of Unusual Size
coar97/08/31 18:25:22

  Modified:src/modules/example mod_example.c
  Log:
Apply many of the style-guide formats.
  
  Revision  ChangesPath
  1.16  +234 -307  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.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- mod_example.c 1997/08/31 13:30:51 1.15
  +++ mod_example.c 1997/09/01 01:25:20 1.16
  @@ -91,15 +91,15 @@
* inheritance, and modifying it will change the rules for other locations.
*/
   typedef struct example_config {
  -int cmode;  /* Environment to which record applies (directory,  
*/
  +int cmode;   /* Environment to which record applies 
(directory,  */
   /* server, or combination). 
*/
   #define CONFIG_MODE_SERVER 1
   #define CONFIG_MODE_DIRECTORY 2
   #define CONFIG_MODE_COMBO 3  /* Shouldn't ever happen.  
*/
  -int local;  /* Boolean: was Example directive declared here?  
*/
  -int congenital; /* Boolean: did we inherit an Example?
*/
  -char*trace; /* Pointer to trace string. 
*/
  -char*loc;   /* Location to which this record applies.   
*/
  +int local;   /* Boolean: was Example directive declared 
here?  */
  +int congenital;  /* Boolean: did we inherit an Example?*/
  +char *trace; /* Pointer to trace string. */
  +char *loc;   /* Location to which this record applies.   
*/
   } example_config;
   
   /*
  @@ -142,40 +142,39 @@
   /*
* Command handler for a NO_ARGS directive.
*
  - * static const char *handle_NO_ARGS
  - *  (cmd_parms *cmd, void *mconfig);
  + * static const char *handle_NO_ARGS(cmd_parms *cmd, void *mconfig);
*/

   /*
* Command handler for a RAW_ARGS directive.  The args argument is the text
* of the commandline following the directive itself.
*
  - * static const char *handle_RAW_ARGS
  - *  (cmd_parms *cmd, void *mconfig, const char *args);
  + * static const char *handle_RAW_ARGS(cmd_parms *cmd, void *mconfig,
  + * const char *args);
*/
   
   /*
* Command handler for a TAKE1 directive.  The single parameter is passed in
* word1.
*
  - * static const char *handle_TAKE1
  - *  (cmd_parms *cmd, void *mconfig, char *word1);
  + * static const char *handle_TAKE1(cmd_parms *cmd, void *mconfig,
  + *  char *word1);
*/
   
   /*
* Command handler for a TAKE2 directive.  TAKE2 commands must always have
* exactly two arguments.
*
  - * static const char *handle_TAKE2
  - *  (cmd_parms *cmd, void *mconfig, char *word1, char *word2);
  + * static const char *handle_TAKE2(cmd_parms *cmd, void *mconfig,
  + *  char *word1, char *word2);
*/
   
   /*
* Command handler for a TAKE3 directive.  Like TAKE2, these must have 
exactly
* three arguments, or the parser complains and doesn't bother calling us.
*
  - * static const char *handle_TAKE3
  - *  (cmd_parms *cmd, void *mconfig, char *word1, char *word2, char 
*word3);
  + * static const char *handle_TAKE3(cmd_parms *cmd, void *mconfig,
  + *  char *word1, char *word2, char *word3);
*/
   
   /*
  @@ -183,8 +182,8 @@
* arguments.
* - word2 is a NULL pointer if no second argument was specified.
*
  - * static const char *handle_TAKE12
  - *  (cmd_parms *cmd, void *mconfig, char *word1, char *word2);
  + * static const char *handle_TAKE12(cmd_parms *cmd, void *mconfig,
  + *   char *word1, char *word2);
*/
   
   /*
  @@ -193,8 +192,8 @@
* - word2 is a NULL pointer if no second argument was specified.
* - word3 is a NULL pointer if no third argument was specified.
*
  - * static const char *handle_TAKE123
  - *  (cmd_parms *cmd, void *mconfig, char *word1, char *word2, char 
*word3);
  + * static const char *handle_TAKE123(cmd_parms *cmd, void *mconfig,
  + *char *word1, char *word2, char *word3);
*/
   
   /*
  @@ -202,8 +201,8 @@
* permitted - no two-parameters-only syntax is allowed.
* - word2 and word3 are NULL pointers if only one argument was specified.
*
  - * static const char *handle_TAKE13
  - *  (cmd_parms *cmd, void *mconfig, char *word1, char *word2, char 
*word3);
  + * static const char *handle_TAKE13(cmd_parms *cmd, void *mconfig,
  + *   char *word1, char *word2, char *word3);
*/
   
   /*
  @@ -211,8 +210,8 @@
* arguments must be specified.
* - word3 is a NULL pointer if no third 

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

1997-08-31 Thread Randy Terbush
randy   97/08/31 18:36:47

  Modified:src/modules/standard mod_info.c
  Log:
  Convert log_*() to aplog_error().
  
  Revision  ChangesPath
  1.27  +1 -1  apachen/src/modules/standard/mod_info.c
  
  Index: mod_info.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_info.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- mod_info.c1997/08/31 13:30:52 1.26
  +++ mod_info.c1997/09/01 01:36:45 1.27
  @@ -163,7 +163,7 @@
filename,
NULL
);
  - log_error (msg, r-server);
  + aplog_error(APLOG_MARK, APLOG_ERR, r-server, msg);
return NULL;
}
while(!cfg_getline(s,MAX_STRING_LEN,fp)) {
  
  
  


cvs commit: apachen/src/modules/example mod_example.c

1997-08-31 Thread Rodent of Unusual Size
coar97/08/31 18:39:19

  Modified:src/modules/example mod_example.c
  Log:
Rename the different phase handler routines to example_handler
using the names of the slots from the module structure (e.g.,
example_xlate - example_translate_handler).  Also some TAB
cleanup.
  
  Revision  ChangesPath
  1.17  +65 -65apachen/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.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- mod_example.c 1997/09/01 01:25:20 1.16
  +++ mod_example.c 1997/09/01 01:39:17 1.17
  @@ -91,15 +91,15 @@
* inheritance, and modifying it will change the rules for other locations.
*/
   typedef struct example_config {
  -int cmode;   /* Environment to which record applies 
(directory,  */
  +int cmode;  /* Environment to which record applies (directory,  
*/
   /* server, or combination). 
*/
   #define CONFIG_MODE_SERVER 1
   #define CONFIG_MODE_DIRECTORY 2
   #define CONFIG_MODE_COMBO 3  /* Shouldn't ever happen.  
*/
  -int local;   /* Boolean: was Example directive declared 
here?  */
  -int congenital;  /* Boolean: did we inherit an Example?*/
  -char *trace; /* Pointer to trace string. */
  -char *loc;   /* Location to which this record applies.   
*/
  +int local;  /* Boolean: was Example directive declared here?  
*/
  +int congenital; /* Boolean: did we inherit an Example?
*/
  +char *trace;/* Pointer to trace string. 
*/
  +char *loc;  /* Location to which this record applies.   
*/
   } example_config;
   
   /*
  @@ -150,7 +150,7 @@
* of the commandline following the directive itself.
*
* static const char *handle_RAW_ARGS(cmd_parms *cmd, void *mconfig,
  - * const char *args);
  + *const char *args);
*/
   
   /*
  @@ -158,7 +158,7 @@
* word1.
*
* static const char *handle_TAKE1(cmd_parms *cmd, void *mconfig,
  - *  char *word1);
  + * char *word1);
*/
   
   /*
  @@ -166,7 +166,7 @@
* exactly two arguments.
*
* static const char *handle_TAKE2(cmd_parms *cmd, void *mconfig,
  - *  char *word1, char *word2);
  + * char *word1, char *word2);
*/
   
   /*
  @@ -174,7 +174,7 @@
* three arguments, or the parser complains and doesn't bother calling us.
*
* static const char *handle_TAKE3(cmd_parms *cmd, void *mconfig,
  - *  char *word1, char *word2, char *word3);
  + * char *word1, char *word2, char *word3);
*/
   
   /*
  @@ -183,7 +183,7 @@
* - word2 is a NULL pointer if no second argument was specified.
*
* static const char *handle_TAKE12(cmd_parms *cmd, void *mconfig,
  - *   char *word1, char *word2);
  + *  char *word1, char *word2);
*/
   
   /*
  @@ -193,7 +193,7 @@
* - word3 is a NULL pointer if no third argument was specified.
*
* static const char *handle_TAKE123(cmd_parms *cmd, void *mconfig,
  - *char *word1, char *word2, char *word3);
  + *   char *word1, char *word2, char *word3);
*/
   
   /*
  @@ -202,7 +202,7 @@
* - word2 and word3 are NULL pointers if only one argument was specified.
*
* static const char *handle_TAKE13(cmd_parms *cmd, void *mconfig,
  - *   char *word1, char *word2, char *word3);
  + *  char *word1, char *word2, char *word3);
*/
   
   /*
  @@ -211,7 +211,7 @@
* - word3 is a NULL pointer if no third argument was specified.
*
* static const char *handle_TAKE23(cmd_parms *cmd, void *mconfig,
  - *   char *word1, char *word2, char *word3);
  + *  char *word1, char *word2, char *word3);
*/
   
   /*
  @@ -220,7 +220,7 @@
* - word1 points to each argument in turn.
*
* static const char *handle_ITERATE(cmd_parms *cmd, void *mconfig,
  - *char *word1);
  + *   char *word1);
*/
   
   /*
  @@ -232,7 +232,7 @@
* - word2 points to each of the second and subsequent arguments in turn.
*
* static const char *handle_ITERATE2(cmd_parms *cmd, void *mconfig,
  - * char *word1, char *word2);
  + * 

cvs commit: apachen/src/main http_core.c

1997-08-31 Thread Rodent of Unusual Size
coar97/08/31 18:47:02

  Modified:src/main http_core.c
  Log:
Add the post_read_request slot (missed when the other modules
were done).
  
  Revision  ChangesPath
  1.117 +2 -1  apachen/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_core.c,v
  retrieving revision 1.116
  retrieving revision 1.117
  diff -u -r1.116 -r1.117
  --- http_core.c   1997/08/31 21:28:50 1.116
  +++ http_core.c   1997/09/01 01:47:00 1.117
  @@ -1736,5 +1736,6 @@
  NULL, /* logger */
  NULL, /* header parser */
  NULL, /* child_init */
  -   NULL  /* child_exit */
  +   NULL, /* child_exit */
  +   NULL  /* post_read_request */
   };
  
  
  


cvs commit: apachen/src/main http_protocol.c

1997-08-31 Thread Rodent of Unusual Size
coar97/08/31 19:46:49

  Modified:src/main http_protocol.c
  Log:
Replace use of FORBIDDEN with HTTP_FORBIDDEN.
  
  Revision  ChangesPath
  1.157 +1 -1  apachen/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_protocol.c,v
  retrieving revision 1.156
  retrieving revision 1.157
  diff -u -r1.156 -r1.157
  --- http_protocol.c   1997/08/31 21:28:52 1.156
  +++ http_protocol.c   1997/09/01 02:46:47 1.157
  @@ -2056,7 +2056,7 @@
bputs(Your browser sent a request that\n, fd);
bputs(this server could not understand.P\n, fd);
break;
  - case FORBIDDEN:
  + case HTTP_FORBIDDEN:
bvputs(fd, You don't have permission to access ,
 escape_html(r-pool, r-uri), \non this server.P\n,
   NULL);
  
  
  


cvs commit: apachen/src/modules/standard mod_status.c mod_unique_id.c

1997-08-31 Thread Randy Terbush
randy   97/08/31 19:49:48

  Modified:src/modules/standard mod_status.c mod_unique_id.c
  Log:
  Complete src/modules/standard module conversion of log_*() to aplog_error.
  
  Revision  ChangesPath
  1.61  +2 -1  apachen/src/modules/standard/mod_status.c
  
  Index: mod_status.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_status.c,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- mod_status.c  1997/08/18 13:12:18 1.60
  +++ mod_status.c  1997/09/01 02:49:44 1.61
  @@ -240,7 +240,8 @@
   status[SERVER_GRACEFUL]='G';
   
   if (!exists_scoreboard_image()) {
  - log_printf(r-server, Server status unavailable in inetd mode);
  + aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  +  Server status unavailable in inetd mode);
return HTTP_NOT_IMPLEMENTED;
}
   r-allowed = (1  M_GET) | (1  M_TRACE);
  
  
  
  1.2   +13 -7 apachen/src/modules/standard/mod_unique_id.c
  
  Index: mod_unique_id.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_unique_id.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mod_unique_id.c   1997/08/18 07:17:30 1.1
  +++ mod_unique_id.c   1997/09/01 02:49:45 1.2
  @@ -144,7 +144,10 @@
*/
   if (XtOffsetOf (unique_id_rec, counter) + sizeof (cur_unique_id.counter)
!= 14) {
  - log_error (mod_unique_id: sorry the size assumptions are wrong in 
mod_unique_id.c, please remove it from your server or fix the code!, s);
  + aplog_error(APLOG_MARK, APLOG_ALERT, s,
  + mod_unique_id: sorry the size assumptions are wrong 
  + in mod_unique_id.c, please remove it from your server 
  + or fix the code!);
exit (1);
   }
   
  @@ -153,20 +156,22 @@
* to be unique as the physical address of the machine
*/
   if (gethostname (str, sizeof (str) - 1) != 0) {
  - log_unixerr (gethostname, mod_unique_id,
  - mod_unique_id requires the hostname of the server, s);
  + aplog_error(APLOG_MARK, APLOG_ALERT, s,
  + gethostname: mod_unique_id requires the hostname of the 
server);
exit (1);
   }
   
   if ((hent = gethostbyname (str)) == NULL) {
  - log_printf (s, mod_unique_id: unable to gethostbyname(\%s\), str);
  + aplog_error(APLOG_MARK, APLOG_ALERT, s,
  + mod_unique_id: unable to gethostbyname(\%s\), str);
exit (1);
   }
   
   global_in_addr = ((struct in_addr *)hent-h_addr_list[0])-s_addr;
   
  -log_printf (s, mod_unique_id: using ip addr %s,
  - inet_ntoa (*(struct in_addr *)hent-h_addr_list[0]));
  +aplog_error(APLOG_MARK, APLOG_INFO, s,
  + mod_unique_id: using ip addr %s,
  + inet_ntoa (*(struct in_addr *)hent-h_addr_list[0]));
   
   /* If the server is pummelled with restart requests we could possibly
* end up in a situation where we're starting again during the same
  @@ -219,7 +224,8 @@
* test this during global_init ... but oh well.
*/
   if (cur_unique_id.pid != pid) {
  - log_error (mod_unique_id: oh no! pids are greater than 16-bits!  I'm 
broken!, s);
  + aplog_error(APLOG_MARK, APLOG_DEBUG, s,
  + oh no! pids are greater than 16-bits!  I'm broken!);
   }
   
   cur_unique_id.in_addr = global_in_addr;
  
  
  


cvs commit: apachen/src/modules/proxy mod_proxy.c proxy_connect.c proxy_http.c proxy_util.c

1997-08-31 Thread Randy Terbush
randy   97/08/31 20:07:30

  Modified:src/modules/proxy mod_proxy.c proxy_connect.c proxy_http.c
proxy_util.c
  Log:
  Convert log_*() to aplog_error().
  Something needs to be done with proxy_log_uerror() in here. I see no obvious
  reason not to replace it with aplog_error() but would like some feedback 
first.
  
  Revision  ChangesPath
  1.23  +9 -9  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.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- mod_proxy.c   1997/08/18 13:12:06 1.22
  +++ mod_proxy.c   1997/09/01 03:07:26 1.23
  @@ -221,9 +221,8 @@
   /* Split request into user, password, host, port */
   err = proxy_canon_netloc(r-pool, url_copy, user, password, host, 
port);
   
  -if (err != NULL)
  -{
  - log_error(err, r-server);
  +if (err != NULL) {
  + aplog_error(APLOG_MARK, APLOG_ERR, r-server, err);
return DECLINED;
   }
   
  @@ -251,8 +250,10 @@
   NULL);
   
table_set(r-headers_out, Location, nuri);
  - log_error(pstrcat(r-pool, Domain missing: , r-uri,  sent to , 
nuri,
  -   ref ?  from  : NULL, ref, NULL), r-server);
  + aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  + pstrcat(r-pool, Domain missing: , r-uri,  sent to , 
nuri,
  + ref ?  from  : NULL, ref, NULL));
  +
return REDIRECT;
   }
   }
  @@ -307,15 +308,14 @@
for (direct_connect=ii=0; ii  conf-dirconn-nelts  !direct_connect; 
ii++)
{
direct_connect = list[ii].matcher (list[ii], r);
  - /*log_error(URI and NoProxy:, r-server);*/
  - /*log_error(r-uri, r-server);*/
  - /*log_error(list[ii].name, r-server);*/
  + aplog_error(APLOG_MARK, APLOG_DEBUG, r-server,
  + URI and NoProxy: %s: %s, r-uri, list[ii].name);
}
   #if DEBUGGING
{
char msg[256];
sprintf (msg, (direct_connect)?NoProxy for %s:UseProxy for %s, 
r-uri);
  - log_error(msg, r-server);
  + aplog_error(APLOG_MARK, APLOG_DEBUG, r-server, msg);
}
   #endif
   }
  
  
  
  1.14  +2 -1  apachen/src/modules/proxy/proxy_connect.c
  
  Index: proxy_connect.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/proxy/proxy_connect.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- proxy_connect.c   1997/08/17 13:56:27 1.13
  +++ proxy_connect.c   1997/09/01 03:07:27 1.14
  @@ -150,7 +150,8 @@
   sock = psocket(r-pool, PF_INET, SOCK_STREAM, IPPROTO_TCP);  
   if (sock == -1)
   { 
  -log_error(proxy: error creating socket, r-server);
  +aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  + proxy: error creating socket);
   return SERVER_ERROR;
   } 

  
  
  
  1.30  +2 -1  apachen/src/modules/proxy/proxy_http.c
  
  Index: proxy_http.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/proxy/proxy_http.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- proxy_http.c  1997/08/23 22:59:11 1.29
  +++ proxy_http.c  1997/09/01 03:07:27 1.30
  @@ -223,7 +223,8 @@
   sock = psocket(pool, PF_INET, SOCK_STREAM, IPPROTO_TCP);
   if (sock == -1)
   {
  - log_error(proxy: error creating socket, r-server);
  + aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  + proxy: error creating socket);
return SERVER_ERROR;
   }
   
  
  
  
  1.25  +1 -1  apachen/src/modules/proxy/proxy_util.c
  
  Index: proxy_util.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/proxy/proxy_util.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- proxy_util.c  1997/08/23 22:59:11 1.24
  +++ proxy_util.c  1997/09/01 03:07:28 1.25
  @@ -831,7 +831,7 @@
   err = proxy_canon_netloc(r-pool, url, user, password, host, port);
   
   if (err != NULL)
  - log_error(err, r-server);
  + aplog_error(APLOG_MARK, APLOG_ERR, r-server, err);
   
   r-hostname = host;
   
  
  
  


cvs commit: apachen/src/os/win32 mod_isapi.c

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

  Modified:src/os/win32 mod_isapi.c
  Log:
  More log_*() conversions to aplog_error().
  
  Revision  ChangesPath
  1.3   +20 -10apachen/src/os/win32/mod_isapi.c
  
  Index: mod_isapi.c
  ===
  RCS file: /export/home/cvs/apachen/src/os/win32/mod_isapi.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mod_isapi.c   1997/08/13 08:37:33 1.2
  +++ mod_isapi.c   1997/09/01 04:00:28 1.3
  @@ -130,20 +130,23 @@
   
   if (!(isapi_handle = LoadLibraryEx(r-filename, NULL,
   LOAD_WITH_ALTERED_SEARCH_PATH))) {
  - log_reason(Could not load DLL, r-filename, r);
  + aplog_error(APLOG_MARK, APLOG_ALERT, r-server,
  + Could not load DLL: %s, r-filename);
return SERVER_ERROR;
   }
   
   if (!(isapi_version =
  (void *)(GetProcAddress(isapi_handle, GetExtensionVersion {
  - log_reason(DLL could not load GetExtensionVersion(), r-filename, r);
  + aplog_error(APLOG_MARK, APLOG_ALERT, r-server,
  + DLL could not load GetExtensionVersion(): %s, 
r-filename);
FreeLibrary(isapi_handle);
return SERVER_ERROR;
   }
   
   if (!(isapi_entry =
  (void *)(GetProcAddress(isapi_handle, HttpExtensionProc {
  - log_reason(DLL could not load HttpExtensionProc(), r-filename, r);
  + aplog_error(APLOG_MARK, APLOG_ALERT, r-server,
  + DLL could not load HttpExtensionProc(): %s, r-filename);
FreeLibrary(isapi_handle);
return SERVER_ERROR;
   }
  @@ -153,7 +156,8 @@
   /* Run GetExtensionVersion() */
   
   if ((*isapi_version)(pVer) != TRUE) {
  - log_reason(ISAPI GetExtensionVersion() failed, r-filename, r);
  + aplog_error(APLOG_MARK, APLOG_ALERT, r-server,
  + ISAPI GetExtensionVersion() failed: %s, r-filename);
FreeLibrary(isapi_handle);
return SERVER_ERROR;
   }
  @@ -243,7 +247,8 @@
   
   /* Check for a log message - and log it */
   if (ecb-lpszLogData  strcmp(ecb-lpszLogData, ))
  - log_reason(ecb-lpszLogData, r-filename, r);
  + aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  + %s: %s, ecb-lpszLogData, r-filename);
   
   /* All done with the DLL... get rid of it */
   if (isapi_term) (*isapi_term)(HSE_TERM_MUST_UNLOAD);
  @@ -261,7 +266,8 @@
   
return OK;
   case HSE_STATUS_PENDING: /* We don't support this */
  - log_reason(ISAPI asynchronous I/O not supported, r-filename, r);
  + aplog_error(APLOG_MARK, APLOG_WARNING, r-server,
  + ISAPI asynchronous I/O not supported: %s, r-filename);
   case HSE_STATUS_ERROR:
   default:
return SERVER_ERROR;
  @@ -321,7 +327,8 @@
   
   /* We only support synchronous writing */
   if (dwReserved  dwReserved != HSE_IO_SYNC) {
  - log_reason(ISAPI asynchronous I/O not supported, r-filename, r);
  + aplog_error(APLOG_MARK, APLOG_WARNING, r-server,
  + ISAPI asynchronous I/O not supported: %s, r-filename);
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
   }
  @@ -401,7 +408,8 @@
int p;
   
if (!lf) { /* Huh? Invalid data, I think */
  - log_reason(ISA sent invalid headers, r-filename, r);
  + aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  + ISA sent invalid headers: %s, r-filename);
SetLastError(ERROR);/* XXX: Find right error */
return FALSE;
}
  @@ -419,7 +427,8 @@
   
if (!(value = strchr(data, ':'))) {
SetLastError(ERROR);/* XXX: Find right error */
  - log_reason(ISA sent invalid headers, r-filename, r);
  + aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  + ISA sent invalid headers, r-filename);
return FALSE;
}
   
  @@ -492,7 +501,8 @@
   /* We don't support all this async I/O, Microsoft-specific stuff */
   case HSE_REQ_IO_COMPLETION:
   case HSE_REQ_TRANSMIT_FILE:
  - log_reason(ISAPI asynchronous I/O not supported, r-filename, r);
  + aplog_error(APLOG_MARK, APLOG_WARNING, r-server,
  + ISAPI asynchronous I/O not supported: %s, r-filename);
   default:
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
  
  
  


cvs commit: apachen/src/main http_config.h

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

  Modified:src/main http_config.h
  Log:
  Bump the MODULE_MAGIC_NUMBER to indicated aplog_error() addition.
  
  Revision  ChangesPath
  1.47  +1 -1  apachen/src/main/http_config.h
  
  Index: http_config.h
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_config.h,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- http_config.h 1997/08/25 16:02:28 1.46
  +++ http_config.h 1997/09/01 04:14:48 1.47
  @@ -246,7 +246,7 @@
* handle it back-compatibly, or at least signal an error).
*/
   
  -#define MODULE_MAGIC_NUMBER 19970825
  +#define MODULE_MAGIC_NUMBER 19970831
   #define STANDARD_MODULE_STUFF MODULE_MAGIC_NUMBER, -1, __FILE__, NULL
   
   /* Generic accessors for other modules to get at their own module-specific