cvs commit: apache-1.3 STATUS
brian 98/05/08 17:17:39 Modified:.STATUS Log: garbage in, garbage out :) removed the whole server string thing, added two items from the list so we don't forget. Revision ChangesPath 1.390 +7 -14 apache-1.3/STATUS Index: STATUS === RCS file: /export/home/cvs/apache-1.3/STATUS,v retrieving revision 1.389 retrieving revision 1.390 diff -u -r1.389 -r1.390 --- STATUS1998/05/08 21:53:25 1.389 +++ STATUS1998/05/09 00:17:38 1.390 @@ -134,20 +134,6 @@ Open issues: -* What do to about SERVER_SUBVERSION now? - STATUS: - o Scrap it now that modules can use ap_add_version_component - Jim +1 (make sure this is clear :) ), Brian +1, Ken +1 - Dean: -1, and I am also vetoing the new AddVersionComponent - directive. My reason is: if a module is "significant" then - it will ap_add_version_component(); if a patch is - "significant" then it can modify SERVER_SUBVERSION. There are - no other *code* changes possible that the admin should be - noting. If folks really want to play the customized server - version game they can recompile, or build a module to do it. - If we put it in the default server we'll end up seeing lots of - funny (read: annoying) false things start to appear. - * Paul would like to see a 'gdbm' option because he uses it a lot. @@ -304,6 +290,11 @@ * signal type handling - how to rotate logs from command line? +* Currently if you double click on the conf files or the + log files you get a useless dialog offering the set of all + execuables, usually after a very long pause. Ought + to stuff .conf in the registry mapping it to text. + Delayed until after 1.3.0, unless someone happens to get to it: * Arnt Gulbrandsen <[EMAIL PROTECTED]> 03 Apr 1998 21:28:17 +0200 @@ -352,4 +343,6 @@ 3) byte range error handling 4) update the Accept-Encoding parser to allow q-values 5) would be nice if the proxy used Via and Max-Forwards, even as HTTP/1.0 + +* #ifdef __EMX__ --> #ifdef OS2.
cvs commit: apache-1.3/src/main http_main.c
jim 98/05/08 18:21:48 Modified:src/main http_main.c Log: Fix the order of how the server_version string is built... All extra components are tacked to the _end_ of the string. The front of the server_version string is always SERVER_BASEVERSION. So if we have "Apache/1.3b7-dev (FreeBSD)" and the code gets ap_add_version_component("PHP/3.0") we'd get: "Apache/1.3b7-dev (FreeBSD) PHP/3.0" Revision ChangesPath 1.340 +4 -4 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.339 retrieving revision 1.340 diff -u -r1.339 -r1.340 --- http_main.c 1998/05/08 23:58:36 1.339 +++ http_main.c 1998/05/09 01:21:47 1.340 @@ -378,7 +378,7 @@ /* * Prepend the given component identifier to the existing string */ - server_version = ap_pstrcat(pconf, component, " ", server_version, + server_version = ap_pstrcat(pconf, server_version, " ", component, NULL); } } @@ -390,15 +390,15 @@ */ static void ap_set_version() { -#ifdef SERVER_SUBVERSION -ap_add_version_component(SERVER_SUBVERSION); -#endif if (ap_note_platform) { ap_add_version_component(SERVER_BASEVERSION " (" PLATFORM ")"); } else { ap_add_version_component(SERVER_BASEVERSION); } +#ifdef SERVER_SUBVERSION +ap_add_version_component(SERVER_SUBVERSION); +#endif version_locked++; }
cvs commit: apache-1.3 STATUS
jim 98/05/08 18:23:12 Modified:.STATUS Log: Some votes Revision ChangesPath 1.391 +1 -2 apache-1.3/STATUS Index: STATUS === RCS file: /export/home/cvs/apache-1.3/STATUS,v retrieving revision 1.390 retrieving revision 1.391 diff -u -r1.390 -r1.391 --- STATUS1998/05/09 00:17:38 1.390 +++ STATUS1998/05/09 01:23:12 1.391 @@ -21,8 +21,7 @@ * The DoS issue about symlinks to /dev/zero is still present. A device checker patch had been sent to the list a while ago. PATCH: <[EMAIL PROTECTED]> - Status: Jim +1 -Dean: -0 I really don't like the API change. + Status: Jim +1, Brian +1, Dean +1 (ASSUMED: the API is intact) WIN32 1.3 FINAL RELEASE SHOWSTOPPERS:
cvs commit: apache-1.3 STATUS
brian 98/05/08 19:28:32 Modified:src/modules/standard mod_cgi.c mod_include.c src CHANGES .STATUS Log: This is a fix to make this not a show-stopper anymore. Making a promise and breaking it every now and then is worse than not making that promise. Revision ChangesPath 1.77 +2 -0 apache-1.3/src/modules/standard/mod_cgi.c Index: mod_cgi.c === RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_cgi.c,v retrieving revision 1.76 retrieving revision 1.77 diff -u -r1.76 -r1.77 --- mod_cgi.c 1998/04/22 15:06:45 1.76 +++ mod_cgi.c 1998/05/09 02:28:22 1.77 @@ -315,7 +315,9 @@ fprintf(dbg, "'%s'\n", env[i]); #endif +#ifndef WIN32 ap_chdir_file(r->filename); +#endif if (!cld->debug) ap_error_log2stderr(r->server); 1.85 +10 -1 apache-1.3/src/modules/standard/mod_include.c Index: mod_include.c === RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_include.c,v retrieving revision 1.84 retrieving revision 1.85 diff -u -r1.84 -r1.85 --- mod_include.c 1998/05/02 19:06:05 1.84 +++ mod_include.c 1998/05/09 02:28:22 1.85 @@ -607,7 +607,9 @@ } ap_destroy_sub_req(rr); +#ifndef WIN32 ap_chdir_file(r->filename); +#endif return 0; } @@ -699,8 +701,9 @@ if (!error_fmt && ap_run_sub_req(rr)) { error_fmt = "unable to include \"%s\" in parsed file %s"; } +#ifndef WIN32 ap_chdir_file(r->filename); - +#endif if (error_fmt) { ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r->server, error_fmt, tag_val, r->filename); @@ -845,7 +848,9 @@ ap_rputs(error, r); } /* just in case some stooge changed directories */ +#ifndef WIN32 ap_chdir_file(r->filename); +#endif } else if (!strcmp(tag, "cgi")) { parse_string(r, tag_val, parsed_string, sizeof(parsed_string), 0); @@ -855,7 +860,9 @@ ap_rputs(error, r); } /* grumble groan */ +#ifndef WIN32 ap_chdir_file(r->filename); +#endif } else if (!strcmp(tag, "done")) { return 0; @@ -2080,7 +2087,9 @@ printing = conditional_status = 1; if_nesting = 0; +#ifndef WIN32 ap_chdir_file(r->filename); +#endif if (r->args) { /* add QUERY stuff to env cause it ain't yet */ char *arg_copy = ap_pstrdup(r->pool, r->args); 1.836 +9 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.835 retrieving revision 1.836 diff -u -r1.835 -r1.836 --- CHANGES 1998/05/08 23:41:32 1.835 +++ CHANGES 1998/05/09 02:28:28 1.836 @@ -1,5 +1,14 @@ Changes with Apache 1.3b7 + *) chdir() doesn't make sense in a multithreaded environment like WIN32. + Before, Win32 CGI's could have had sporadic failures if a chdir call + from one thread was made between another chdir call and a spawn in + another thread. So, for now don't chdir for CGI scripts in WIN32. + The current CGI "spec" is unclear as to whether it's necessary. Long- + term fix is to either serialize the chdir/spawn combo or use WIN32 + native calls to spawn a process. This temp fix was necessary to remove + this as a showstopper for 1.3's release. [Brian Behlendorf] + *) Cleanup the suEXEC support in APACI and make it more safe: 1. Add big fat hint in INSTALL about risks and to read the htdocs/manual/suexec.html document before using the suexec-related 1.392 +4 -2 apache-1.3/STATUS Index: STATUS === RCS file: /export/home/cvs/apache-1.3/STATUS,v retrieving revision 1.391 retrieving revision 1.392 diff -u -r1.391 -r1.392 --- STATUS1998/05/09 01:23:12 1.391 +++ STATUS1998/05/09 02:28:31 1.392 @@ -32,8 +32,6 @@ for buffer overflow, someone should rewrite or verify they're safe -* bad use of chdir in some places; it isn't thread-specific - Documentation that needs writing: * Documentation for: @@ -195,6 +193,10 @@ Ken: What's W95-specific about it? Help: + +* chdir() for CGI scripts and mod_include #exec needs to be + re-implemented. This requires either serializing chdir/spawn + or using a native Win32 CreateProc
cvs commit: apache-1.3/src/main http_main.c
dgaudet 98/05/08 20:25:44 Modified:src CHANGES PORTING src/include conf.h src/main http_main.c Log: The parent does the child signal reporting now. Adds SYS_SIGLIST. Revision ChangesPath 1.837 +5 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.836 retrieving revision 1.837 diff -u -r1.836 -r1.837 --- CHANGES 1998/05/09 02:28:28 1.836 +++ CHANGES 1998/05/09 03:25:40 1.837 @@ -1,5 +1,10 @@ Changes with Apache 1.3b7 + *) Apache will now log the reason its httpd children exit if they exit + due to an unexpected signal. (It requires a new porting define, + SYS_SIGLIST, which if defined should point to a list of text + descriptions of the signals available. See PORTING.) [Dean Gaudet] + *) chdir() doesn't make sense in a multithreaded environment like WIN32. Before, Win32 CGI's could have had sporadic failures if a chdir call from one thread was made between another chdir call and a spawn in 1.28 +7 -2 apache-1.3/src/PORTING Index: PORTING === RCS file: /export/home/cvs/apache-1.3/src/PORTING,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- PORTING 1998/04/21 21:00:43 1.27 +++ PORTING 1998/05/09 03:25:41 1.28 @@ -100,7 +100,7 @@ ./include/conf.h Configure: - == +== Configure concerns itself with determining the OS-type for the build and setting up a few Makefile variables for the build. The most important are 'OS' and 'CFLAGS'. For example, when Configure @@ -130,7 +130,7 @@ supplied regex libraries are generally buggy, and should be avoided. conf.h: - === +=== The Apache code, specifically in conf.h, uses a variety of #defines to control how the code is compiled and what options are available for each supported OS. One of the hardest parts about the porting process is @@ -343,6 +343,11 @@ NEED_HASHBANG_EMUL: The execve()/etc. functions on this platform do not deal with #!, so it must be emulated by Apache. + + SYS_SIGLIST + Should be defined to point to a const char * const * array of + signal descriptions. This is frequently sys_siglist or + _sys_siglist, defined in --- Conclusion: 1.208 +10 -0 apache-1.3/src/include/conf.h Index: conf.h === RCS file: /export/home/cvs/apache-1.3/src/include/conf.h,v retrieving revision 1.207 retrieving revision 1.208 diff -u -r1.207 -r1.208 --- conf.h1998/05/03 17:31:07 1.207 +++ conf.h1998/05/09 03:25:42 1.208 @@ -158,6 +158,7 @@ #define HAVE_CRYPT_H 1 int gethostname(char *name, int namelen); #define HAVE_SYSLOG 1 +#define SYS_SIGLIST _sys_siglist #elif defined(IRIX) #undef HAVE_GMTOFF @@ -406,6 +407,8 @@ /* flock is faster ... but hasn't been tested on 1.x systems */ #define USE_FLOCK_SERIALIZED_ACCEPT +#define SYS_SIGLIST _sys_siglist + #else #define USE_FCNTL_SERIALIZED_ACCEPT #endif @@ -1062,6 +1065,13 @@ */ #ifndef NET_SIZE_T #define NET_SIZE_T int +#endif + +/* Linux defines __WCOREDUMP, but doesn't define WCOREDUMP unless __USE_BSD + * is in use... we'd prefer to just use WCOREDUMP everywhere. + */ +#if defined(__WCOREDUMP) && !defined(WCOREDUMP) +#define WCOREDUMP __WCOREDUMP #endif #ifdef SUNOS_LIB_PROTOTYPES 1.341 +61 -51apache-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.340 retrieving revision 1.341 diff -u -r1.340 -r1.341 --- http_main.c 1998/05/09 01:21:47 1.340 +++ http_main.c 1998/05/09 03:25:43 1.341 @@ -2209,47 +2209,16 @@ /* handle all varieties of core dumping signals */ static void sig_coredump(int sig) { -char emsg[256]; -const char *s; - -/* Must protect against a nested signal, otherwise we could end up in - * an infinite loop. - */ -signal(SIGSEGV, SIG_DFL); -#ifdef SIGBUS -signal(SIGBUS, SIG_DFL); -#endif -#ifdef SIGABORT -signal(SIGABORT, SIG_DFL); -#endif -#ifdef SIGABRT -signal(SIGABRT, SIG_DFL); -#endif - -s = "SIGSEGV"; -#ifdef SIGBUS -if (sig == SIGBUS) { - s = "SIGBUS"; -} -#endif -#ifdef SIGABORT -if (sig == SIGABORT) { - s = "SIGABORT"; -} -#endif -#ifdef SIGABRT -if (sig == SIGABRT) { - s = "SIGABRT"; -
cvs commit: apache-1.3/src/main http_main.c
coar98/05/08 21:36:40 Modified:src/main http_main.c Log: Untangle the last patch.. ap_add_version_component() needs to *prepend* the strings it's fed, not append them. This is because the last thing that calls it before the string is locked is ap_set_version() (as in set-like-cement), which adds the SERVER_BASEVERSION, the platform (conditionally), and the SERVER_SUBVERSION (if defined) at a known location - the front of the string. This has the drawback that module contributions will be listed in reverse order from their 'importance' (which is, in turn, in reverse order from their appearance in the Configuration file ;-). However, only modules with major effects should be contributing to the string anyway, so we can consider them equal. Can't we? The alternative is to either allow ap_set_version() to directly modify the string rather than going through ap_add...(), or else to add another routine that appends rather than prepends. I don't like either of these because of the issues with semantics synchronisation and code duplication. The last patch confused things, though, so I'm just returning the behaviour to the original design - if someone wants to take extra steps to have module contributions listed in the same order as they're called, have a party. This should fix Rasmus' problem with the components being out of order, although it doesn't touch his issue with the init callback duplicating the SERVER_SUBVERSION effort. Revision ChangesPath 1.342 +6 -6 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.341 retrieving revision 1.342 diff -u -r1.341 -r1.342 --- http_main.c 1998/05/09 03:25:43 1.341 +++ http_main.c 1998/05/09 04:36:38 1.342 @@ -371,15 +371,15 @@ */ if (server_version == NULL) { ap_register_cleanup(pconf, NULL, (void (*)(void *))reset_version, - (void (*)(void *))ap_null_cleanup); + ap_null_cleanup); server_version = ap_pstrdup(pconf, component); } else { /* * Prepend the given component identifier to the existing string */ - server_version = ap_pstrcat(pconf, server_version, " ", component, - NULL); + server_version = ap_pstrcat(pconf, component, " ", server_version, + NULL); } } } @@ -390,15 +390,15 @@ */ static void ap_set_version() { +#ifdef SERVER_SUBVERSION +ap_add_version_component(SERVER_SUBVERSION); +#endif if (ap_note_platform) { ap_add_version_component(SERVER_BASEVERSION " (" PLATFORM ")"); } else { ap_add_version_component(SERVER_BASEVERSION); } -#ifdef SERVER_SUBVERSION -ap_add_version_component(SERVER_SUBVERSION); -#endif version_locked++; }
cvs commit: apache-1.3/src/main http_core.c http_main.c
coar98/05/08 21:42:30 Modified:htdocs/manual new_features_1_3.html upgrading_to_1_3.html htdocs/manual/mod core.html src/main http_core.c http_main.c Log: Final touches on removing the AddVersionComponent directive and correcting my BD references to something called "Server-Version." D'oh! Revision ChangesPath 1.57 +8 -10 apache-1.3/htdocs/manual/new_features_1_3.html Index: new_features_1_3.html === RCS file: /export/home/cvs/apache-1.3/htdocs/manual/new_features_1_3.html,v retrieving revision 1.56 retrieving revision 1.57 diff -u -r1.56 -r1.57 --- new_features_1_3.html 1998/05/08 12:09:45 1.56 +++ new_features_1_3.html 1998/05/09 04:42:25 1.57 @@ -639,17 +639,15 @@ configuration. New ways to customise the server identity + HREF="mod/core.html#addversionplatform" + >Including the operating system in the server + identity - Two new directives, AddVersionComponent and - AddVersionPlatform, allow the Webmaster to change the value of - the Server-Version response header field which is sent back - to clients. AddVersionComponent replaces the - -DSERVER_SUBVERSION=\"string\" CCFLAGS mechanism - used in earlier versions of the Apache Web server, allowing the string to - be modified without having to recompile the server. And the - AddVersionPlatform directive controls whether the server will + A new directive, AddVersionPlatform, allows the Webmaster + to change the value of + the Server response header field which is sent back + to clients. The AddVersionPlatform directive controls + whether the server will include a non-specific note in the server identity about the type of operating system on which the server is running. As of Apache 1.3, this additional information is included by default. 1.22 +0 -1 apache-1.3/htdocs/manual/upgrading_to_1_3.html Index: upgrading_to_1_3.html === RCS file: /export/home/cvs/apache-1.3/htdocs/manual/upgrading_to_1_3.html,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- upgrading_to_1_3.html 1998/05/07 14:28:42 1.21 +++ upgrading_to_1_3.html 1998/05/09 04:42:25 1.22 @@ -243,4 +243,3 @@ - 1.115 +3 -53 apache-1.3/htdocs/manual/mod/core.html Index: core.html === RCS file: /export/home/cvs/apache-1.3/htdocs/manual/mod/core.html,v retrieving revision 1.114 retrieving revision 1.115 diff -u -r1.114 -r1.115 --- core.html 1998/05/08 12:09:46 1.114 +++ core.html 1998/05/09 04:42:27 1.115 @@ -24,7 +24,6 @@ AccessConfig AccessFileName AddModule -AddVersionComponent AddVersionPlatform AllowOverride AuthName @@ -180,55 +179,6 @@ be cleared with the ClearModuleList directive. -AddVersionComponent directive - -Syntax: AddVersionComponent string -Context: server config -Status: core -Compatibility: AddVersionComponent is only available - in Apache 1.3 and later - - -Use this directive to add a string to the Server-Version -response header field which is sent back to clients. This field identifies -the server software as the Apache Web server, and can also list additional -information. This directive may occur multiple times, and the results are -cumulative. In each case the string should take one of the following forms: - - - AddVersionComponent "(some comment within parentheses)" - - or - - - AddVersionComponent "component-name/major.minor" - - - -that is, the string should either be arbitrary text enclosed in parentheses, -or else a specific component token and version number (such as "mymod/1.0"). - - -This setting applies to the entire server, and cannot be enabled or -disabled on a virtualhost-by-virtualhost basis. - - -This directive replaces the SERVER_SUBVERSION setting -that was available in earlier versions of the Apache Web server. - - AddVersionPlatform directive This directive controls whether the server's operating system platform -will be identified in the Server-Version response header +will be identified in the Server response header field which is sent back to clients. If enabled, a non-specific platform designation will be added to the identity string, as shown below: AddVersionPlatform Off - Server sends: Server-Version: Apache/1.3.0 + Server sends: Server: Apache/1.3.0 AddVersionPlatform On (or not specified) - Server sends: Server-Version: Apache/1.3.0 (UNIX) + Server sends: Server: Apache/1.3.0 (UNIX) 1.198
cvs commit: apache-1.3/src/main http_main.c
pcs 98/05/09 06:23:58 Modified:src/main http_main.c Log: Win32 does not have kill(). Use raise() instead. Revision ChangesPath 1.344 +4 -0 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.343 retrieving revision 1.344 diff -u -r1.343 -r1.344 --- http_main.c 1998/05/09 04:42:28 1.343 +++ http_main.c 1998/05/09 13:23:56 1.344 @@ -2211,7 +2211,11 @@ { chdir(ap_coredump_dir); signal(sig, SIG_DFL); +#ifndef WIN32 kill(getpid(), sig); +#else +raise(sig); +#endif /* At this point we've got sig blocked, because we're still inside * the signal handler. When we leave the signal handler it will * be unblocked, and we'll take the signal... and coredump or whatever
cvs commit: apache-1.3/src/include http_config.h
pcs 98/05/09 06:27:21 Modified:src/include http_config.h Log: Make the declaration of ap_loaded_modules match it's definition. This is required for compilation on WIN32, where API_VAR_EXPORT modifies the definition. Revision ChangesPath 1.85 +1 -1 apache-1.3/src/include/http_config.h Index: http_config.h === RCS file: /export/home/cvs/apache-1.3/src/include/http_config.h,v retrieving revision 1.84 retrieving revision 1.85 diff -u -r1.84 -r1.85 --- http_config.h 1998/05/07 16:09:00 1.84 +++ http_config.h 1998/05/09 13:27:20 1.85 @@ -324,7 +324,7 @@ extern module *ap_prelinked_modules[]; extern module *ap_preloaded_modules[]; -extern module **ap_loaded_modules; +extern API_VAR_EXPORT module **ap_loaded_modules; /* For http_main.c... */
cvs commit: apache-1.3/src/main util.c
jim 98/05/09 07:27:27 Modified:.STATUS src CHANGES src/include httpd.h src/main util.c Log: Submitted by: Jim Jagielski Reviewed by: Dean Gaudet, Martin Kraemer, Brian Behlendorf Disallow non-/dev/null device files to be used for ``configuration'' files (this includes htaccess, htpasswd and the mod_mime file). Also, open these using ap_pfopen to better handle timeouts. Revision ChangesPath 1.393 +0 -5 apache-1.3/STATUS Index: STATUS === RCS file: /export/home/cvs/apache-1.3/STATUS,v retrieving revision 1.392 retrieving revision 1.393 diff -u -r1.392 -r1.393 --- STATUS1998/05/09 02:28:31 1.392 +++ STATUS1998/05/09 14:27:22 1.393 @@ -18,11 +18,6 @@ o Jim's looked over the ap_snprintf() stuff (the changes that Dean did to make thread-safe) and they look fine. -* The DoS issue about symlinks to /dev/zero is still present. - A device checker patch had been sent to the list a while ago. - PATCH: <[EMAIL PROTECTED]> - Status: Jim +1, Brian +1, Dean +1 (ASSUMED: the API is intact) - WIN32 1.3 FINAL RELEASE SHOWSTOPPERS: * SECURITY: check if the magic con/aux/nul/etc names do anything 1.838 +6 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.837 retrieving revision 1.838 diff -u -r1.837 -r1.838 --- CHANGES 1998/05/09 03:25:40 1.837 +++ CHANGES 1998/05/09 14:27:24 1.838 @@ -1,5 +1,11 @@ Changes with Apache 1.3b7 + *) When opening "configuration" files (like httpd.conf, htaccess + and htpasswd), Apache will not allow them to be non-/dev/null + device files. This closes a DoS hole. At the same time, + we use ap_pfopen to open these files to handle timeouts. + [Jim Jagielski, Martin Kraemer] + *) Apache will now log the reason its httpd children exit if they exit due to an unexpected signal. (It requires a new porting define, SYS_SIGLIST, which if defined should point to a list of text 1.211 +10 -4 apache-1.3/src/include/httpd.h Index: httpd.h === RCS file: /export/home/cvs/apache-1.3/src/include/httpd.h,v retrieving revision 1.210 retrieving revision 1.211 diff -u -r1.210 -r1.211 --- httpd.h 1998/05/07 12:24:24 1.210 +++ httpd.h 1998/05/09 14:27:26 1.211 @@ -905,12 +905,18 @@ typedef struct { int (*getch) (void *param); /* a getc()-like function */ void *(*getstr) (void *buf, size_t bufsiz, void *param); /* a fgets()-like function */ -int (*close) (void *param); /* a fclose()-like function */ -void *param; /* the argument passed to getc()/close()/gets() */ +int (*close) (void *param); /* a close hander function */ +void *param; /* the argument passed to getch/getstr/close */ const char *name;/* the filename / description */ unsigned line_number;/* current line number, starting at 1 */ } configfile_t; +/* Common structure that holds the file and pool for ap_pcfg_openfile */ +typedef struct { +struct pool *pool; +FILE *file; +} poolfile_t; + /* Open a configfile_t as FILE, return open configfile_t struct pointer */ API_EXPORT(configfile_t *) ap_pcfg_openfile(pool *p, const char *name); @@ -919,7 +925,7 @@ void *param, int(*getc_func)(void*), void *(*gets_func) (void *buf, size_t bufsiz, void *param), -int(*close_func)(void*)); +int(*close_func)(void *param)); /* Read one line from open configfile_t, strip LF, increase line number */ API_EXPORT(int) ap_cfg_getline(char *buf, size_t bufsize, configfile_t *cfp); @@ -928,7 +934,7 @@ API_EXPORT(int) ap_cfg_getc(configfile_t *cfp); /* Detach from open configfile_t, calling the close handler */ -API_EXPORT(int) ap_cfg_closefile(configfile_t *fp); +API_EXPORT(int) ap_cfg_closefile(configfile_t *cfp); #ifdef NEED_STRERROR char *strerror(int err); 1.115 +41 -25apache-1.3/src/main/util.c Index: util.c === RCS file: /export/home/cvs/apache-1.3/src/main/util.c,v retrieving revision 1.114 retrieving revision 1.115 diff -u -r1.114 -r1.115 --- util.c1998/05/06 19:47:08 1.114 +++ util.c1998/05/09 14:27:27 1.115 @@ -698,15 +698,39 @@ return res; } +API_EXPORT(int) ap_cfg_closefile(configfile_t *cfp) +{ +#ifdef DEBUG +ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, NULL, "Done with config file %
cvs commit: apache-1.3/src/os/win32 util_win32.c
ben 98/05/09 08:00:50 Modified:src/os/win32 util_win32.c Log: Check for buffer overflows. Revision ChangesPath 1.16 +20 -12apache-1.3/src/os/win32/util_win32.c Index: util_win32.c === RCS file: /export/home/cvs/apache-1.3/src/os/win32/util_win32.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- util_win32.c 1998/05/02 23:25:48 1.15 +++ util_win32.c 1998/05/09 15:00:50 1.16 @@ -1,11 +1,10 @@ #include -#include #include #include #include "httpd.h" -static void sub_canonical_filename(char *szCanon, const char *szFile) +static void sub_canonical_filename(char *szCanon, unsigned nCanon, const char *szFile) { char buf[HUGE_STRING_LEN]; int n; @@ -14,8 +13,8 @@ HANDLE h; n = GetFullPathName(szFile, sizeof buf, buf, &szFilePart); -assert(n); -assert(n < sizeof buf); +ap_assert(n); +ap_assert(n < sizeof buf); /* If we have \\machine\share, convert to \\machine\share\ */ if (buf[0] == '\\' && buf[1] == '\\') { @@ -34,16 +33,17 @@ } if (szFilePart < buf+3) { + ap_assert(strlen(buf) < nCanon); strcpy(szCanon, buf); if(szCanon[0] != '\\') { /* a \ at the start means it is UNC, otherwise it is x: */ - assert(isalpha(szCanon[0])); - assert(szCanon[1] == ':'); + ap_assert(isalpha(szCanon[0])); + ap_assert(szCanon[1] == ':'); szCanon[2] = '/'; } else { char *s; - assert(szCanon[1] == '\\'); + ap_assert(szCanon[1] == '\\'); for(s=szCanon ; *s ; ++s) if(*s == '\\') *s='/'; @@ -52,22 +52,27 @@ } if (szFilePart != buf+3) { char b2[_MAX_PATH]; -assert(szFilePart > buf+3); +ap_assert(szFilePart > buf+3); szFilePart[-1]='\0'; -sub_canonical_filename(b2, buf); +sub_canonical_filename(b2, sizeof b2, buf); + ap_assert(strlen(b2)+1 < nCanon); strcpy(szCanon, b2); strcat(szCanon, "/"); } else { + ap_assert(strlen(buf) < nCanon); strcpy(szCanon, buf); szCanon[2] = '/'; szCanon[3] = '\0'; } -if (h == INVALID_HANDLE_VALUE) +if (h == INVALID_HANDLE_VALUE) { + ap_assert(strlen(szCanon)+strlen(szFilePart) < nCanon); strcat(szCanon, szFilePart); +} else { + ap_assert(strlen(szCanon)+strlen(d.cFileName) < nCanon); strlwr(d.cFileName); strcat(szCanon, d.cFileName); } @@ -83,16 +88,19 @@ char b2[HUGE_STRING_LEN]; char *s; +ap_assert(strlen(szFile) < sizeof b2); strcpy(b2,szFile); for(s=b2 ; *s ; ++s) if(*s == '/') *s='\\'; -sub_canonical_filename(buf, b2); +sub_canonical_filename(buf, sizeof buf, b2); buf[0]=tolower(buf[0]); -if (*szFile && szFile[strlen(szFile)-1] == '/' && buf[strlen(buf)-1] != '/') +if (*szFile && szFile[strlen(szFile)-1] == '/' && buf[strlen(buf)-1] != '/') { + ap_assert(strlen(buf)+1 < sizeof buf); strcat(buf, "/"); +} return ap_pstrdup(pPool, buf); }
cvs commit: apache-1.3/src/os/win32 mod_isapi.c
ben 98/05/09 08:09:31 Modified:src CHANGES src/os/win32 mod_isapi.c Log: Don't force ISAPI headers to finish with \n. PR: 2060 Submitted by: Jim Patterson <[EMAIL PROTECTED]>, Ben Laurie Revision ChangesPath 1.839 +6 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.838 retrieving revision 1.839 diff -u -r1.838 -r1.839 --- CHANGES 1998/05/09 14:27:24 1.838 +++ CHANGES 1998/05/09 15:09:29 1.839 @@ -1,5 +1,11 @@ Changes with Apache 1.3b7 + *) WIN32: Check for buffer overflows in ap_os_canonical_filename. + [Ben Laurie] + + *) WIN32: Don't force ISAPI headers to finish with \n. + [Jim Patterson <[EMAIL PROTECTED]>, Ben Laurie] PR#2060 + *) When opening "configuration" files (like httpd.conf, htaccess and htpasswd), Apache will not allow them to be non-/dev/null device files. This closes a DoS hole. At the same time, 1.11 +19 -1 apache-1.3/src/os/win32/mod_isapi.c Index: mod_isapi.c === RCS file: /export/home/cvs/apache-1.3/src/os/win32/mod_isapi.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- mod_isapi.c 1998/04/11 12:01:05 1.10 +++ mod_isapi.c 1998/05/09 15:09:31 1.11 @@ -85,6 +85,10 @@ /* We use the exact same header file as the original */ #include +/* Seems IIS does not enforce the requirement for \r\n termination on HSE_REQ_SEND_RESPONSE_HEADER, + define this to conform */ +#define RELAX_HEADER_RULE + module isapi_module; /* Our "Connection ID" structure */ @@ -421,6 +425,10 @@ char *value, *lf = strchr(data, '\n'); int p; +#ifdef RELAX_HEADER_RULE + if (lf) + *lf = '\0'; +#else if (!lf) { /* Huh? Invalid data, I think */ ap_log_error(APLOG_MARK, APLOG_ERR, r->server, "ISA sent invalid headers: %s", r->filename); @@ -430,12 +438,16 @@ /* Get rid of \n and \r */ *lf = '\0'; +#endif p = strlen(data); if (p > 0 && data[p-1] == '\r') data[p-1] = '\0'; /* End of headers */ if (*data == '\0') { - data = lf + 1; /* Reset data */ +#ifdef RELAX_HEADER_RULE + if (lf) +#endif + data = lf + 1; /* Reset data */ break; } @@ -477,6 +489,12 @@ } /* Reset data */ +#ifdef RELAX_HEADER_RULE + if (!lf) { + data += p; + break; + } +#endif data = lf + 1; }
cvs commit: apache-1.3/src/main http_main.c
pcs 98/05/09 08:26:31 Modified:src/main http_main.c Log: Start cleaning up the Win32 code. This cleans up the code which spawns child processes. The changes are -- remove an unbounded sprintf() -- always check for errors at all stages, and log an error message -- if an error occurs in creating a child, die, but make sure all already created children a killed correctly -- remove assert()'s Revision ChangesPath 1.345 +64 -13apache-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.344 retrieving revision 1.345 diff -u -r1.344 -r1.345 --- http_main.c 1998/05/09 13:23:56 1.344 +++ http_main.c 1998/05/09 15:26:29 1.345 @@ -4882,20 +4882,40 @@ exit(0); }/* standalone_main */ +/* Spawn a child Apache process. The child process has the command + * line arguments from argc and argv[], plus a -Z argument giving the + * name of an event. The child should open and poll or wait on this + * event. When it is signalled, the child should die. prefix is a + * prefix string for the event name. + * + * The child_num argument on entry contains a serial number for this + * child (used to create a unique event name). On exit, this number + * will have been incremented by one, ready for the next call. + * + * On exit, the value pointed to be *ev will contain the event created + * to signal the new child process. + * + * The return value is the handle to the child process if successful, + * else -1. If -1 is returned the error will already have been logged + * by ap_log_error(). + */ int create_event_and_spawn(int argc, char **argv, event **ev, int *child_num, char *prefix) { -int pid = getpid(); char buf[40], mod[200]; int i, rv; char **pass_argv = (char **) alloca(sizeof(char *) * (argc + 3)); -sprintf(buf, "%s_%d", prefix, ++(*child_num)); +ap_snprintf(buf, sizeof(buf), "%s_%d", prefix, ++(*child_num)); _flushall(); *ev = CreateEvent(NULL, TRUE, FALSE, buf); +if (!*ev) { + ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_WIN32ERROR, NULL, + "could not create event for child process"); + return -1; +} APD2("create_event_and_spawn(): created process kill event %s", buf); -ap_assert(*ev); pass_argv[0] = argv[0]; pass_argv[1] = "-Z"; pass_argv[2] = buf; @@ -4903,12 +4923,27 @@ pass_argv[i + 2] = argv[i]; } pass_argv[argc + 2] = NULL; - -GetModuleFileName(NULL, mod, 200); +rv = GetModuleFileName(NULL, mod, sizeof(mod)); +if (rv == sizeof(mod)) { + /* mod[] was not big enough for our pathname */ + ap_log_error(APLOG_MARK, APLOG_ERR, NULL, + "Internal error: path to Apache process too long"); + return -1; +} +if (rv == 0) { + ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_WIN32ERROR, NULL, + "GetModuleFileName() for current process"); + return -1; +} rv = spawnv(_P_NOWAIT, mod, pass_argv); +if (rv == -1) { + ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_WIN32ERROR, NULL, + "spawn of child process %s failed", mod); + return -1; +} -return (rv); +return rv; } /** @@ -4941,18 +4976,24 @@ APD4("cleanup_processes: removed child in slot %d handle %d, max=%d", position, handle, *processes); } -void create_process(HANDLE *handles, HANDLE *events, int *processes, int *child_num, char *kill_event_name, int argc, char **argv) +int create_process(HANDLE *handles, HANDLE *events, int *processes, int *child_num, char *kill_event_name, int argc, char **argv) { int i = *processes; HANDLE kill_event; +int child_handle; -handles[i] = (HANDLE)create_event_and_spawn(argc, argv, &kill_event, child_num, kill_event_name); -ap_assert(handles[i] >= 0); +child_handle = create_event_and_spawn(argc, argv, &kill_event, child_num, kill_event_name); +if (child_handle <= 0) { + return -1; +} +handles[i] = (HANDLE)child_handle; events[i] = kill_event; (*processes)++; APD4("create_processes: created child in slot %d handle %d, max=%d", (*processes)-1, handles[(*processes)-1], *processes); + +return 0; } int master_main(int argc, char **argv) @@ -4970,7 +5011,7 @@ HANDLE process_kill_events[MAX_PROCESSES]; int current_live_processes = 0; /* number of child process we know about */ int processes_to_create = 0;/* number of child processes to create */ -pool *pparent; /* pool for the parent process. Cleaned o
cvs commit: apache-1.3/src/main http_core.c http_main.c
ben 98/05/09 08:49:36 Modified:src CHANGES src/main http_core.c http_main.c Log: Make Win32 work again after DoS changes. Revision ChangesPath 1.840 +3 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.839 retrieving revision 1.840 diff -u -r1.839 -r1.840 --- CHANGES 1998/05/09 15:09:29 1.839 +++ CHANGES 1998/05/09 15:49:32 1.840 @@ -1,5 +1,8 @@ Changes with Apache 1.3b7 + *) WIN32: Make Win32 work again after the /dev/null DoS fix. + [Ben Laurie] + *) WIN32: Check for buffer overflows in ap_os_canonical_filename. [Ben Laurie] 1.199 +1 -1 apache-1.3/src/main/http_core.c Index: http_core.c === RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v retrieving revision 1.198 retrieving revision 1.199 diff -u -r1.198 -r1.199 --- http_core.c 1998/05/09 04:42:28 1.198 +++ http_core.c 1998/05/09 15:49:33 1.199 @@ -1398,7 +1398,7 @@ if (err != NULL) return err; if (!ap_is_directory (arg)) return "ServerRoot must be a valid directory"; -ap_cpystrn (ap_server_root, arg, sizeof(ap_server_root)); +ap_cpystrn (ap_server_root, ap_os_canonical_filename(cmd->pool, arg), sizeof(ap_server_root)); return NULL; } 1.346 +2 -2 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.345 retrieving revision 1.346 diff -u -r1.345 -r1.346 --- http_main.c 1998/05/09 15:26:29 1.345 +++ http_main.c 1998/05/09 15:49:34 1.346 @@ -5253,10 +5253,10 @@ break; #endif /* WIN32 */ case 'd': - ap_cpystrn(ap_server_root, optarg, sizeof(ap_server_root)); + ap_cpystrn(ap_server_root, ap_os_canonical_filename(pconf, optarg), sizeof(ap_server_root)); break; case 'f': - ap_cpystrn(ap_server_confname, optarg, sizeof(ap_server_confname)); + ap_cpystrn(ap_server_confname, ap_os_canonical_filename(pconf, optarg), sizeof(ap_server_confname)); break; case 'v': printf("Server version: %s\n", ap_get_server_version());
cvs commit: apache-1.3/src/main http_main.c
ben 98/05/09 08:54:40 Modified:src/main http_main.c Log: Report server version correctly on Win32. Revision ChangesPath 1.347 +10 -8 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.346 retrieving revision 1.347 diff -u -r1.346 -r1.347 --- http_main.c 1998/05/09 15:49:34 1.346 +++ http_main.c 1998/05/09 15:54:38 1.347 @@ -5259,6 +5259,7 @@ ap_cpystrn(ap_server_confname, ap_os_canonical_filename(pconf, optarg), sizeof(ap_server_confname)); break; case 'v': + ap_set_version(); printf("Server version: %s\n", ap_get_server_version()); printf("Server built: %s\n", ap_get_server_built()); exit(0); @@ -5279,14 +5280,6 @@ } } -#ifdef __EMX__ -printf("%s \n", ap_get_server_version()); -#endif -#ifdef WIN32 -if (!child) { - printf("%s \n", ap_get_server_version()); -} -#endif if (!child && run_as_service) { service_cd(); } @@ -5298,6 +5291,15 @@ ap_set_version(); ap_open_logs(server_conf, pconf); set_group_privs(); + +#ifdef __EMX__ +printf("%s \n", ap_get_server_version()); +#endif +#ifdef WIN32 +if (!child) { + printf("%s \n", ap_get_server_version()); +} +#endif if (one_process && !exit_event) exit_event = create_event(0, 0, NULL);
cvs commit: apache-1.3/src/main http_main.c
ben 98/05/09 08:56:27 Modified:src/main http_main.c Log: Fix a warning. Revision ChangesPath 1.348 +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.347 retrieving revision 1.348 diff -u -r1.347 -r1.348 --- http_main.c 1998/05/09 15:54:38 1.347 +++ http_main.c 1998/05/09 15:56:23 1.348 @@ -859,7 +859,7 @@ static void usage(char *bin) { char pad[MAX_STRING_LEN]; -int i; +unsigned i; for (i = 0; i < strlen(bin); i++) pad[i] = ' ';
cvs commit: apache-1.3/src/include conf.h
brian 98/05/09 10:29:44 Modified:src/include conf.h Log: Added SYS_SIGLIST definition for FreeBSD & BSDI. Revision ChangesPath 1.209 +1 -0 apache-1.3/src/include/conf.h Index: conf.h === RCS file: /export/home/cvs/apache-1.3/src/include/conf.h,v retrieving revision 1.208 retrieving revision 1.209 diff -u -r1.208 -r1.209 --- conf.h1998/05/09 03:25:42 1.208 +++ conf.h1998/05/09 17:29:44 1.209 @@ -603,6 +603,7 @@ #endif #define USE_FLOCK_SERIALIZED_ACCEPT #define HAVE_SYSLOG 1 +#define SYS_SIGLIST sys_siglist #elif defined(QNX) #ifndef crypt
cvs commit: apache-1.3/src/support Makefile.tmpl
rse 98/05/09 11:28:41 Modified:src CHANGES Configure Makefile.tmpl src/ap Makefile.tmpl src/main Makefile.tmpl src/modules/example Makefile.tmpl src/modules/experimental Makefile.tmpl src/modules/extra Makefile.tmpl src/modules/proxy Makefile.tmpl src/modules/standard Makefile.tmpl src/modules/test Makefile.tmpl src/os/bs2000 Makefile.tmpl src/os/emx Makefile.tmpl src/os/unix Makefile.tmpl src/support Makefile.tmpl Log: Various Makefile consistency cleanups: - make OSDIR also automatically be relative to src/ like INCDIR - SUBDIRS is now generated in src/Makefile only and not in Makefile.config because it is a local define for this location. - remove BROKEN_BPRINTF_FLAGS because is it no longer used inside any Makefile but make sure that at least the "-K inline" is kept in CFLAGS for SCO 5. - update the "depend" targets in Makefile.tmpl files to use $(OSDIR), too. - updated the dependencies theirself Revision ChangesPath 1.841 +11 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.840 retrieving revision 1.841 diff -u -r1.840 -r1.841 --- CHANGES 1998/05/09 15:49:32 1.840 +++ CHANGES 1998/05/09 18:28:29 1.841 @@ -1,4 +1,15 @@ Changes with Apache 1.3b7 + + *) Various Makefile consistency cleanups: + - make OSDIR also automatically be relative to src/ like INCDIR + - SUBDIRS is now generated in src/Makefile only and not in + Makefile.config because it is a local define for this location. + - remove BROKEN_BPRINTF_FLAGS because is it no longer used inside + any Makefile but make sure that at least the "-K inline" is kept in + CFLAGS for SCO 5. + - update the "depend" targets in Makefile.tmpl files to use $(OSDIR), too. + - updated the dependencies theirself + [Ralf S. Engelschall] *) WIN32: Make Win32 work again after the /dev/null DoS fix. [Ben Laurie] 1.257 +6 -6 apache-1.3/src/Configure Index: Configure === RCS file: /export/home/cvs/apache-1.3/src/Configure,v retrieving revision 1.256 retrieving revision 1.257 diff -u -r1.256 -r1.257 --- Configure 1998/05/06 21:12:40 1.256 +++ Configure 1998/05/09 18:28:30 1.257 @@ -90,7 +90,7 @@ tmpfile3=$tmpfile.3 awkfile=$tmpfile.4 tmpconfig=$tmpfile.5 -SUBDIRS='$(OSDIR) ap main modules' +SUBDIRS="ap main modules" ## Now handle any arguments, which, for now, is -file @@ -702,6 +702,7 @@ ## Show user what OS we came up with ## echo " + configured for $OS platform" +SUBDIRS="$OSDIR $SUBDIRS" ## And adjust/override WANTHSREGEX as needed @@ -1072,7 +1073,7 @@ ;; 'SCO 5') case "$CC" in - */cc|cc ) OSBPRINTF="-K noinline" ;; + */cc|cc ) CFLAGS="$CFLAGS -K noinline" ;; esac ;; 'HI-UX') @@ -1523,6 +1524,7 @@ ## Now add the target for the main Makefile ## echo "TARGET=$TARGET" >> Makefile +echo "SUBDIRS=$SUBDIRS" >> Makefile echo "SUBTARGET=$SUBTARGET" >> Makefile echo "SHLIB_SUFFIX_LIST=$SHLIB_SUFFIX_LIST" >> Makefile echo "" >> Makefile @@ -1550,18 +1552,16 @@ ## Continue building Makefile.config. ## echo "CFLAGS1=$CFLAGS">> Makefile.config +echo "OSDIR=\$(SRCDIR)/$OSDIR">> Makefile.config echo "INCDIR=\$(SRCDIR)/include" >>Makefile.config -echo "INCLUDES0=-I\$(SRCDIR)/$OSDIR -I\$(SRCDIR)/include">> Makefile.config +echo "INCLUDES0=-I\$(OSDIR) -I\$(INCDIR)">> Makefile.config echo "INCLUDES1=$INCLUDES">> Makefile.config echo "LIBS1=$LIBS">> Makefile.config echo "LDFLAGS1=$LDFLAGS">> Makefile.config -echo "BROKEN_BPRINTF_FLAGS=$OSBPRINTF">> Makefile.config echo "MFLAGS_STATIC=$MFLAGS_STATIC">> Makefile.config echo "REGLIB=$REGLIB">> Makefile.config echo "RANLIB=$RANLIB">> Makefile.config echo "SHELL=$SHELL">> Makefile.config -echo "OSDIR=$OSDIR">> Makefile.config -echo "SUBDIRS=$SUBDIRS">> Makefile.config echo "##" >> Makefile.config echo "## (End of automatically generated section)">> Makefile.config echo "##" >> Makefile.config 1.93 +6 -6 apache-1.3/src/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache-1.3/src/Makefile.tmpl,v retrieving revision 1.92 retrieving revision 1.93 diff -u -r1.92 -r1.93 --- Makefile
cvs commit: apache-1.3/src/modules/example Makefile.tmpl
rse 98/05/09 11:34:06 Modified:src/modules/proxy Makefile.tmpl src/modules/experimental Makefile.tmpl src/modules/example Makefile.tmpl Log: A few more dependencies with $(OSDIR)... Revision ChangesPath 1.15 +12 -18apache-1.3/src/modules/proxy/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache-1.3/src/modules/proxy/Makefile.tmpl,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- Makefile.tmpl 1998/05/09 18:28:37 1.14 +++ Makefile.tmpl 1998/05/09 18:34:04 1.15 @@ -61,45 +61,39 @@ # DO NOT REMOVE mod_proxy.o: mod_proxy.c mod_proxy.h $(INCDIR)/httpd.h \ - $(INCDIR)/conf.h ../../os/unix/os.h \ - $(INCDIR)/hsregex.h $(INCDIR)/alloc.h $(INCDIR)/buff.h \ - $(INCDIR)/ap.h $(INCDIR)/util_uri.h \ + $(INCDIR)/conf.h $(OSDIR)/os.h $(INCDIR)/alloc.h \ + $(INCDIR)/buff.h $(INCDIR)/ap.h $(INCDIR)/util_uri.h \ $(INCDIR)/http_config.h $(INCDIR)/http_protocol.h \ $(INCDIR)/explain.h $(INCDIR)/http_log.h \ $(INCDIR)/http_vhost.h proxy_cache.o: proxy_cache.c mod_proxy.h $(INCDIR)/httpd.h \ - $(INCDIR)/conf.h ../../os/unix/os.h \ - $(INCDIR)/hsregex.h $(INCDIR)/alloc.h $(INCDIR)/buff.h \ - $(INCDIR)/ap.h $(INCDIR)/util_uri.h \ + $(INCDIR)/conf.h $(OSDIR)/os.h $(INCDIR)/alloc.h \ + $(INCDIR)/buff.h $(INCDIR)/ap.h $(INCDIR)/util_uri.h \ $(INCDIR)/http_config.h $(INCDIR)/http_protocol.h \ $(INCDIR)/explain.h $(INCDIR)/http_log.h \ $(INCDIR)/http_main.h $(INCDIR)/util_date.h \ $(INCDIR)/multithread.h $(INCDIR)/md5.h proxy_connect.o: proxy_connect.c mod_proxy.h $(INCDIR)/httpd.h \ - $(INCDIR)/conf.h ../../os/unix/os.h \ - $(INCDIR)/hsregex.h $(INCDIR)/alloc.h $(INCDIR)/buff.h \ - $(INCDIR)/ap.h $(INCDIR)/util_uri.h \ + $(INCDIR)/conf.h $(OSDIR)/os.h $(INCDIR)/alloc.h \ + $(INCDIR)/buff.h $(INCDIR)/ap.h $(INCDIR)/util_uri.h \ $(INCDIR)/http_config.h $(INCDIR)/http_protocol.h \ $(INCDIR)/explain.h $(INCDIR)/http_log.h \ $(INCDIR)/http_main.h proxy_ftp.o: proxy_ftp.c mod_proxy.h $(INCDIR)/httpd.h \ - $(INCDIR)/conf.h ../../os/unix/os.h \ - $(INCDIR)/hsregex.h $(INCDIR)/alloc.h $(INCDIR)/buff.h \ - $(INCDIR)/ap.h $(INCDIR)/util_uri.h \ + $(INCDIR)/conf.h $(OSDIR)/os.h $(INCDIR)/alloc.h \ + $(INCDIR)/buff.h $(INCDIR)/ap.h $(INCDIR)/util_uri.h \ $(INCDIR)/http_config.h $(INCDIR)/http_protocol.h \ $(INCDIR)/explain.h $(INCDIR)/http_main.h proxy_http.o: proxy_http.c mod_proxy.h $(INCDIR)/httpd.h \ - $(INCDIR)/conf.h ../../os/unix/os.h \ - $(INCDIR)/hsregex.h $(INCDIR)/alloc.h $(INCDIR)/buff.h \ - $(INCDIR)/ap.h $(INCDIR)/util_uri.h \ + $(INCDIR)/conf.h $(OSDIR)/os.h $(INCDIR)/alloc.h \ + $(INCDIR)/buff.h $(INCDIR)/ap.h $(INCDIR)/util_uri.h \ $(INCDIR)/http_config.h $(INCDIR)/http_protocol.h \ $(INCDIR)/explain.h $(INCDIR)/http_log.h \ $(INCDIR)/http_main.h $(INCDIR)/http_core.h \ $(INCDIR)/util_date.h proxy_util.o: proxy_util.c mod_proxy.h $(INCDIR)/httpd.h \ - $(INCDIR)/conf.h ../../os/unix/os.h \ - $(INCDIR)/hsregex.h $(INCDIR)/alloc.h $(INCDIR)/buff.h \ - $(INCDIR)/ap.h $(INCDIR)/util_uri.h \ + $(INCDIR)/conf.h $(OSDIR)/os.h $(INCDIR)/alloc.h \ + $(INCDIR)/buff.h $(INCDIR)/ap.h $(INCDIR)/util_uri.h \ $(INCDIR)/http_config.h $(INCDIR)/http_protocol.h \ $(INCDIR)/explain.h $(INCDIR)/http_main.h $(INCDIR)/md5.h \ $(INCDIR)/multithread.h $(INCDIR)/http_log.h 1.9 +2 -3 apache-1.3/src/modules/experimental/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache-1.3/src/modules/experimental/Makefile.tmpl,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Makefile.tmpl 1998/05/09 18:28:34 1.8 +++ Makefile.tmpl 1998/05/09 18:34:05 1.9 @@ -17,9 +17,8 @@ # DO NOT REMOVE mod_mmap_static.o: mod_mmap_static.c $(INCDIR)/httpd.h \ - $(INCDIR)/conf.h ../../os/unix/os.h \ - $(INCDIR)/hsregex.h $(INCDIR)/alloc.h $(INCDIR)/buff.h \ - $(INCDIR)/ap.h $(INCDIR)/util_uri.h \ + $(INCDIR)/conf.h $(OSDIR)/os.h $(INCDIR)/alloc.h \ + $(INCDIR)/buff.h $(INCDIR)/ap.h $(INCDIR)/util_uri.h \ $(INCDIR)/http_config.h $(INCDIR)/http_log.h \ $(INCDIR)/http_protocol.h $(INCDIR)/http_request.h \ $(INCDIR)/http_core.h 1.6 +1 -1 apache-1.3/src/modules/example/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache-1.3/src/modules/example/Makefile.tmpl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Makefile.tmpl 1998/05/09 18:28:33 1.5 +++ Makefile.tmpl 1998/05/09 18:34:05 1.6 @@ -18,7 +18,7 @@ # DO NOT REMOVE mod_example.o: mod_example.c $
cvs commit: apache-1.3/src/main http_main.c
pcs 98/05/09 11:49:35 Modified:src/main http_main.c Log: The PID file on Win32 contained the PID of the most recently created child process, not the parent. Revision ChangesPath 1.349 +3 -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.348 retrieving revision 1.349 diff -u -r1.348 -r1.349 --- http_main.c 1998/05/09 15:56:23 1.348 +++ http_main.c 1998/05/09 18:49:33 1.349 @@ -5285,7 +5285,9 @@ } server_conf = ap_read_config(pconf, ptrans, ap_server_confname); -ap_log_pid(pconf, ap_pid_fname); +if (!child) { + ap_log_pid(pconf, ap_pid_fname); +} ap_init_modules(pconf, server_conf); ap_suexec_enabled = init_suexec(); ap_set_version();
cvs commit: apache-1.3/src/main http_main.c
martin 98/05/09 16:48:04 Modified:src/main http_main.c Log: Define a "apache private" signal names list if the OS does not have one. Note: Currently, this list is initialized at run-time. Additionally, check valid range of siglist array in sig_coredump() routine. Reviewed by: Jim Jagielski, Dean Gaudet Revision ChangesPath 1.350 +135 -1apache-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.349 retrieving revision 1.350 diff -u -u -r1.349 -r1.350 --- http_main.c 1998/05/09 18:49:33 1.349 +++ http_main.c 1998/05/09 23:48:02 1.350 @@ -2206,6 +2206,138 @@ } +#if defined(NSIG) +#define NumSIG NSIG +#elif defined(_NSIG) +#define NumSIG _NSIG +#elif defined(__NSIG) +#define NumSIG __NSIG +#else +#define NumSIG 32 /* for 1998's unixes, this is still a good assumption */ +#endif + +#ifdef SYS_SIGLIST /* platform has sys_siglist[] */ +#define INIT_SIGLIST() /*nothing*/ +#else /* platform has no sys_siglist[], define our own */ +#define SYS_SIGLIST ap_sys_siglist +#define INIT_SIGLIST() siglist_init(); + +const char *ap_sys_siglist[NumSIG]; + +static void siglist_init(void) +{ +int sig; + +ap_sys_siglist[0] = "Signal 0"; +#ifdef SIGHUP +ap_sys_siglist[SIGHUP] = "Hangup"; +#endif +#ifdef SIGINT +ap_sys_siglist[SIGINT] = "Interrupt"; +#endif +#ifdef SIGQUIT +ap_sys_siglist[SIGQUIT] = "Quit"; +#endif +#ifdef SIGILL +ap_sys_siglist[SIGILL] = "Illegal instruction"; +#endif +#ifdef SIGTRAP +ap_sys_siglist[SIGTRAP] = "Trace/BPT trap"; +#endif +#ifdef SIGIOT +ap_sys_siglist[SIGIOT] = "IOT instruction"; +#endif +#ifdef SIGABRT +ap_sys_siglist[SIGABRT] = "Abort"; +#endif +#ifdef SIGEMT +ap_sys_siglist[SIGEMT] = "Emulator trap"; +#endif +#ifdef SIGFPE +ap_sys_siglist[SIGFPE] = "Arithmetic exception"; +#endif +#ifdef SIGKILL +ap_sys_siglist[SIGKILL] = "Killed"; +#endif +#ifdef SIGBUS +ap_sys_siglist[SIGBUS] = "Bus error"; +#endif +#ifdef SIGSEGV +ap_sys_siglist[SIGSEGV] = "Segmentation fault"; +#endif +#ifdef SIGSYS +ap_sys_siglist[SIGSYS] = "Bad system call"; +#endif +#ifdef SIGPIPE +ap_sys_siglist[SIGPIPE] = "Broken pipe"; +#endif +#ifdef SIGALRM +ap_sys_siglist[SIGALRM] = "Alarm clock"; +#endif +#ifdef SIGTERM +ap_sys_siglist[SIGTERM] = "Terminated"; +#endif +#ifdef SIGUSR1 +ap_sys_siglist[SIGUSR1] = "User defined signal 1"; +#endif +#ifdef SIGUSR2 +ap_sys_siglist[SIGUSR2] = "User defined signal 2"; +#endif +#ifdef SIGCLD +ap_sys_siglist[SIGCLD] = "Child status change"; +#endif +#ifdef SIGCHLD +ap_sys_siglist[SIGCHLD] = "Child status change"; +#endif +#ifdef SIGPWR +ap_sys_siglist[SIGPWR] = "Power-fail restart"; +#endif +#ifdef SIGWINCH +ap_sys_siglist[SIGWINCH] = "Window changed"; +#endif +#ifdef SIGURG +ap_sys_siglist[SIGURG] = "urgent socket condition"; +#endif +#ifdef SIGPOLL +ap_sys_siglist[SIGPOLL] = "Pollable event occurred"; +#endif +#ifdef SIGIO +ap_sys_siglist[SIGIO] = "socket I/O possible"; +#endif +#ifdef SIGSTOP +ap_sys_siglist[SIGSTOP] = "Stopped (signal)"; +#endif +#ifdef SIGTSTP +ap_sys_siglist[SIGTSTP] = "Stopped"; +#endif +#ifdef SIGCONT +ap_sys_siglist[SIGCONT] = "Continued"; +#endif +#ifdef SIGTTIN +ap_sys_siglist[SIGTTIN] = "Stopped (tty input)"; +#endif +#ifdef SIGTTOU +ap_sys_siglist[SIGTTOU] = "Stopped (tty output)"; +#endif +#ifdef SIGVTALRM +ap_sys_siglist[SIGVTALRM] = "virtual timer expired"; +#endif +#ifdef SIGPROF +ap_sys_siglist[SIGPROF] = "profiling timer expired"; +#endif +#ifdef SIGXCPU +ap_sys_siglist[SIGXCPU] = "exceeded cpu limit"; +#endif +#ifdef SIGXFSZ +ap_sys_siglist[SIGXFSZ] = "exceeded file size limit"; +#endif +for (sig=0; sig < sizeof(ap_sys_siglist)/sizeof(ap_sys_siglist[0]); ++sig) +if (ap_sys_siglist[sig] == NULL) +ap_sys_siglist[sig] = ""; +} +#endif /* platform has sys_siglist[] */ + + /* handle all varieties of core dumping signals */ static void sig_coredump(int sig) { @@ -3086,6 +3218,7 @@ */ static void common_init(void) { +INIT_SIGLIST() #ifdef AUX3 (void) set42sig(); #endif @@ -3793,7 +3926,8 @@ server_conf, "httpd: child pid %d exit signal %s (%d), " "possible coredump in %s", - pid, SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status), + pid, (WTERMSIG(status) >= NumSIG) ? "" : + SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status), ap_co