cvs commit: apache-2.0/src/lib/apr/file_io/unix open.c

1999-12-31 Thread rbb
rbb 99/12/30 17:16:53

  Modified:src/lib/apr/file_io/unix open.c
  Log:
  Fix a nasty little bug that was causing a seg fault everytime we tried
  starting Apache with an existing pid file.  When APR allocates space, it
  has to allocate the right amount.
  
  Revision  ChangesPath
  1.29  +1 -1  apache-2.0/src/lib/apr/file_io/unix/open.c
  
  Index: open.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/open.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- open.c1999/12/30 19:50:20 1.28
  +++ open.c1999/12/31 01:16:53 1.29
  @@ -311,7 +311,7 @@
*/
   ap_status_t ap_open_stderr(struct file_t **thefile, ap_context_t *cont)
   {
  -(*thefile) = ap_pcalloc(cont, sizeof(ap_os_file_t *));
  +(*thefile) = ap_pcalloc(cont, sizeof(struct file_t));
   if ((*thefile) == NULL) {
   return APR_ENOMEM;
   }
  
  
  


cvs commit: apache-2.0/src/main util_script.c

1999-12-31 Thread rbb
rbb 99/12/30 17:27:46

  Modified:src/include util_script.h
   src/main util_script.c
  Log:
  Get rid of ap_call_exec.  It has been #if 0'ed out for a long time, and we
  never call it, so I'm taking it out all together now.
  
  Revision  ChangesPath
  1.5   +0 -2  apache-2.0/src/include/util_script.h
  
  Index: util_script.h
  ===
  RCS file: /home/cvs/apache-2.0/src/include/util_script.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- util_script.h 1999/10/31 09:26:03 1.4
  +++ util_script.h 1999/12/31 01:27:35 1.5
  @@ -81,8 +81,6 @@
   int (*getsfunc) (char *, int, void *),
   void *getsfunc_data);
   API_EXPORT(void) ap_send_size(ap_ssize_t size, request_rec *r);
  -API_EXPORT(int) ap_call_exec(request_rec *r, ap_child_info_t *pinfo, char 
*argv0, char **env,
  -  int shellcmd);
   
   #ifdef __cplusplus
   }
  
  
  
  1.21  +0 -411apache-2.0/src/main/util_script.c
  
  Index: util_script.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/util_script.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- util_script.c 1999/12/20 16:38:35 1.20
  +++ util_script.c 1999/12/31 01:27:43 1.21
  @@ -682,414 +682,3 @@
   }
   #endif
   
  -#if 0
  -API_EXPORT(int) ap_call_exec(request_rec *r, ap_child_info_t *pinfo, char 
*argv0,
  -  char **env, int shellcmd)
  -{
  -int pid = 0;
  -int errfileno = STDERR_FILENO;
  -
  -#if !defined(WIN32)  !defined(OS2)
  -/* the fd on r-server-error_log is closed, but we need somewhere to
  - * put the error messages from the log_* functions. So, we use stderr,
  - * since that is better than allowing errors to go unnoticed.  Don't do
  - * this on Win32, though, since we haven't fork()'d.
  - */
  -ap_put_os_file(r-server-error_log, errfileno, r-pool);
  -#endif
  -
  -/* TODO: all that RLimit stuff should become part of the spawning API,
  - * and not something in the core_dir_config... define a special rlimit
  - * structure and pass it in here.
  - */
  -
  -#ifdef OS2
  -{
  - /* Additions by Alec Kloss, to allow exec'ing of scripts under OS/2 */
  - int is_script = 0;
  - char interpreter[2048]; /* hope it's enough for the interpreter path */
  - char error_object[260];
  - FILE *program;
  -char *cmdline = r-filename, *cmdline_pos;
  -int cmdlen;
  - char *args = , *args_end;
  - ULONG rc;
  -RESULTCODES rescodes;
  -int env_len, e;
  -char *env_block, *env_block_pos;
  -
  - if (r-args  r-args[0]  !strchr(r-args, '='))
  - args = r-args;
  - 
  - program = fopen(r-filename, rt);
  - 
  - if (!program) {
  - ap_log_rerror(APLOG_MARK, APLOG_ERR, r, fopen(%s) failed,
  -  r-filename);
  - return (pid);
  - }
  - 
  - fgets(interpreter, sizeof(interpreter), program);
  - fclose(program);
  - 
  - if (!strncmp(interpreter, #!, 2)) {
  - is_script = 1;
  -interpreter[strlen(interpreter) - 1] = '\0';
  -if (interpreter[2] != '/'  interpreter[2] != '\\'  
interpreter[3] != ':') {
  -char buffer[300];
  -if (DosSearchPath(SEARCH_ENVIRONMENT, PATH, interpreter+2, 
buffer, sizeof(buffer)) == 0) {
  -strcpy(interpreter+2, buffer);
  -} else {
  -strcat(interpreter, .exe);
  -if (DosSearchPath(SEARCH_ENVIRONMENT, PATH, 
interpreter+2, buffer, sizeof(buffer)) == 0) {
  -strcpy(interpreter+2, buffer);
  -}
  -}
  -}
  - }
  -
  -if (is_script) {
  -cmdline = ap_pstrcat(r-pool, interpreter+2,  , r-filename, 
NULL);
  -}
  -else if (strstr(strupr(r-filename), .CMD)  0) {
  -/* Special case to allow use of REXX commands as scripts. */
  -os2pathname(r-filename);
  -cmdline = ap_pstrcat(r-pool, SHELL_PATH,  /C , r-filename, 
NULL);
  -}
  -else {
  -cmdline = r-filename;
  - }
  - 
  -args = ap_pstrdup(r-pool, args);
  -ap_unescape_url(args);
  -args = ap_double_quotes(r-pool, args);
  -args_end = args + strlen(args);
  -
  -if (args_end - args  4000) { /* cmd.exe won't handle lines longer 
than 4k */
  -args_end = args + 4000;
  -*args_end = 0;
  -}
  -
  -/* +4 = 1 space between progname and args, 2 for double null at end, 
2 for possible quote on first arg */
  -cmdlen = 

cvs commit: apache-2.0/src/lib/apr/locks/unix Makefile.in

1999-12-31 Thread sascha
sascha  99/12/30 19:47:32

  Modified:src/lib/apr/locks/unix Makefile.in
  Log:
  Remove trailing slash, confuses some makes
  
  Revision  ChangesPath
  1.7   +1 -1  apache-2.0/src/lib/apr/locks/unix/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/unix/Makefile.in,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -u -r1.6 -r1.7
  --- Makefile.in   1999/12/20 20:02:38 1.6
  +++ Makefile.in   1999/12/31 03:47:32 1.7
  @@ -17,7 +17,7 @@
   
   OBJS=locks.o \
crossproc.o \
  - intraproc.o \
  + intraproc.o
   
   .c.o:
$(CC) $(CFLAGS) -c $(INCLUDES) $
  
  
  


cvs commit: apache-2.0/src/lib/apr/threadproc/unix proc.c

1999-12-31 Thread sascha
sascha  99/12/30 20:15:14

  Modified:src/lib/apr acconfig.h
   src/lib/apr/lib apr_signal.c
   src/lib/apr/test htdigest.c htpasswd.c
   src/lib/apr/threadproc/os2 proc.c
   src/lib/apr/threadproc/unix proc.c
  Log:
  Use always ap_signal() in APR to avoid redefining the system call signal()
  
  Revision  ChangesPath
  1.19  +3 -2  apache-2.0/src/lib/apr/acconfig.h
  
  Index: acconfig.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/acconfig.h,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -u -r1.18 -r1.19
  --- acconfig.h1999/12/22 20:29:16 1.18
  +++ acconfig.h1999/12/31 04:15:08 1.19
  @@ -61,12 +61,13 @@
   
   #ifdef HAVE_SIGACTION
   typedef void Sigfunc(int);
  -#define signal(s,f)ap_signal(s, f)
  -Sigfunc *signal(int signo, Sigfunc * func);
  +Sigfunc *ap_signal(int signo, Sigfunc * func);
   
   #if defined(SIG_ING)  !defined(SIG_ERR)
   #define SIG_ERR ((Sigfunc *)-1)
   #endif
  +#else
  +#define ap_signal(a,b) signal(a,b)
   #endif
   
   #if !defined(HAVE_PTHREAD_SIGMASK)  defined(_AIX)
  
  
  
  1.4   +1 -1  apache-2.0/src/lib/apr/lib/apr_signal.c
  
  Index: apr_signal.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/lib/apr_signal.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -u -r1.3 -r1.4
  --- apr_signal.c  1999/12/01 18:39:35 1.3
  +++ apr_signal.c  1999/12/31 04:15:08 1.4
  @@ -67,7 +67,7 @@
* from W. Richard Stevens' Advanced Programming in the UNIX Environment
* (the version that does not automatically restart system calls).
*/
  -Sigfunc *signal(int signo, Sigfunc * func)
  +Sigfunc *ap_signal(int signo, Sigfunc * func)
   {
   struct sigaction act, oact;
   
  
  
  
  1.12  +1 -1  apache-2.0/src/lib/apr/test/htdigest.c
  
  Index: htdigest.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/htdigest.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -u -r1.11 -r1.12
  --- htdigest.c1999/12/20 19:44:42 1.11
  +++ htdigest.c1999/12/31 04:15:10 1.12
  @@ -209,7 +209,7 @@
   ap_create_context(cntxt, NULL);
   
   tn = NULL;
  -signal(SIGINT, (void (*)(int)) interrupted);
  +ap_signal(SIGINT, (void (*)(int)) interrupted);
   if (argc == 5) {
if (strcmp(argv[1], -c))
usage();
  
  
  
  1.2   +1 -1  apache-2.0/src/lib/apr/test/htpasswd.c
  
  Index: htpasswd.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/htpasswd.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -u -r1.1 -r1.2
  --- htpasswd.c1999/08/17 15:59:48 1.1
  +++ htpasswd.c1999/12/31 04:15:11 1.2
  @@ -328,7 +328,7 @@
   int args_left = 2;
   
   tempfilename = NULL;
  -signal(SIGINT, (void (*)(int)) interrupted);
  +ap_signal(SIGINT, (void (*)(int)) interrupted);
   
   /*
* Preliminary check to make sure they provided at least
  
  
  
  1.12  +1 -1  apache-2.0/src/lib/apr/threadproc/os2/proc.c
  
  Index: proc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/os2/proc.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -u -r1.11 -r1.12
  --- proc.c1999/12/19 08:33:52 1.11
  +++ proc.c1999/12/31 04:15:12 1.12
  @@ -247,7 +247,7 @@
   DosSetFHState(attr-parent_err-filedes, OPEN_FLAGS_NOINHERIT);
   }
   
  -signal(SIGCHLD, SIG_DFL); /*not sure if this is needed or not */
  +ap_signal(SIGCHLD, SIG_DFL); /*not sure if this is needed or not */
   
   if (attr-currdir != NULL) {
   _getcwd2(savedir, sizeof(savedir));
  
  
  
  1.14  +1 -1  apache-2.0/src/lib/apr/threadproc/unix/proc.c
  
  Index: proc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/unix/proc.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -u -r1.13 -r1.14
  --- proc.c1999/12/03 15:18:37 1.13
  +++ proc.c1999/12/31 04:15:13 1.14
  @@ -355,7 +355,7 @@
   ap_close(attr-child_err);
   }
   
  -signal(SIGCHLD, SIG_DFL); /*not sure if this is needed or not */
  +ap_signal(SIGCHLD, SIG_DFL); /*not sure if this is needed or not */
   
   if (attr-currdir != NULL) {
   if (chdir(attr-currdir) == -1) {
  
  
  


cvs commit: apache-2.0/src/modules/standard mod_rewrite.c mod_rewrite.h

1999-12-31 Thread dgaudet
dgaudet 99/12/30 21:03:34

  Modified:src  CHANGES
   src/modules/standard mod_rewrite.c mod_rewrite.h
  Log:
  port mod_rewrite to 2.0
  
  Submitted by: Paul J. Reder [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.20  +2 -0  apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- CHANGES   1999/12/21 11:33:21 1.19
  +++ CHANGES   1999/12/31 05:03:32 1.20
  @@ -1,5 +1,7 @@
   Changes with Apache 2.0-dev
   
  +  *) port mod_rewrite to 2.0. [Paul J. Reder [EMAIL PROTECTED]]
  +
 *) More rigorous checking of Host: headers to fix security problems
with mass name-based virtual hosting (whether using mod_rewrite
or mod_vhost_alias).
  
  
  
  1.6   +234 -202  apache-2.0/src/modules/standard/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_rewrite.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_rewrite.c 1999/10/22 16:01:27 1.5
  +++ mod_rewrite.c 1999/12/31 05:03:33 1.6
  @@ -89,8 +89,18 @@
   */
   
   
  +#include httpd.h
  +#include http_config.h
  +#include http_request.h
  +#include http_core.h
  +#include http_log.h
  +#include http_protocol.h
   #include mod_rewrite.h
   
  +#if !defined(OS2)  !defined(WIN32)
  +#include unixd.h
  +#endif
  +
   #ifndef NO_WRITEV
   #include sys/types.h
   #include sys/uio.h
  @@ -183,27 +193,26 @@
   { NULL }
   };
   
  +static void register_hooks(void)
  +{
  +ap_hook_post_config(init_module,NULL,NULL,HOOK_MIDDLE);
  +ap_hook_child_init(init_child,NULL,NULL,HOOK_MIDDLE);
  +
  +ap_hook_fixups(hook_fixup,NULL,NULL,HOOK_FIRST);
  +ap_hook_translate_name(hook_uri2file,NULL,NULL,HOOK_FIRST);
  +ap_hook_type_checker(hook_mimetype,NULL,NULL,HOOK_MIDDLE);
  +}
  +
   /* the main config structure */
   module MODULE_VAR_EXPORT rewrite_module = {
  -   STANDARD_MODULE_STUFF,
  -   init_module, /* module initializer  */
  +   STANDARD20_MODULE_STUFF,
  config_perdir_create,/* create per-dirconfig structures */
  config_perdir_merge, /* merge  per-dirconfig structures */
  config_server_create,/* create per-server config structures */
  config_server_merge, /* merge  per-server config structures */
  -   command_table,   /* ap_table_t of config file commands   
*/
  +   command_table,   /* ap_table_t of config file commands  */
  handler_table,   /* [#8] MIME-typed-dispatched handlers */
  -   hook_uri2file,   /* [#1] URI to filename translation*/
  -   NULL,/* [#4] validate user id from request  */
  -   NULL,/* [#5] check if the user is ok _here_ */
  -   NULL,/* [#3] check access by host address   */
  -   hook_mimetype,   /* [#6] determine MIME type*/
  -   hook_fixup,  /* [#7] pre-run fixups */
  -   NULL,/* [#9] log a transaction  */
  -   NULL,/* [#2] header parser  */
  -   init_child,  /* child_init  */
  -   NULL,/* child_exit  */
  -   NULL /* [#0] post read-request  */
  +   register_hooks   /* register hooks  */
   };
   
   /* the cache */
  @@ -211,9 +220,10 @@
   
   /* whether proxy module is available or not */
   static int proxy_available;
  +static int once_through = 0;
   
  -static char *lockname;
  -static int lockfd = -1;
  +static const char *lockname;
  +static ap_file_t *lockfd = NULL;
   
   /*
   ** +---+
  @@ -238,7 +248,7 @@
   a-state   = ENGINE_DISABLED;
   a-options = OPTION_NONE;
   a-rewritelogfile  = NULL;
  -a-rewritelogfp= -1;
  +a-rewritelogfp= NULL;
   a-rewriteloglevel = 0;
   a-rewritemaps = ap_make_array(p, 2, sizeof(rewritemap_entry));
   a-rewriteconds= ap_make_array(p, 2, sizeof(rewritecond_entry));
  @@ -271,7 +281,7 @@
   a-rewritelogfile  = overrides-rewritelogfile != NULL 
? overrides-rewritelogfile
: base-rewritelogfile;
  -a-rewritelogfp= overrides-rewritelogfp != -1 
  +a-rewritelogfp= overrides-rewritelogfp != NULL 
? overrides-rewritelogfp 
: base-rewritelogfp;
   a-rewritemaps = 

cvs commit: apache-2.0/src/modules/standard mod_rewrite.c mod_rewrite.h

1999-12-31 Thread dgaudet
dgaudet 99/12/30 21:05:29

  Modified:src/modules/standard mod_rewrite.c mod_rewrite.h
  Log:
  merge 1.3 changes to rewrite forward onto 2.0
  
  Submitted by: Paul J. Reder [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.7   +89 -61apache-2.0/src/modules/standard/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_rewrite.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- mod_rewrite.c 1999/12/31 05:03:33 1.6
  +++ mod_rewrite.c 1999/12/31 05:05:27 1.7
  @@ -102,7 +102,9 @@
   #endif
   
   #ifndef NO_WRITEV
  +#ifndef NETWARE
   #include sys/types.h
  +#endif
   #include sys/uio.h
   #endif
   
  @@ -1145,13 +1147,19 @@
   return OK;
   }
   else if (  (strlen(r-filename)  7 
  -strncasecmp(r-filename, http://;, 7) == 0)
  +strncasecmp(r-filename, http://;,   7) == 0)
   || (strlen(r-filename)  8 
  -strncasecmp(r-filename, https://;, 8) == 0)
  +strncasecmp(r-filename, https://;,  8) == 0)
   || (strlen(r-filename)  9 
   strncasecmp(r-filename, gopher://;, 9) == 0)
   || (strlen(r-filename)  6 
  -strncasecmp(r-filename, ftp://;, 6) == 0)) {
  +strncasecmp(r-filename, ftp://;,6) == 0)
  +|| (strlen(r-filename)  5 
  +strncasecmp(r-filename, ldap:, 5) == 0)
  +|| (strlen(r-filename)  5 
  +strncasecmp(r-filename, news:;, 5) == 0)
  +|| (strlen(r-filename)  7 
  +strncasecmp(r-filename, mailto:;,   7) == 0)) {
   /* it was finally rewritten to a remote URL */
   
   /* skip 'scheme:' */
  @@ -1171,8 +1179,8 @@
   
   /* append the QUERY_STRING part */
   if (r-args != NULL) {
  -   r-filename = ap_pstrcat(r-pool, r-filename,
  -?, r-args, NULL);
  +r-filename = ap_pstrcat(r-pool, r-filename, ?, 
  + ap_escape_uri(r-pool, r-args), 
NULL);
   }
   
   /* determine HTTP redirect response code */
  @@ -1216,7 +1224,7 @@
   /* it was finally rewritten to a local path */
   
   /* expand /~user prefix */
  -#ifndef WIN32
  +#if !defined(WIN32)  !defined(NETWARE)
   r-filename = expand_tildepaths(r, r-filename);
   #endif
   rewritelog(r, 2, local path result: %s, r-filename);
  @@ -1389,9 +1397,7 @@
* (r-path_info was already appended by the
* rewriting engine because of the per-dir context!)
*/
  -if (r-args != NULL
  - r-uri == r-unparsed_uri) {
  -/* see proxy_http:proxy_http_canon() */
  +if (r-args != NULL) {
   r-filename = ap_pstrcat(r-pool, r-filename,
?, r-args, NULL);
   }
  @@ -1405,13 +1411,19 @@
   return OK;
   }
   else if (  (strlen(r-filename)  7 
  -strncmp(r-filename, http://;, 7) == 0)
  -|| (strlen(r-filename)  8 
  -strncmp(r-filename, https://;, 8) == 0)
  +strncasecmp(r-filename, http://;,   7) == 0)
  +|| (strlen(r-filename)  8   
  +strncasecmp(r-filename, https://;,  8) == 0)
   || (strlen(r-filename)  9 
  -strncmp(r-filename, gopher://;, 9) == 0)
  +strncasecmp(r-filename, gopher://;, 9) == 0)
   || (strlen(r-filename)  6 
  -strncmp(r-filename, ftp://;, 6) == 0)) {
  +strncasecmp(r-filename, ftp://;,6) == 0)
  +|| (strlen(r-filename)  5 
  +strncasecmp(r-filename, ldap:, 5) == 0)
  +|| (strlen(r-filename)  5 
  +strncasecmp(r-filename, news:;, 5) == 0)
  +|| (strlen(r-filename)  7 
  +strncasecmp(r-filename, mailto:;,   7) == 0)) {
   /* it was finally rewritten to a remote URL */
   
   /* because we are in a per-dir context
  @@ -1460,8 +1472,8 @@
   
   /* append the QUERY_STRING part */
   if (r-args != NULL) {
  -r-filename = ap_pstrcat(r-pool, r-filename,
  - ?, r-args, NULL);
  +r-filename = ap_pstrcat(r-pool, r-filename, ?, 
  + ap_escape_uri(r-pool, r-args), 
NULL);
   }
   
   /* determine HTTP 

cvs commit: apache-2.0/src/lib/apr/time/unix timestr.c

1999-12-31 Thread dgaudet
dgaudet 99/12/30 21:09:22

  Modified:src/lib/apr/include apr_time.h
   src/lib/apr/time/unix timestr.c
  Log:
  retsize should be ap_size_t, not hardwired to 32 bits
  
  Revision  ChangesPath
  1.8   +1 -1  apache-2.0/src/lib/apr/include/apr_time.h
  
  Index: apr_time.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_time.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- apr_time.h1999/12/30 18:31:27 1.7
  +++ apr_time.h1999/12/31 05:09:20 1.8
  @@ -77,7 +77,7 @@
   ap_status_t ap_implode_time(ap_time_t *);
   
   ap_status_t ap_timestr(char **date_str, struct atime_t *t, ap_timetype_e 
type, ap_context_t *p);
  -ap_status_t ap_strftime(char *s, ap_int32_t *retsize, ap_size_t max, const 
char *format, ap_time_t *tm);
  +ap_status_t ap_strftime(char *s, ap_size_t *retsize, ap_size_t max, const 
char *format, ap_time_t *tm);
   
   /* accessor functions */
   ap_status_t ap_get_curtime(ap_time_t *, ap_int64_t *);
  
  
  
  1.4   +1 -1  apache-2.0/src/lib/apr/time/unix/timestr.c
  
  Index: timestr.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/time/unix/timestr.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- timestr.c 1999/12/30 18:31:28 1.3
  +++ timestr.c 1999/12/31 05:09:21 1.4
  @@ -126,7 +126,7 @@
   */
   }
   
  -ap_status_t ap_strftime(char *s, ap_int32_t *retsize, ap_size_t max, 
  +ap_status_t ap_strftime(char *s, ap_size_t *retsize, ap_size_t max, 
   const char *format, struct atime_t *tm)
   {
   (*retsize) = strftime(s, max, format, tm-explodedtime);
  
  
  


cvs commit: apache-2.0/src/modules/standard mod_auth_dbm.c

1999-12-31 Thread rbb
rbb 99/12/31 09:04:58

  Modified:src/modules/standard mod_auth_dbm.c
  Log:
  Update mod_auth_dbm to work with Apache 2.0.  This has not been tested,
  but at least it compiles now.
  
  Revision  ChangesPath
  1.6   +9 -15 apache-2.0/src/modules/standard/mod_auth_dbm.c
  
  Index: mod_auth_dbm.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_auth_dbm.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_auth_dbm.c1999/10/22 16:01:24 1.5
  +++ mod_auth_dbm.c1999/12/31 17:04:58 1.6
  @@ -212,7 +212,7 @@
  dbm_auth_module);
   const char *sent_pw;
   char *real_pw, *colon_pw;
  -char *invalid_pw;
  +ap_status_t invalid_pw;
   int res;
   
   if ((res = ap_get_basic_auth_pw(r, sent_pw)))
  @@ -235,7 +235,7 @@
*colon_pw = '\0';
   }
   invalid_pw = ap_validate_password(sent_pw, real_pw);
  -if (invalid_pw != NULL) {
  +if (invalid_pw != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
  DBM user %s: authentication failure for \%s\: %s,
  r-user, r-uri, invalid_pw);
  @@ -309,26 +309,20 @@
   return DECLINED;
   }
   
  +static void register_hooks(void)
  +{
  +ap_hook_check_user_id(dbm_authenticate_basic_user, NULL, NULL, 
HOOK_MIDDLE);
  +ap_hook_auth_checker(dbm_check_auth, NULL, NULL, HOOK_MIDDLE);
  +}
   
   module dbm_auth_module =
   {
  -STANDARD_MODULE_STUFF,
  -NULL,/* initializer */
  +STANDARD20_MODULE_STUFF,
   create_dbm_auth_dir_config,  /* dir config creater */
   NULL,/* dir merger --- default is to override */
   NULL,/* server config */
   NULL,/* merge server config */
   dbm_auth_cmds,   /* command ap_table_t */
   NULL,/* handlers */
  -NULL,/* filename translation */
  -dbm_authenticate_basic_user, /* check_user_id */
  -dbm_check_auth,  /* check auth */
  -NULL,/* check access */
  -NULL,/* type_checker */
  -NULL,/* fixups */
  -NULL,/* logger */
  -NULL,/* header parser */
  -NULL,/* child_init */
  -NULL,/* child_exit */
  -NULL /* post read-request */
  +register_hooks  /* register hooks */
   };
  
  
  


cvs commit: apache-2.0/src/modules/standard mod_digest.c mod_vhost_alias.c

1999-12-31 Thread rbb
rbb 99/12/31 09:06:16

  Modified:src/modules/standard mod_digest.c mod_vhost_alias.c
  Log:
  Update these modules to Apache 2.0.  Not tested, but they compile again.
  
  Revision  ChangesPath
  1.6   +2 -2  apache-2.0/src/modules/standard/mod_digest.c
  
  Index: mod_digest.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_digest.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_digest.c  1999/10/22 16:01:25 1.5
  +++ mod_digest.c  1999/12/31 17:06:15 1.6
  @@ -111,7 +111,7 @@
   const char *rpw;
   char *w, *x;
   
  -if (!(f = ap_pcfg_openfile(r-pool, auth_pwfile))) {
  +if (ap_pcfg_openfile(f, r-pool, auth_pwfile) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
Could not open password file: %s, auth_pwfile);
return NULL;
  @@ -161,7 +161,7 @@
   
   if (strcasecmp(scheme = ap_getword_white(r-pool, auth_line), 
Digest)) {
/* Client tried to authenticate using wrong auth scheme */
  - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r-server,
  + ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, errno, r-server,  
client used wrong authentication scheme: %s for %s, 
scheme, r-uri);
ap_note_digest_auth_failure(r);
  
  
  
  1.3   +7 -13 apache-2.0/src/modules/standard/mod_vhost_alias.c
  
  Index: mod_vhost_alias.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_vhost_alias.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mod_vhost_alias.c 1999/08/31 05:34:06 1.2
  +++ mod_vhost_alias.c 1999/12/31 17:06:15 1.3
  @@ -457,26 +457,20 @@
   return OK;
   }
   
  +static void register_hooks(void)
  +{
  +ap_hook_translate_name(mva_translate, NULL, NULL, HOOK_MIDDLE);
  +};
   
   module MODULE_VAR_EXPORT vhost_alias_module =
   {
  -STANDARD_MODULE_STUFF,
  -NULL,/* initializer */
  +STANDARD20_MODULE_STUFF,
   NULL,/* dir config creater */
   NULL,/* dir merger --- default is to override */
   mva_create_server_config,/* server config */
   mva_merge_server_config, /* merge server configs */
   mva_commands,/* command ap_table_t */
   NULL,/* handlers */
  -mva_translate,   /* filename translation */
  -NULL,/* check_user_id */
  -NULL,/* check auth */
  -NULL,/* check access */
  -NULL,/* type_checker */
  -NULL,/* fixups */
  -NULL,/* logger */
  -NULL,/* header parser */
  -NULL,/* child_init */
  -NULL,/* child_exit */
  -NULL /* post read-request */
  +register_hooks  /* register hooks */
   };
  +
  
  
  


cvs commit: apache-2.0/src/modules/standard mod_status.c

1999-12-31 Thread rbb
rbb 99/12/31 09:38:25

  Modified:src/modules/standard mod_status.c
  Log:
  Fix a bug in mod_status.  ap_ht_time expects an ap_time_t type, instead of
  a time_t now.
  
  Revision  ChangesPath
  1.5   +4 -1  apache-2.0/src/modules/standard/mod_status.c
  
  Index: mod_status.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_status.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_status.c  1999/10/13 05:24:16 1.4
  +++ mod_status.c  1999/12/31 17:38:25 1.5
  @@ -82,7 +82,10 @@
   int i;
   ap_array_header_t *server_status;
   ap_status_table_row_t *status_rows;
  -time_t nowtime = time(NULL);
  +ap_time_t *nowtime = NULL;
  +
  +ap_make_time(nowtime, r-pool);
  +ap_curtime(nowtime);
   
   r-allowed = (1  M_GET);
   if (r-method_number != M_GET)
  
  
  


cvs commit: apache-2.0/src/modules/standard mod_usertrack.c

1999-12-31 Thread rbb
rbb 99/12/31 09:39:42

  Modified:src/modules/standard mod_usertrack.c
  Log:
  Make mod_usertrack compile cleanly.  Not tested yet.
  
  Revision  ChangesPath
  1.6   +6 -1  apache-2.0/src/modules/standard/mod_usertrack.c
  
  Index: mod_usertrack.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_usertrack.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_usertrack.c   1999/11/30 03:52:54 1.5
  +++ mod_usertrack.c   1999/12/31 17:39:42 1.6
  @@ -182,7 +182,12 @@
   
   if (cls-expires) {
   struct tm *tms;
  -time_t when = r-request_time + cls-expires;
  +ap_time_t *when = NULL;
  +ap_int64_t req_time;
  +
  +ap_make_time(when, r-pool);
  +ap_get_curtime(when, req_time);
  +ap_set_curtime(when,  req_time + cls-expires);
   
   #ifndef MILLENIAL_COOKIES
   /*
  
  
  


Re: cvs commit: apache-2.0/src/modules/standard mod_digest.c mod_vhost_alias.c

1999-12-31 Thread Ben Laurie
[EMAIL PROTECTED] wrote:
 
 rbb 99/12/31 09:06:16
 
   Modified:src/modules/standard mod_digest.c mod_vhost_alias.c
   Log:
   Update these modules to Apache 2.0.  Not tested, but they compile again.

On that note ... how do you actually get a module into Apache 2.0? I
tried to add mod_actions earlier today (./configure --enable-actions)
but it didn't seem to result in a server that understood Action. Not
sure I'm keen on that method of doing it, anyway.

Cheers,

Ben.

--
SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm

http://www.apache-ssl.org/ben.html

My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there.
 - Indira Gandhi


Re: cvs commit: apache-2.0/src/modules/standard mod_digest.c mod_vhost_alias.c

1999-12-31 Thread Ryan Bloom

I've been using APACI when dealing with modules, because I don't think
Manoj has finished the module config stuff yet.

Ryan

On Fri, 31 Dec 1999, Ben Laurie wrote:

 [EMAIL PROTECTED] wrote:
  
  rbb 99/12/31 09:06:16
  
Modified:src/modules/standard mod_digest.c mod_vhost_alias.c
Log:
Update these modules to Apache 2.0.  Not tested, but they compile again.
 
 On that note ... how do you actually get a module into Apache 2.0? I
 tried to add mod_actions earlier today (./configure --enable-actions)
 but it didn't seem to result in a server that understood Action. Not
 sure I'm keen on that method of doing it, anyway.
 
 Cheers,
 
 Ben.
 
 --
 SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm
 
 http://www.apache-ssl.org/ben.html
 
 My grandfather once told me that there are two kinds of people: those
 who work and those who take the credit. He told me to try to be in the
 first group; there was less competition there.
  - Indira Gandhi
 

___
Ryan Bloom  [EMAIL PROTECTED]
4205 S Miami Blvd   
RTP, NC 27709   

Come to the first official Apache Software Foundation
Conference!  http://ApacheCon.Com/




cvs commit: apache-2.0/src/modules/standard mod_unique_id.c

1999-12-31 Thread rbb
rbb 99/12/31 11:03:19

  Modified:src/modules/standard mod_unique_id.c
  Log:
  Make mod_unique_id compile again with Apache 2.0.
  
  Revision  ChangesPath
  1.5   +15 -20apache-2.0/src/modules/standard/mod_unique_id.c
  
  Index: mod_unique_id.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_unique_id.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_unique_id.c   1999/11/29 23:33:06 1.4
  +++ mod_unique_id.c   1999/12/31 19:03:18 1.5
  @@ -161,7 +161,7 @@
 unique_id_rec_total_size,
 unique_id_rec_size_uu;
   
  -static void unique_id_global_init(server_rec *s, ap_context_t *p)
  +static void unique_id_global_init(ap_context_t *p, ap_context_t *plog, 
ap_context_t *ptemp, server_rec *main_server)
   {
   #ifndef MAXHOSTNAMELEN
   #define MAXHOSTNAMELEN 256
  @@ -200,21 +200,21 @@
* be unique as the physical address of the machine
*/
   if (gethostname(str, sizeof(str) - 1) != 0) {
  -ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, s,
  +ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, errno, 
main_server,
 gethostname: mod_unique_id requires the hostname of the server);
   exit(1);
   }
   str[sizeof(str) - 1] = '\0';
   
   if ((hent = gethostbyname(str)) == NULL) {
  -ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, s,
  +ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, h_errno, 
main_server,
   mod_unique_id: unable to gethostbyname(\%s\), str);
   exit(1);
   }
   
   global_in_addr = ((struct in_addr *) hent-h_addr_list[0])-s_addr;
   
  -ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, s,
  +ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, main_server,
   mod_unique_id: using ip addr %s,
   inet_ntoa(*(struct in_addr *) hent-h_addr_list[0]));
   
  @@ -245,7 +245,7 @@
   #endif
   }
   
  -static void unique_id_child_init(server_rec *s, ap_context_t *p)
  +static void unique_id_child_init(ap_context_t *p, server_rec *s)
   {
   pid_t pid;
   #ifdef HAVE_GETTIMEOFDAY
  @@ -271,7 +271,7 @@
* global_init ... but oh well.
*/
   if (cur_unique_id.pid != pid) {
  -ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_CRIT, s,
  +ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_CRIT, 0, s,
   oh no! pids are greater than 32-bits!  I'm broken!);
   }
   
  @@ -348,7 +348,7 @@
   new_unique_id.counter = cur_unique_id.counter;
   
   new_unique_id.stamp = htonl((unsigned int)r-request_time);
  -new_unique_id.thread_index = htonl((unsigned 
int)r-connection-thread_num);
  +new_unique_id.thread_index = htonl((unsigned int)r-connection-id);
   
   /* we'll use a temporal buffer to avoid uuencoding the possible internal
* paddings of the original structure */
  @@ -392,25 +392,20 @@
   return DECLINED;
   }
   
  +static void register_hooks(void)
  +{
  +ap_hook_post_config(unique_id_global_init, NULL, NULL, HOOK_MIDDLE);
  +ap_hook_child_init(unique_id_child_init, NULL, NULL, HOOK_MIDDLE);
  +ap_hook_post_read_request(gen_unique_id, NULL, NULL, HOOK_MIDDLE); 
  +}
   
   module MODULE_VAR_EXPORT unique_id_module = {
  -STANDARD_MODULE_STUFF,
  -unique_id_global_init,  /* initializer */
  +STANDARD20_MODULE_STUFF,
   NULL,   /* dir config creater */
   NULL,   /* dir merger --- default is to override */
   NULL,   /* server config */
   NULL,   /* merge server configs */
   NULL,   /* command ap_table_t */
   NULL,   /* handlers */
  -NULL,   /* filename translation */
  -NULL,   /* check_user_id */
  -NULL,   /* check auth */
  -NULL,   /* check access */
  -NULL,   /* type_checker */
  -NULL,   /* fixups */
  -NULL,   /* logger */
  -NULL,   /* header parser */
  -unique_id_child_init,   /* child_init */
  -NULL,   /* child_exit */
  -gen_unique_id   /* post_read_request */
  +register_hooks  /* register hooks */
   };
  
  
  


cvs commit: apache-2.0 configure

1999-12-31 Thread rbb
rbb 99/12/31 11:10:59

  Modified:.configure
  Log:
  Update configure script, so --enable-modules=most can compile a working
  Apache 2.0 server.  This basically removes mod_info and mod_proxy from the
  build process.  With this change, most of the server compiles again.
  
  Revision  ChangesPath
  1.8   +2 -0  apache-2.0/configure
  
  Index: configure
  ===
  RCS file: /home/cvs/apache-2.0/configure,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- configure 1999/12/07 14:20:10 1.7
  +++ configure 1999/12/31 19:10:59 1.8
  @@ -799,6 +799,8 @@
  module_auth_digest=no # conflict with mod_digest
  module_log_agent=no   # deprecated
  module_log_referer=no # deprecated
  +module_info=no# needs to be reworked for 
Apache 2.0
  +module_proxy=no   # proxy doesn't work yet, and 
we are probably going to just re-write it for 2.0 
  ;;
  * ) 
  eval exists=\$module_${apc_optarg} 
  
  
  


cvs commit: apache-2.0/src/modules/standard mod_cern_meta.c mod_expires.c mod_status.c mod_usertrack.c

1999-12-31 Thread rbb
rbb 99/12/31 12:32:37

  Modified:src/modules/mpm/prefork prefork.c
   src/modules/standard mod_cern_meta.c mod_expires.c
mod_status.c mod_usertrack.c
  Log:
  A few more tweaks to finish the modules work.  Now, all of the modules
  compile correctly with Apache 2.0. This does run, but it hasn't been tested
  any more than simply compiling and running the server.
  
  Revision  ChangesPath
  1.62  +6 -0  apache-2.0/src/modules/mpm/prefork/prefork.c
  
  Index: prefork.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/prefork/prefork.c,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- prefork.c 1999/12/29 23:57:53 1.61
  +++ prefork.c 1999/12/31 20:32:34 1.62
  @@ -2985,6 +2985,12 @@
   /* NOP */
   }
   
  +ap_array_header_t *ap_get_status_table(ap_context_t *p)
  +{
  +/* NOP */
  +return NULL;
  +}
  +
   API_EXPORT(void) ap_reset_connection_status(long conn_id)
   {
   /* NOP */
  
  
  
  1.5   +7 -6  apache-2.0/src/modules/standard/mod_cern_meta.c
  
  Index: mod_cern_meta.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_cern_meta.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_cern_meta.c   1999/10/22 16:01:25 1.4
  +++ mod_cern_meta.c   1999/12/31 20:32:35 1.5
  @@ -229,7 +229,7 @@
   /* XXX: this is very similar to ap_scan_script_header_err_core...
* are the differences deliberate, or just a result of bit rot?
*/
  -static int scan_meta_file(request_rec *r, FILE *f)
  +static int scan_meta_file(request_rec *r, ap_file_t *f)
   {
   char w[MAX_STRING_LEN];
   char *l;
  @@ -237,7 +237,7 @@
   ap_table_t *tmp_headers;
   
   tmp_headers = ap_make_table(r-pool, 5);
  -while (fgets(w, MAX_STRING_LEN - 1, f) != NULL) {
  +while (ap_fgets(w, MAX_STRING_LEN - 1, f) != APR_SUCCESS) {
   
/* Delete terminal (CR?)LF */
   
  @@ -295,7 +295,8 @@
   char *last_slash;
   char *real_file;
   char *scrap_book;
  -FILE *f;
  +ap_file_t *f = NULL;
  +ap_status_t retcode;
   cern_meta_dir_config *dconf;
   int rv;
   request_rec *rr;
  @@ -354,8 +355,8 @@
   }
   ap_destroy_sub_req(rr);
   
  -f = ap_pfopen(r-pool, metafilename, r);
  -if (f == NULL) {
  +retcode = ap_open(f, metafilename, APR_READ | APR_CREATE, 
APR_OS_DEFAULT, r-pool);
  +if (retcode != APR_SUCCESS) {
if (errno == ENOENT) {
return DECLINED;
}
  @@ -366,7 +367,7 @@
   
   /* read the headers in */
   rv = scan_meta_file(r, f);
  -ap_pfclose(r-pool, f);
  +ap_close(f);
   
   return rv;
   }
  
  
  
  1.5   +10 -3 apache-2.0/src/modules/standard/mod_expires.c
  
  Index: mod_expires.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_expires.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_expires.c 1999/10/22 16:01:26 1.4
  +++ mod_expires.c 1999/12/31 20:32:35 1.5
  @@ -402,9 +402,11 @@
   {
   expires_dir_config *conf;
   char *code;
  -time_t base;
  +char *timestr = NULL;
  +ap_int64_t base;
   time_t additional;
   time_t expires;
  +ap_time_t *finaltime = NULL;
   char age[20];
   
   if (ap_is_HTTP_ERROR(r-status))   /* Don't add Expires headers to 
errors */
  @@ -464,7 +466,7 @@
   /* there's been some discussion and it's possible that 
* 'access time' will be stored in request structure
*/
  -base = r-request_time;
  +ap_get_curtime(r-request_time, base);
   additional = atoi(code[1]);
   break;
   default:
  @@ -482,13 +484,18 @@
   tzset();/* redundant? called implicitly by 
localtime, at least 
* under FreeBSD
*/
  -ap_table_setn(r-headers_out, Expires, ap_gm_timestr_822(r-pool, 
expires));
  +ap_make_time(finaltime, r-pool);
  +ap_set_curtime(finaltime, expires);
  +ap_timestr(timestr, finaltime, APR_UTCTIME, r-pool); 
  +ap_table_setn(r-headers_out, Expires, timestr);
   return OK;
   }
  +
   static void register_hooks(void)
   {
   ap_hook_fixups(add_expires,NULL,NULL,HOOK_MIDDLE);
   }
  +
   module MODULE_VAR_EXPORT expires_module =
   {
   STANDARD20_MODULE_STUFF,
  
  
  
  1.6   +1 -1  apache-2.0/src/modules/standard/mod_status.c
  
  Index: mod_status.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_status.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  ---