cvs commit: apache-apr/include apr_file_io.h apr_general.h

1999-04-08 Thread fielding
fielding99/04/07 19:36:28

  Modified:include  apr_file_io.h apr_general.h
  Log:
  ssize_t is the correct return value for read/write.
  Default to the ANSI C values instead of a funky fixed bit size.
  
  Revision  ChangesPath
  1.9   +2 -2  apache-apr/include/apr_file_io.h
  
  Index: apr_file_io.h
  ===
  RCS file: /home/cvs/apache-apr/include/apr_file_io.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- apr_file_io.h 1999/04/07 20:42:09 1.8
  +++ apr_file_io.h 1999/04/08 02:36:26 1.9
  @@ -102,8 +102,8 @@
   apr_file_t *apr_open(char *, apr_int32_t, apr_fileperms_t);
   apr_status_t apr_close(apr_file_t *);
   
  -apr_size_t apr_read(apr_file_t *, void *, apr_size_t);
  -apr_size_t apr_write(apr_file_t *, void *, apr_size_t);
  +apr_ssize_t apr_read(apr_file_t *, void *, apr_size_t);
  +apr_ssize_t apr_write(apr_file_t *, void *, apr_size_t);
   
   apr_file_t *apr_dupfile(apr_file_t *);
   apr_status_t apr_getfileinfo(char *, apr_file_t *);
  
  
  
  1.7   +3 -2  apache-apr/include/apr_general.h
  
  Index: apr_general.h
  ===
  RCS file: /home/cvs/apache-apr/include/apr_general.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- apr_general.h 1999/04/07 20:42:09 1.6
  +++ apr_general.h 1999/04/08 02:36:26 1.7
  @@ -66,8 +66,9 @@
   typedef long  apr_int64_t;
   typedef unsigned long apr_uint64_t;
   
  -typedef apr_int32_t   apr_size_t; 
  +typedef size_tapr_size_t; 
  +typedef ssize_t   apr_ssize_t; 
   
  -typedef apr_int32_t apr_off_t;
  +typedef off_t apr_off_t;
   
   #endif  /* ! APR_GENERAL_H */
  
  
  


cvs commit: apache-apr STATUS

1999-04-08 Thread manoj
manoj   99/04/08 01:53:47

  Modified:.STATUS
  Log:
  Nasty hot weather is here. It's late this year.
  
  Revision  ChangesPath
  1.18  +13 -1 apache-apr/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/apache-apr/STATUS,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -u -r1.17 -r1.18
  --- STATUS1999/03/23 22:06:30 1.17
  +++ STATUS1999/04/08 08:53:46 1.18
  @@ -1,5 +1,5 @@
   Apache Portable Runtime STATUS:
  -Last modified at [$Date: 1999/03/23 22:06:30 $]
  +Last modified at [$Date: 1999/04/08 08:53:46 $]
   
   Release:
   
  @@ -36,9 +36,21 @@
   mod_log_referer.c -- mod_log_config changes.  If yes, I'll test
  -- them later.
   
  +Warning scrubbing
  +Get rid of all reasonable warnings with the strictest compiler flags,
  +to help weed out bugs
  +
   Everything
   
   Needs patch:
  +
  +On Red Hat 5.2, with a very low MaxRequestsPerChild (e.g. 10), when the
  +server is banged on with ApacheBench, occasionally, the main thread of a
  +process hangs around in pthread_exit_process. The size of that process is
  +always around 11M. This bug is also exhibited by sending lots of SIGHUPs
  +to the parent process rapidly (but not SIGWINCHes). The suspicion is that
  +this is either an error in how pthread calls are used in the server, or a
  +libc bug (the last refuge of a desperate programer).
   
   Open issues:
   
  
  
  


cvs commit: apache-1.3/src CHANGES

1999-04-08 Thread bjh
bjh 99/04/08 04:36:39

  Modified:src/include ap_config.h
   src/main alloc.c util_script.c
   src/modules/standard mod_cgi.c mod_include.c
   src  CHANGES
  Log:
  OS/2: Rework CGI handling to use spawn*() instead of fork/exec, achieving
  a roughly 5 fold speed up. Forking really sucks performance wise on OS/2
  as it isn't supported by the kernal but fudged in the C libraries for
  unix compatibility.
  
  Revision  ChangesPath
  1.253 +1 -0  apache-1.3/src/include/ap_config.h
  
  Index: ap_config.h
  ===
  RCS file: /home/cvs/apache-1.3/src/include/ap_config.h,v
  retrieving revision 1.252
  retrieving revision 1.253
  diff -u -r1.252 -r1.253
  --- ap_config.h   1999/03/16 16:16:07 1.252
  +++ ap_config.h   1999/04/08 11:36:32 1.253
  @@ -746,6 +746,7 @@
   #define NO_KILLPG
   #define NEED_STRCASECMP
   #define NEED_STRNCASECMP
  +#define NEED_PROCESS_H
   #define NO_SETSID
   #define NO_TIMES
   #define CASE_BLIND_FILESYSTEM
  
  
  
  1.107 +50 -2 apache-1.3/src/main/alloc.c
  
  Index: alloc.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/alloc.c,v
  retrieving revision 1.106
  retrieving revision 1.107
  diff -u -r1.106 -r1.107
  --- alloc.c   1999/03/07 14:05:34 1.106
  +++ alloc.c   1999/04/08 11:36:33 1.107
  @@ -1671,9 +1671,9 @@
   
   API_EXPORT(void) ap_cleanup_for_exec(void)
   {
  -#ifndef WIN32
  +#if !defined(WIN32)  !defined(OS2)
   /*
  - * Don't need to do anything on NT, because I
  + * Don't need to do anything on NT or OS/2, because I
* am actually going to spawn the new process - not
* exec it. All handles that are not inheritable, will
* be automajically closed. The only problem is with
  @@ -2140,6 +2140,54 @@
 * unblock alarms and return the pid
 */
   
  +}
  +#elif defined(OS2)
  +{
  +int save_in=-1, save_out=-1, save_err=-1;
  +
  +if (pipe_out) {
  +save_out = dup(STDOUT_FILENO);
  +dup2(out_fds[1], STDOUT_FILENO);
  +close(out_fds[1]);
  +}
  +
  +if (pipe_in) {
  +save_in = dup(STDIN_FILENO);
  +dup2(in_fds[0], STDIN_FILENO);
  +close(in_fds[0]);
  +}
  +
  +if (pipe_err) {
  +save_err = dup(STDERR_FILENO);
  +dup2(err_fds[1], STDERR_FILENO);
  +close(err_fds[1]);
  +}
  +
  +pid = func(data, NULL);
  +
  +if ( pid )
  +ap_note_subprocess(p, pid, kill_how);
  +
  +if (pipe_out) {
  +close(STDOUT_FILENO);
  +dup2(save_out, STDOUT_FILENO);
  +close(save_out);
  +*pipe_out = out_fds[0];
  +}
  +
  +if (pipe_in) {
  +close(STDIN_FILENO);
  +dup2(save_in, STDIN_FILENO);
  +close(save_in);
  +*pipe_in = in_fds[1];
  +}
  +
  +if (pipe_err) {
  +close(STDERR_FILENO);
  +dup2(save_err, STDERR_FILENO);
  +close(save_err);
  +*pipe_err = err_fds[0];
  +}
   }
   #else
   
  
  
  
  1.140 +8 -30 apache-1.3/src/main/util_script.c
  
  Index: util_script.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/util_script.c,v
  retrieving revision 1.139
  retrieving revision 1.140
  diff -u -r1.139 -r1.140
  --- util_script.c 1999/03/10 18:09:44 1.139
  +++ util_script.c 1999/04/08 11:36:33 1.140
  @@ -695,7 +695,7 @@
   
   #endif
   
  -#ifndef WIN32
  +#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
  @@ -770,52 +770,30 @@
}
   
