coar 98/10/23 12:06:29
Modified: src CHANGES
src/main http_core.c util.c
Log:
Fix some more Win32-only problems: treat "{.*/}nul" on Win32
the way we do "/dev/null" on Unix, and mention the inapplicability
of the User directive if encountered on Win32.
PR: 2078, 2303
Submitted by: Ken Parzygnat <[EMAIL PROTECTED]>
Reviewed by: Ken Coar
Revision Changes Path
1.1121 +6 -0 apache-1.3/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
retrieving revision 1.1120
retrieving revision 1.1121
diff -u -r1.1120 -r1.1121
--- CHANGES 1998/10/23 08:32:25 1.1120
+++ CHANGES 1998/10/23 19:06:24 1.1121
@@ -1,5 +1,11 @@
Changes with Apache 1.3.4
+ *) Properly handle & allow "nul" and ".*/null" in AccessConfig and
+ ResourceConfig directives on Win32. Also add a note to the effect
+ of 'useless User directive ignored on Win32' to the errorlog if
+ a User directive is encountered on Win32.
+ [Ken Parzygnat <[EMAIL PROTECTED]>] PR#2078, 2303.
+
*) Fix multiple whitespace handling in imagemaps for mod_imap which was
broken since Apache 1.3.1 where we took out compressing of multiple
spaces in ap_cfg_getline().
1.236 +6 -0 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.235
retrieving revision 1.236
diff -u -r1.235 -r1.236
--- http_core.c 1998/10/21 05:57:53 1.235
+++ http_core.c 1998/10/23 19:06:26 1.236
@@ -1665,6 +1665,11 @@
static const char *set_user(cmd_parms *cmd, void *dummy, char *arg)
{
+#ifdef WIN32
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, cmd->server,
+ "User directive has no affect on Win32");
+ cmd->server->server_uid = ap_user_id = 1;
+#else
const char *err = ap_check_cmd_context(cmd,
NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
if (err != NULL) {
return err;
@@ -1700,6 +1705,7 @@
exit (1);
}
#endif
+#endif /* WIN32 */
return NULL;
}
1.136 +3 -1 apache-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.135
retrieving revision 1.136
diff -u -r1.135 -r1.136
--- util.c 1998/10/10 00:40:07 1.135
+++ util.c 1998/10/23 19:06:27 1.136
@@ -760,7 +760,9 @@
if (fstat(fileno(file), &stbuf) == 0 &&
!S_ISREG(stbuf.st_mode) &&
#ifdef WIN32
- strcasecmp(name, "nul") != 0) {
+ !(strcasecmp(name, "nul") == 0 ||
+ (strlen(name) >= 4 &&
+ strcasecmp(name + strlen(name) - 4, "/nul") == 0))) {
#else
strcmp(name, "/dev/null") != 0) {
#endif