if ((!r-args) || (!r-args[0]) || strchr(r-args, '=')) {
  - int emxloop;
  - char *emxtemp;
  -
  - /* For OS/2 place the variables in the current
  -  * environment then it will be inherited. This way
  -  * the program will also get all of OS/2's other SETs.
  -  */
  - for (emxloop = 0; ((emxtemp = env[emxloop]) != NULL); emxloop++) {
  - putenv(emxtemp);
  - }
  -
/* More additions by Alec Kloss for OS/2 */
if (is_script) {
/* here's the stuff to run the interpreter */
  - execl(interpreter + 2, interpreter + 2, r-filename, NULL);
  + pid = spawnle(P_NOWAIT, interpreter + 2, interpreter + 2, 
r-filename, NULL, env);
}
else if (strstr(strupr(r-filename), .CMD)  0) {
/* Special case to 

cvs commit: apache-site/mirrors index.html mirrors.list

1999-04-08 Thread rse
rse 99/04/08 04:58:15

  Modified:mirrors  index.html mirrors.list
  Log:
  Update mirror list according to following request from
  John Leveron [EMAIL PROTECTED]:
  
  | We're now fully up at both
  |
  | http://apache.missouri.edu/
  | and
  | ftp://apache.missouri.edu/pub/apache/dist/
  |
  | http://apache.utw.com/ is down, and has been for a log time, so if you
  | can notify whoever maintains the mirror.list file in the dist, to
  | please remove them.
  |
  | My entry should ideally read:
  | httpus  http://apache.missouri.edu/
  | [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.62  +4 -2  apache-site/mirrors/index.html
  
  Index: index.html
  ===
  RCS file: /home/cvs/apache-site/mirrors/index.html,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- index.html1999/02/11 05:12:53 1.61
  +++ index.html1999/04/08 11:58:14 1.62
  @@ -225,8 +225,8 @@
   !-- [EMAIL PROTECTED] --
   A HREF=http://ftp.epix.net/apache/;us/A -
   !-- archive@epix.net --
  -A HREF=http://apache.utw.com/;us/A -
  -!-- [EMAIL PROTECTED] --
  +A HREF=http://apache.missouri.edu/;us/A -
  +!-- [EMAIL PROTECTED] --
   A HREF=http://www.ameth.org/apache/;us/A -
   !-- [EMAIL PROTECTED] --
   A HREF=http://apache.technomancer.com/;us/A -
  @@ -427,6 +427,8 @@
   A HREF=ftp://ftp.iodynamics.com/pub/mirror/apache/dist/;us/A -
   !--  --
   A HREF=ftp://apache.nextpath.com/pub/apache/dist/;us/A -
  +!--  --
  +A HREF=ftp://apache.missouri.edu/pub/apache/dist/;us/A -
   !--  --
   A HREF=ftp://ftp.is.co.za/internet/www/servers/apache/;za/A -
   !--  --
  
  
  
  1.74  +2 -1  apache-site/mirrors/mirrors.list
  
  Index: mirrors.list
  ===
  RCS file: /home/cvs/apache-site/mirrors/mirrors.list,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- mirrors.list  1999/02/11 05:12:52 1.73
  +++ mirrors.list  1999/04/08 11:58:14 1.74
  @@ -99,7 +99,7 @@
   http us  http://www.rge.com/pub/infosystems/apache/  [EMAIL 
PROTECTED]
   http us  http://apache.compuex.com/  [EMAIL PROTECTED]
   http us  http://ftp.epix.net/apache/ archive@epix.net
  -http us  http://apache.utw.com/  [EMAIL PROTECTED]
  +http us  http://apache.missouri.edu/ [EMAIL PROTECTED]
   http us  http://www.ameth.org/apache/[EMAIL PROTECTED]
   http us  http://apache.technomancer.com/ [EMAIL PROTECTED]
   http us  http://apache.plinet.com/   [EMAIL PROTECTED]
  @@ -198,6 +198,7 @@
   ftp  us  ftp://ftp.mtnranch.net/pub/apache/dist/ [EMAIL PROTECTED]
   ftp  us  ftp://ftp.iodynamics.com/pub/mirror/apache/dist/
   ftp  us  ftp://apache.nextpath.com/pub/apache/dist/
  +ftp  us  ftp://apache.missouri.edu/pub/apache/dist/
   ftp  za  ftp://ftp.is.co.za/internet/www/servers/apache/
   ftp  za  ftp://ftpza.co.za/mirrors/apache/
   ftp  za  ftp://ftp.saix.net/pub/apache/
  
  
  


cvs commit: apache-apr/pthreads/src CHANGES

1999-04-08 Thread rbb
rbb 99/04/08 07:37:18

  Modified:pthreads/src CHANGES
  Log:
  Updateing the CHANGES for changes in apache-apr.
  
  Revision  ChangesPath
  1.4   +19 -0 apache-apr/pthreads/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-apr/pthreads/src/CHANGES,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CHANGES   1999/03/17 17:00:33 1.3
  +++ CHANGES   1999/04/08 14:37:15 1.4
  @@ -1,3 +1,22 @@
  +Changes with Apache apr
  +
  +  *) user and ap_auth_type fields were moved from connection_rec to 
  + request_rec. [Ryan Bloom [EMAIL PROTECTED] 
  +
  +  *) Argument added to ap_bgets, ap_bwrite, buff_read, buff_write, saferead,
  + read_with_errors, write_it_all, write_with_errors, bcwrite.  This 
argument
  + is the seconds argument, if zero the call blocks and trys to read or 
write
  + the data until an error occurs, or until it is successful.  If non-zero,
  + the call reads or writes for n seconds, or until it is successful. [Ryan
  + Bloom [EMAIL PROTECTED]
  +
  +  *) Sendwithtimeout and recvwithtimeout calls added to non-Windows 
platforms.
  + This brings the code path closer together for all platforms. [Ryan Bloom
  + [EMAIL PROTECTED]
  +
  +  *) Removed the ap_block_alarms and ap_unblock_alarm calls.  These aren't
  + needed in a threaded server.
  +
   Changes with Apache 1.3.5
   
 *) PORT: Switch back to using fcntl() locking on Linux -- instabilities
  
  
  


cvs commit: apache-apr/include apr_file_io.h

1999-04-08 Thread rbb
rbb 99/04/08 10:09:36

  Modified:apr/file_io/unix open.c
   apr/test testfile.c
   docs fileio.txt
   include  apr_file_io.h
  Log:
  Added a function to remove files.  apr_remove_file.  Also all the needed
  test functions to make sure it works.
  
  Revision  ChangesPath
  1.10  +11 -0 apache-apr/apr/file_io/unix/open.c
  
  Index: open.c
  ===
  RCS file: /home/cvs/apache-apr/apr/file_io/unix/open.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- open.c1999/02/25 21:33:43 1.9
  +++ open.c1999/04/08 17:09:30 1.10
  @@ -137,3 +137,14 @@
/* Are there any error conditions other than EINTR or EBADF? */
   }
   }
  +
  +apr_status_t apr_remove_file(char *path)
  +{
  +if (unlink(path) == 0) {
  +return APR_SUCCESS;
  +}
  +else {
  +return APR_FAILURE;
  +}
  +}
  +
  
  
  
  1.6   +58 -0 apache-apr/apr/test/testfile.c
  
  Index: testfile.c
  ===
  RCS file: /home/cvs/apache-apr/apr/test/testfile.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- testfile.c1999/04/07 20:42:05 1.5
  +++ testfile.c1999/04/08 17:09:31 1.6
  @@ -62,6 +62,8 @@
   #include unistd.h
   #endif
   
  +int test_filedel(void);
  +
   int main()
   {
   apr_file_t *thefile = NULL;
  @@ -145,5 +147,61 @@
   else {
   fprintf(stdout, OK\n);
   }
  +
  +fprintf(stdout, Deleting file...);
  +status = apr_remove_file(thefile-fname);
  +if (status == APR_FAILURE) {
  +fprintf(stderr, Couldn't delete the file\n);
  +exit(-1); 
  +}
  +else {
  +fprintf(stdout, OK\n);
  +}
  +
  +fprintf(stdout, Making sure it's gone...);
  +thefile = apr_open(filename, APR_READ, 444);
  +if (thefile != NULL) {
  +fprintf(stderr, I could open the file for some reason?\n);
  +exit(-1);
  +}
  +else {
  +fprintf(stdout, OK\n);
  +}
  +
  +fprintf(stdout, Deleting file while still open...);
  +if (test_filedel() == APR_FAILURE) {
  +fprintf(stderr, Something happened, please look into it.\n);
  +exit(-1);
  +}
  +else {
  +fprintf(stdout, OK\n);
  +}
  +
   return 1;
  +}
  +
  +int test_filedel(void)
  +{
  +apr_file_t *thefile;
  +apr_int32_t flag = APR_READ | APR_WRITE | APR_CREATE;
  +
  +thefile = apr_open(testdel, flag, 444);
  +if (thefile == NULL) {
  + return APR_FAILURE;
  +}
  +
  +if (apr_remove_file(thefile-fname) == APR_FAILURE) {
  +return APR_FAILURE;
  +}
  +
  +if (apr_close(thefile) == APR_FAILURE) {
  +return APR_FAILURE;
  +}
  +
  +thefile = apr_open(testdel, APR_READ, 444);
  +if (thefile != NULL) {
  +return APR_FAILURE;
  +}
  +
  +return APR_SUCCESS;
   }
  
  
  
  1.8   +8 -0  apache-apr/docs/fileio.txt
  
  Index: fileio.txt
  ===
  RCS file: /home/cvs/apache-apr/docs/fileio.txt,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- fileio.txt1999/04/07 20:42:07 1.7
  +++ fileio.txt1999/04/08 17:09:32 1.8
  @@ -98,6 +98,14 @@
   APR_END -- add the offset to the current file size.
return) Offset into file that the pointer was set to.
   
  + apr_status_t apr_rem_file(char *)
  +Removes the file pointed to by the character string
  + Arguments:
  +arg 1)  The full path of the file to delete.
  +return) APR_SUCCESS or APR_FAILURE.
  +Notes:  If the file is still open, it will not actually be removed until the
  +all references of the file are closed.
  +
APRStatus apr_access(char *, APRFilePerms)
Determine the Accessibility of a file
Arguments:
  
  
  
  1.10  +1 -0  apache-apr/include/apr_file_io.h
  
  Index: apr_file_io.h
  ===
  RCS file: /home/cvs/apache-apr/include/apr_file_io.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- apr_file_io.h 1999/04/08 02:36:26 1.9
  +++ apr_file_io.h 1999/04/08 17:09:34 1.10
  @@ -101,6 +101,7 @@
   /*   Function definitions */
   apr_file_t *apr_open(char *, apr_int32_t, apr_fileperms_t);
   apr_status_t apr_close(apr_file_t *);
  +apr_status_t apr_remove_file(char *);
   
   apr_ssize_t apr_read(apr_file_t *, void *, apr_size_t);
   apr_ssize_t apr_write(apr_file_t *, void *, apr_size_t);
  
  
  


cvs commit: apache-1.3/src/os/win32 registry.c registry.h service.c service.h

1999-04-08 Thread stoddard
stoddard99/04/08 13:26:28

  Modified:src/main http_main.c
   src/os/win32 registry.c registry.h service.c service.h
  Log:
  Win32 multiple services patch. Documentation to follow.
  Submitted by: Keith Wannamaker
  Reviewed by: Bill Stoddard, Ken Parzygnat
  
  Revision  ChangesPath
  1.428 +216 -66   apache-1.3/src/main/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_main.c,v
  retrieving revision 1.427
  retrieving revision 1.428
  diff -u -r1.427 -r1.428
  --- http_main.c   1999/03/17 23:05:43 1.427
  +++ http_main.c   1999/04/08 20:26:24 1.428
  @@ -180,6 +180,10 @@
   #ifdef WIN32
   #include ../os/win32/service.h
   #include ../os/win32/registry.h
  +#define DEFAULTSERVICENAME Apache
  +#define PATHSEPARATOR '\\'
  +#else
  +#define PATHSEPARATOR '/'
   #endif
   
   
  @@ -984,6 +988,9 @@
   #endif
   fprintf(stderr,%s [-C \directive\] [-c \directive\]\n, 
pad);
   fprintf(stderr,%s [-v] [-V] [-h] [-l] [-L] [-S] [-t]\n, pad);
  +#ifdef WIN32
  +fprintf(stderr,%s [-n service] [-k signal] [-i] [-u]\n, pad);
  +#endif
   fprintf(stderr, Options:\n);
   #ifdef SHARED_CORE
   fprintf(stderr,   -R directory : specify an alternate location for 
shared object files\n);
  @@ -1001,8 +1008,12 @@
   fprintf(stderr,   -S   : show parsed settings (currently 
only vhost settings)\n);
   fprintf(stderr,   -t   : run syntax test for configuration 
files only\n);
   #ifdef WIN32
  +fprintf(stderr,   -n name  : set service name and use its 
ServerConfigFile\n);
   fprintf(stderr,   -k shutdown  : tell running Apache to 
shutdown\n);
   fprintf(stderr,   -k restart   : tell running Apache to do a 
graceful restart\n);
  +fprintf(stderr,   -k start : tell Apache to start\n);
  +fprintf(stderr,   -i   : install an Apache service\n);
  +fprintf(stderr,   -u   : uninstall an Apache service\n);
   #endif
   exit(1);
   }
  @@ -3465,7 +3476,7 @@
* some of it is #ifdef'd but was duplicated before anyhow.  This stuff
* is still a mess.
*/
  -static void common_init(void)
  +void common_init(void)
   {
   INIT_SIGLIST()
   #ifdef AUX3
  @@ -4485,7 +4496,7 @@
   
   common_init();
   
  -if ((s = strrchr(argv[0], '/')) != NULL) {
  +if ((s = strrchr(argv[0], PATHSEPARATOR)) != NULL) {
ap_server_argv0 = ++s;
   }
   else {
  @@ -5434,7 +5445,13 @@
   {
   char buf[40], mod[200];
   int i, rv;
  -char **pass_argv = (char **) alloca(sizeof(char *) * (argc + 3));
  +
  +#ifdef WIN32
  +#define NUMCHILDARGS  4
  +#else
  +#define NUMCHILDARGS  2
  +#endif
  +char **pass_argv = (char **) alloca(sizeof(char *) * (argc + 
NUMCHILDARGS + 1));
   
   /* We need an event to tell the child process to kill itself when
* the parent is doing a shutdown/restart. This will be named
  @@ -5456,10 +5473,14 @@
   pass_argv[0] = argv[0];
   pass_argv[1] = -Z;
   pass_argv[2] = buf;
  +#ifdef WIN32
  +pass_argv[3] = -f;
  +pass_argv[4] = ap_server_confname;
  +#endif
   for (i = 1; i  argc; i++) {
  - pass_argv[i + 2] = argv[i];
  +pass_argv[i + NUMCHILDARGS] = argv[i];
   }
  -pass_argv[argc + 2] = NULL;
  +pass_argv[argc + NUMCHILDARGS] = NULL;
   
   rv = GetModuleFileName(NULL, mod, sizeof(mod));
   if (rv == sizeof(mod)) {
  @@ -5533,8 +5554,47 @@
   return 0;
   }
   
  +/* To share the semaphores with other processes, we need a NULL ACL
  + * Code from MS KB Q106387
  + */
  +
  +static PSECURITY_ATTRIBUTES GetNullACL()
  +{
  +PSECURITY_DESCRIPTOR pSD;
  +PSECURITY_ATTRIBUTES sa;
  +
  +sa  = (PSECURITY_ATTRIBUTES) LocalAlloc(LPTR, sizeof 
(SECURITY_ATTRIBUTES));
  +pSD = (PSECURITY_DESCRIPTOR) LocalAlloc(LPTR, 
SECURITY_DESCRIPTOR_MIN_LENGTH);
  +if (pSD == NULL || sa == NULL)
  +return NULL;
  +if (!InitializeSecurityDescriptor(pSD, SECURITY_DESCRIPTOR_REVISION)) {
  +LocalFree( pSD );
  +LocalFree( sa );
  +return NULL;
  +}
  +if (!SetSecurityDescriptorDacl(pSD, TRUE, (PACL) NULL, FALSE)) {
  +LocalFree( pSD );
  +LocalFree( sa );
  +return NULL;
  +}
  +sa-nLength = sizeof(sa);
  +sa-lpSecurityDescriptor = pSD;
  +sa-bInheritHandle = TRUE;
  +return sa;
  +}
  +
  +
  +static void CleanNullACL( void *sa ) {
  +if( sa ) {
  +LocalFree( ((PSECURITY_ATTRIBUTES)sa)-lpSecurityDescriptor);
  +LocalFree( sa );
  +}
  +}
  +
   int master_main(int argc, char **argv)
   {
  +/* returns NULL if invalid (Win95?) */
  +PSECURITY_ATTRIBUTES sa = GetNullACL();
   int nchild = ap_daemons_to_start;
   event **ev;
   int *child;
  @@ -5560,20 +5620,23 @@

cvs commit: apache-1.3/src/modules/proxy proxy_cache.c

1999-04-08 Thread dirkx
dirkx   99/04/08 13:27:46

  Modified:src/modules/proxy proxy_cache.c
  Log:
  Modified cache garbage control to first check if it
  actually should run, based on the time of last run,
  and to try to get a lock; prior to actually forking
  and doing the real cleanup. This effectively avoids
  a fork after each and every request; and limites
  the spawning to just once every few hours.
  
  Revision  ChangesPath
  1.57  +77 -46apache-1.3/src/modules/proxy/proxy_cache.c
  
  Index: proxy_cache.c
  ===
  RCS file: /x3/home/cvs/apache-1.3/src/modules/proxy/proxy_cache.c,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- proxy_cache.c 1999/03/23 14:48:09 1.56
  +++ proxy_cache.c 1999/04/08 20:27:44 1.57
  @@ -102,7 +102,7 @@
   #define ROUNDUP2BLOCKS(_bytes) (((_bytes)+block_size-1)  ~(block_size-1))
   static long block_size = 512;/* this must be a power of 2 */
   static long61_t curbytes, cachesize;
  -static time_t every, garbage_now, garbage_expire;
  +static time_t garbage_now, garbage_expire;
   static char *filename;
   static mutex *garbage_mutex = NULL;
   
  @@ -119,6 +119,7 @@
   static int sub_garbage_coll(request_rec *r, array_header *files,
const char *cachedir, const char *cachesubdir);
   static void help_proxy_garbage_coll(request_rec *r);
  +static int should_proxy_garbage_coll(request_rec *r);
   #if !defined(WIN32)  !defined(MPE)  !defined(OS2)
   static void detached_proxy_garbage_coll(request_rec *r);
   #endif
  @@ -138,10 +139,11 @@
   (void) ap_release_mutex(garbage_mutex);
   
   ap_block_alarms();   /* avoid SIGALRM on big cache cleanup */
  +if (should_proxy_garbage_coll(r))
   #if !defined(WIN32)  !defined(MPE)  !defined(OS2)
  -detached_proxy_garbage_coll(r);
  +detached_proxy_garbage_coll(r);
   #else
  -help_proxy_garbage_coll(r);
  +help_proxy_garbage_coll(r);
   #endif
   ap_unblock_alarms();
   
  @@ -205,6 +207,10 @@
   int status;
   pid_t pgrp;
   
  +#if 0
  +ap_log_error(APLOG_MARK, APLOG_DEBUG, r-server,
  +  proxy: Guess what; we fork() again...);
  +#endif
   switch (pid = fork()) {
case -1:
ap_log_error(APLOG_MARK, APLOG_ERR, r-server,
  @@ -264,27 +270,25 @@
   }
   #endif /* ndef WIN32 */
   
  -static void help_proxy_garbage_coll(request_rec *r)
  +#define DOT_TIME /.time/* marker */
  +
  +static int should_proxy_garbage_coll(request_rec *r)
   {
  -const char *cachedir;
   void *sconf = r-server-module_config;
   proxy_server_conf *pconf =
   (proxy_server_conf *) ap_get_module_config(sconf, proxy_module);
   const struct cache_conf *conf = pconf-cache;
  -array_header *files;
  -struct stat buf;
  -struct gc_ent *fent;
  -int i, timefd;
  -static time_t lastcheck = BAD_DATE;  /* static (per-process) 
data!!! */
   
  -cachedir = conf-root;
  -/* configured size is given in kB. Make it bytes, convert to long61_t: */
  -cachesize.lower = cachesize.upper = 0;
  -add_long61(cachesize, conf-space  10);
  -every = conf-gcinterval;
  +const char *cachedir = conf-root;
  +char filename[ strlen(cachedir) + strlen( DOT_TIME ) +1];
  +struct stat buf;
  +int timefd;
  +time_t every = conf-gcinterval;
  +static time_t lastcheck = BAD_DATE; /* static (per-process) 
data!!! */
   
   if (cachedir == NULL || every == -1)
  - return;
  +return 0;
  +
   garbage_now = time(NULL);
   /* Usually, the modification time of cachedir/.time can only increase.
* Thus, even with several child processes having their own copy of
  @@ -292,41 +296,68 @@
* for GC yet.
*/
   if (garbage_now != -1  lastcheck != BAD_DATE  garbage_now  
lastcheck + every)
  - return;
  +return 0;
   
  -ap_block_alarms();   /* avoid SIGALRM on big cache cleanup */
  +strcpy(filename,cachedir);
  +strcat(filename,DOT_TIME);
   
  -filename = ap_palloc(r-pool, strlen(cachedir) + HASH_LEN + 2);
  -strcpy(filename, cachedir);
  -strcat(filename, /.time);
  -if (stat(filename, buf) == -1) {/* does not exist */
  - if (errno != ENOENT) {
  - ap_log_error(APLOG_MARK, APLOG_ERR, r-server,
  -  proxy: stat(%s), filename);
  - ap_unblock_alarms();
  - return;
  - }
  - if ((timefd = creat(filename, 0666)) == -1) {
  - if (errno != EEXIST)
  - ap_log_error(APLOG_MARK, APLOG_ERR, r-server,
  -  proxy: creat(%s), filename);
  - else
  - lastcheck = garbage_now;/* someone else got in there */
  - ap_unblock_alarms();
  - return;
  - }
  - close(timefd);
  +/* At this point we have 

cvs commit: apache-1.3/src/support htpasswd.c

1999-04-08 Thread coar
coar99/04/08 13:56:44

  Modified:src  CHANGES
   src/ap   ap_md5c.c
   src/include ap_md5.h
   src/main http_core.c util_md5.c
   src/support htpasswd.c
  Log:
Passwords, as user input, may not be 7-bit ASCII -- so we need
to treat them as unsigned char*'s.  No surprises there; this
just regularises the usage so we don't get compilation messages.
  
  Revision  ChangesPath
  1.1300+4 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1299
  retrieving revision 1.1300
  diff -u -r1.1299 -r1.1300
  --- CHANGES   1999/04/08 11:36:37 1.1299
  +++ CHANGES   1999/04/08 20:56:34 1.1300
  @@ -1,4 +1,8 @@
   Changes with Apache 1.3.7
  +  *) Correct the signed/unsigned character handling for the MD5 routines;
  + mismatches were causing compilation problems with gcc -pedantic and
  + in the TPF cross-compilation.  [Ken Coar]
  +
 *) OS/2: Rework CGI handling to use spawn*() instead of fork/exec, 
achieving
a roughly 5 fold speed up. [Brian Havard]
   
  
  
  
  1.25  +35 -25apache-1.3/src/ap/ap_md5c.c
  
  Index: ap_md5c.c
  ===
  RCS file: /home/cvs/apache-1.3/src/ap/ap_md5c.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- ap_md5c.c 1999/03/25 16:43:21 1.24
  +++ ap_md5c.c 1999/04/08 20:56:38 1.25
  @@ -181,7 +181,7 @@
   
   /* MD5 initialization. Begins an MD5 operation, writing a new context.
*/
  -API_EXPORT(void) ap_MD5Init(AP_MD5_CTX * context)
  +API_EXPORT(void) ap_MD5Init(AP_MD5_CTX *context)
   {
   context-count[0] = context-count[1] = 0;
   /* Load magic initialization constants. */
  @@ -195,8 +195,8 @@
  operation, processing another message block, and updating the
  context.
*/
  -API_EXPORT(void) ap_MD5Update(AP_MD5_CTX * context, const unsigned char 
*input,
  -unsigned int inputLen)
  +API_EXPORT(void) ap_MD5Update(AP_MD5_CTX *context, const unsigned char 
*input,
  +   unsigned int inputLen)
   {
   unsigned int i, idx, partLen;
   
  @@ -204,8 +204,10 @@
   idx = (unsigned int) ((context-count[0]  3)  0x3F);
   
   /* Update number of bits */
  -if ((context-count[0] += ((UINT4) inputLen  3))  ((UINT4) inputLen 
 3))
  +if ((context-count[0] += ((UINT4) inputLen  3))
  +  ((UINT4) inputLen  3)) {
context-count[1]++;
  +}
   context-count[1] += (UINT4) inputLen  29;
   
   partLen = 64 - idx;
  @@ -216,13 +218,15 @@
memcpy(context-buffer[idx], input, partLen);
MD5Transform(context-state, context-buffer);
   
  - for (i = partLen; i + 63  inputLen; i += 64)
  + for (i = partLen; i + 63  inputLen; i += 64) {
MD5Transform(context-state, input[i]);
  + }
   
idx = 0;
   }
  -else
  +else {
i = 0;
  +}
   
   /* Buffer remaining input */
   memcpy(context-buffer[idx], input[i], inputLen - i);
  @@ -239,8 +243,9 @@
   
idx = 0;
   }
  -else
  +else {
i = 0;
  +}
   
   /* Buffer remaining input */
   ebcdic2ascii_strictly(context-buffer[idx], input[i], inputLen - i);
  @@ -250,7 +255,7 @@
   /* MD5 finalization. Ends an MD5 message-digest operation, writing the
  the message digest and zeroizing the context.
*/
  -API_EXPORT(void) ap_MD5Final(unsigned char digest[16], AP_MD5_CTX * context)
  +API_EXPORT(void) ap_MD5Final(unsigned char digest[16], AP_MD5_CTX *context)
   {
   unsigned char bits[8];
   unsigned int idx, padLen;
  @@ -277,10 +282,10 @@
   /* Pad out to 56 mod 64. */
   idx = (unsigned int) ((context-count[0]  3)  0x3f);
   padLen = (idx  56) ? (56 - idx) : (120 - idx);
  -ap_MD5Update(context, PADDING, padLen);
  +ap_MD5Update(context, (const unsigned char *)PADDING, padLen);
   
   /* Append length (before padding) */
  -ap_MD5Update(context, bits, 8);
  +ap_MD5Update(context, (const unsigned char *)bits, 8);
   
   /* Store state in digest */
   Encode(digest, context-state, 16);
  @@ -429,7 +434,8 @@
   }
   }
   
  -API_EXPORT(void) ap_MD5Encode(const char *pw, const char *salt,
  +API_EXPORT(void) ap_MD5Encode(const unsigned char *pw,
  +   const unsigned char *salt,
  char *result, size_t nbytes)
   {
   /*
  @@ -439,9 +445,11 @@
*/
   
   char passwd[120], *p;
  -const char *sp, *ep;
  +const unsigned char *sp, *ep;
   unsigned char final[16];
  -int sl, pl, i;
  +int i;
  +unsigned int sl, pl;
  +unsigned int pwlen;
   AP_MD5_CTX ctx, ctx1;
   unsigned long l;
   
  @@ -455,7 +463,7 @@
   /*
* If 

cvs commit: apache-1.3/src/os/win32 registry.c registry.h service.c service.h

1999-04-08 Thread stoddard
stoddard99/04/08 14:04:55

  Modified:src  CHANGES
   src/main http_main.c
   src/os/win32 registry.c registry.h service.c service.h
  Log:
  Update CHANGES and get rid of the ^Z.
  
  Revision  ChangesPath
  1.1301+31 -0 apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1300
  retrieving revision 1.1301
  diff -u -r1.1300 -r1.1301
  --- CHANGES   1999/04/08 20:56:34 1.1300
  +++ CHANGES   1999/04/08 21:04:41 1.1301
  @@ -1,4 +1,34 @@
   Changes with Apache 1.3.7
  +  *) Win32: Win32 multiple services patch. Added capability to install and
  + run multiple copies of apache as individual services.
  +
  + Example 1:
  + apache -n apache1 -i -f c:/httpd.conf
  +Installs apache as service 'apache1' and associates c:/httpd.conf
  +with that service.
  + net start apache1
  +Starts apache1 service.
  + net stop apache1
  +Stops apache1 service
  +
  + Example 2:
  + apache -n apache2 -i
  +Installs apache as service 'apache2'. httpd.conf is located under
  +the default server root (/apache/conf/httpd.conf).
  + net start apache2
  +Starts apache2 service.
  +
  + Example 3:
  + apache -n apache3 -i -d c:/program files/apache
  +Install apache as service 'apache3' and sets server root to
  +c:/program files/apache.
  +
  + Example 4:
  + apache -n apache2 -k restart
  +Restart apache2 service 
  +
  + [Keith Wannamaker, Ken Parzygnat, Bill Stoddard]
  +
 *) Correct the signed/unsigned character handling for the MD5 routines;
mismatches were causing compilation problems with gcc -pedantic and
in the TPF cross-compilation.  [Ken Coar]
  @@ -6341,3 +6371,4 @@
 *) Based on NCSA httpd 1.3 by Rob McCool and patches by CERT,
Roy Fielding, Robert Thau, Nicolas Pioch, David Robinson,
Brian Behlendorf, Rob Hartill, and Cliff Skolnick
  +
  
  
  
  1.429 +1 -1  apache-1.3/src/main/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_main.c,v
  retrieving revision 1.428
  retrieving revision 1.429
  diff -u -r1.428 -r1.429
  --- http_main.c   1999/04/08 20:26:24 1.428
  +++ http_main.c   1999/04/08 21:04:43 1.429
  @@ -6297,4 +6297,4 @@
   
   #endif /* ndef SHARED_CORE_BOOTSTRAP */
   
  -
  \ No newline at end of file
  +
  
  
  
  1.20  +0 -1  apache-1.3/src/os/win32/registry.c
  
  Index: registry.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/os/win32/registry.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- registry.c1999/04/08 20:26:26 1.19
  +++ registry.c1999/04/08 21:04:46 1.20
  @@ -469,4 +469,3 @@
   return rv  0 ? -1 : 0;
   }
   
  -
  \ No newline at end of file
  
  
  
  1.3   +0 -1  apache-1.3/src/os/win32/registry.h
  
  Index: registry.h
  ===
  RCS file: /export/home/cvs/apache-1.3/src/os/win32/registry.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- registry.h1999/04/08 20:26:26 1.2
  +++ registry.h1999/04/08 21:04:46 1.3
  @@ -6,4 +6,3 @@
   extern int ap_registry_set_server_root(char *dir);
   extern int ap_registry_get_service_conf(pool *p, char *dir, int size, char 
*service_name);
   extern int ap_registry_set_service_conf(char *dir, char *service_name);
  -
  \ No newline at end of file
  
  
  
  1.13  +1 -1  apache-1.3/src/os/win32/service.c
  
  Index: service.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/os/win32/service.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- service.c 1999/04/08 20:26:26 1.12
  +++ service.c 1999/04/08 21:04:47 1.13
  @@ -428,4 +428,4 @@
   }
  
   #endif /* WIN32 */
  -
  \ No newline at end of file
  +
  
  
  
  1.4   +0 -1  apache-1.3/src/os/win32/service.h
  
  Index: service.h
  ===
  RCS file: /export/home/cvs/apache-1.3/src/os/win32/service.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- service.h 1999/04/08 20:26:27 1.3
  +++ service.h 1999/04/08 21:04:48 1.4
  @@ -15,4 +15,3 @@
   #endif /* WIN32 */
   
   #endif /* SERVICE_H */
  -
  \ No newline at end of file
  
  
  


cvs commit: apache-1.3/src/ap ap_md5c.c

1999-04-08 Thread coar
coar99/04/08 14:34:01

  Modified:src/ap   ap_md5c.c
  Log:
D'oh!  Sometimes signedness is good..
  
  Revision  ChangesPath
  1.26  +3 -2  apache-1.3/src/ap/ap_md5c.c
  
  Index: ap_md5c.c
  ===
  RCS file: /home/cvs/apache-1.3/src/ap/ap_md5c.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- ap_md5c.c 1999/04/08 20:56:38 1.25
  +++ ap_md5c.c 1999/04/08 21:34:00 1.26
  @@ -448,7 +448,8 @@
   const unsigned char *sp, *ep;
   unsigned char final[16];
   int i;
  -unsigned int sl, pl;
  +unsigned int sl;
  +int pl;
   unsigned int pwlen;
   AP_MD5_CTX ctx, ctx1;
   unsigned long l;
  @@ -509,7 +510,7 @@
   ap_MD5Update(ctx1, pw, pwlen);
   ap_MD5Final(final, ctx1);
   for(pl = pwlen; pl  0; pl -= 16) {
  - ap_MD5Update(ctx, final, (pl  16) ? 16 : pl);
  + ap_MD5Update(ctx, final, (pl  16) ? 16 : (unsigned int) pl);
   }
   
   /*
  
  
  


cvs commit: apache-1.3/htdocs/manual windows.html

1999-04-08 Thread stoddard
stoddard99/04/08 14:56:43

  Modified:htdocs/manual windows.html
  Log:
  Some documentation on the multiple services patch
  Submitted by: Keith Wannamaker
  
  Revision  ChangesPath
  1.28  +95 -30apache-1.3/htdocs/manual/windows.html
  
  Index: windows.html
  ===
  RCS file: /export/home/cvs/apache-1.3/htdocs/manual/windows.html,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- windows.html  1999/03/19 16:07:18 1.27
  +++ windows.html  1999/04/08 21:56:40 1.28
  @@ -47,7 +47,9 @@
 LIA HREF=#runRunning Apache for Windows/A
 LIA HREF=#useUsing Apache for Windows/A
 LIA HREF=#cmdlineRunning Apache for Windows from the Command Line/A
  -  LIA HREF=#signalSignalling Apache when running/A
  +  LIA HREF=#serviceRunning Apache for Windows as a Service/A
  +  LIA HREF=#signalSignalling Console Apache when running/A
  +  LIA HREF=#signalsrvSignalling Service Apache when running/A
 LIA HREF=#compCompiling Apache for Windows/A
   /UL
   
  @@ -145,7 +147,7 @@
   There are two ways you can run Apache:
   
   UL
  - LIAs a service (available on NT only). This is the best option if
  + LIAs a A HREF=#serviceservice/A (available on NT only). This is 
the best option if
   you want Apache to automatically start when you machine boots, and to
   keep Apache running when you log-off.
   
  @@ -155,12 +157,14 @@
   /UL
   
   To start Apache as a service, you first need to install it as a
  -service. Run the Install Apache as Service (NT only) option from the
  -Start menu. Once this is done you can start Apache by opening the
  -Services window (in the Control Panel), selecting Apache, then
  -clicking on Start. Apache will now be running in the background. You
  +service. Multiple Apache services can be installed, each with a
  +different name and configuration.  To install the default Apache
  +service named Apache, run the Install Apache as Service (NT only)
  +option from the Start menu. Once this is done you can start the Apache
  +service by opening the Services window (in the Control Panel), selecting 
Apache,
  +then clicking on Start. Apache will now be running in the background. You
   can later stop Apache by clicking on Stop. As an alternative to using
  -the Services window, you can start and stop Apache from the control
  +the Services window, you can start and stop the Apache service from the 
control
   line with
   
   PRE
  @@ -168,6 +172,11 @@
 NET STOP APACHE
   /PRE
   
  +See A HREF=#signalsrvSignalling Service Apache when Running/A
  +for more information on installing and controlling Apache services.
  +
  +P
  +
   To run Apache from a console window, select the Start Apache as
   console app option from the Start menu (in Apache 1.3.4 and earlier,
   this option was called Apache Server). This will open a console
  @@ -175,7 +184,7 @@
   active until you stop Apache. To stop Apache running, either select
   the Shutdown Apache console app icon option from the Start menu
   (this is not available in Apache 1.3.4 or earlier), or see A
  -HREF=#signalSignalling Apache when Running/A for how
  +HREF=#signalSignalling Console Apache when Running/A for how
   to control Apache from the command line.
   
   P
  @@ -258,6 +267,44 @@
is available./A
   /UL
   
  +H2A NAME=serviceRunning Apache for Windows as a Service/A/H2
  +
  +You can install Apache as a Windows NT service as follows:
  +
  +PRE
  +apache -i -n service name
  +/PRE
  +
  +To install a service to use a particular configuration, specify the
  +configuration file when the service is installed:
  +
  +PRE
  +apache -i -n service name -f \my server\conf\my.conf
  +/PRE
  +
  +To remove an Apache service, use
  +
  +PRE
  +apache -u -n service name
  +/PRE
  +
  +The default service name, if one is not specified, is Apache.
  +
  +P
  +
  +Once a service is installed, you can use the SAMP-n/SAMP option, in 
conjunction
  +with other options, to refer to a service's configuration file.  For 
example:br
  +
  +To test a service's configuration file:
  +PRE
  +apache -n service name -t
  +/PRE
  +
  +To start a console Apache using a service's configuration file:
  +PRE
  +apache -n service name
  +/PRE
  +
   H2A NAME=cmdlineRunning Apache for Windows from the Command 
Line/A/H2
   
   The Start menu icons and the NT Service manager can provide a simple
  @@ -266,29 +313,44 @@
   
   P
   When working with Apache it is important to know how it will find the
  -configuration files.  Apache will try one of the following, in this order.
  +configuration files.  You can specify a configuration file on the command 
line
  +in two ways:
   
   UL
  +LI-f specifies a path to a particular configuration file
  +/UL
  +PREapache -f c:\my server\conf\my.conf/PRE
  +PREapache -f test\test.conf/PRE
  +UL
  +LI-n specifies the configuration file of an 

cvs commit: apache-1.3/src/support htpasswd.1 htpasswd.c

1999-04-08 Thread coar
coar99/04/08 15:17:56

  Modified:src  CHANGES
   src/support htpasswd.1 htpasswd.c
  Log:
Allow (though discouraged) htpasswd to get the password from
the command line.  People who wanted this in the past probably
just modified htpasswd.c to do it; that's a lot more difficult
in the Win32 environment.
  
  Revision  ChangesPath
  1.1302+5 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1301
  retrieving revision 1.1302
  diff -u -r1.1301 -r1.1302
  --- CHANGES   1999/04/08 21:04:41 1.1301
  +++ CHANGES   1999/04/08 22:17:45 1.1302
  @@ -1,4 +1,9 @@
   Changes with Apache 1.3.7
  +  *) support/htpasswd now permits the password to be specified on the
  + command line with the '-b' switch.  This is useful when passwords
  + need to be maintained by scripts -- particularly in the Win32
  + environment.  [Ken Coar]
  +
 *) Win32: Win32 multiple services patch. Added capability to install and
run multiple copies of apache as individual services.
   
  
  
  
  1.9   +42 -3 apache-1.3/src/support/htpasswd.1
  
  Index: htpasswd.1
  ===
  RCS file: /home/cvs/apache-1.3/src/support/htpasswd.1,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- htpasswd.11999/01/25 22:55:40 1.8
  +++ htpasswd.11999/04/08 22:17:51 1.9
  @@ -59,12 +59,33 @@
   [
   .B \-c
   ] 
  +[
  +.B \-m
  +] 
   .I passwdfile
   .I username
  +.br
  +.B htpasswd
  +.B \-b  
  +[
  +.B \-c
  +] 
  +[
  +.B \-m
  +] 
  +.I passwdfile
  +.I username
  +.I password
   .SH DESCRIPTION
   .B htpasswd
   is used to create and update the flat-files used to store
   usernames and password for basic authentication of HTTP users.
  +If
  +.B htpasswd
  +cannot access a file, such as not being able to write to the output
  +file or not being able to read the file in order to update it,
  +it returns an error status and makes no changes.
  +.PP
   Resources available from the
   .B httpd
   Apache web server can be restricted to just the users listed
  @@ -82,20 +103,38 @@
   the Apache manual, which is part of the Apache distribution or can be
   found at http://www.apache.org/.
   .SH OPTIONS
  +.IP \-b 
  +Use batch mode; \fIi.e.\fP, get the password from the command line
  +rather than prompting for it. \fBThis option should be used with
  +extreme care, since the password is clearly visible on the command
  +line.\fP
   .IP \-c 
   Create the \fIpasswdfile\fP. If \fIpasswdfile\fP already exists, it
  -is deleted first. 
  +is rewritten and truncated.
   .IP \-m 
   Use MD5 encryption for passwords.  On Windows, this is the only format 
   supported.
   .IP \fB\fIpasswdfile\fP
   Name of the file to contain the user name and password. If \-c
   is given, this file is created if it does not already exist,
  -or deleted and recreated if it does exist. 
  +or rewritten and truncated if it does exist. 
   .IP \fB\fIusername\fP
   The username to create or update in \fBpasswdfile\fP. If
  -\fIusername\fP does not exist is this file, an entry is added. If it
  +\fIusername\fP does not exist in this file, an entry is added. If it
   does exist, the password is changed.
  +.IP \fB\fIpassword\fP
  +The plaintext password to be encrypted and stored in the file.  Only used
  +with the \fI-b\fP flag.
  +.SH EXIT STATUS
  +.B htpasswd
  +returns a zero status (true) if the username and password have
  +been successfully added or updated in the \fIpasswdfile\fP.
  +.B htpasswd
  +returns 1 if it encounters some problem accessing files, 2 if there
  +was a syntax problem with the command line, 3 if the password was
  +entered interactively and the verification entry didn't match, 4 if
  +its operation was interrupted, and 5 if a value is too long (username,
  +filename, password, or final computed record).
   .SH SEE ALSO
   .BR httpd(8)
   .
  
  
  
  1.26  +44 -13apache-1.3/src/support/htpasswd.c
  
  Index: htpasswd.c
  ===
  RCS file: /home/cvs/apache-1.3/src/support/htpasswd.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- htpasswd.c1999/04/08 20:56:44 1.25
  +++ htpasswd.c1999/04/08 22:17:53 1.26
  @@ -230,17 +230,23 @@
* indicates success; failure means that the output buffer contains an
* error message instead.
*/
  -static int mkrecord(char *user, char *record, size_t rlen, int alg)
  +static int mkrecord(char *user, char *record, size_t rlen, char *passwd,
  + int alg)
   {
   char *pw;
   char cpw[120];
   char salt[9];
   
  -pw = strd((char *) getpass(New password: ));
  -if (strcmp(pw, (char *) getpass(Re-type 

cvs commit: apache-apr/pthreads/src/os/unix os.h

1999-04-08 Thread fielding
fielding99/04/08 15:42:21

  Modified:pthreads/src/os/unix os.h
  Log:
  Add prototypes for ap_spawnvp().
  
  Revision  ChangesPath
  1.4   +2 -0  apache-apr/pthreads/src/os/unix/os.h
  
  Index: os.h
  ===
  RCS file: /home/cvs/apache-apr/pthreads/src/os/unix/os.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- os.h  1999/02/07 06:30:14 1.3
  +++ os.h  1999/04/08 22:42:20 1.4
  @@ -75,6 +75,7 @@
   #define INLINE extern ap_inline
   
   INLINE int ap_os_is_path_absolute(const char *file);
  +INLINE int ap_spawnvp(const char *file, char *const argv[]);
   
   #include os-inline.c
   
  @@ -84,6 +85,7 @@
* as normal
*/
   extern int ap_os_is_path_absolute(const char *file);
  +extern int ap_spawnvp(const char *file, char *const argv[]);
   #endif
   
   /* Other ap_os_ routines not used by this platform */