You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Dean Gaudet <dg...@arctic.org> on 1997/09/06 03:15:22 UTC

[PATCH] properly fix win32 auth problem

Ben's hack fix introduces bugs involving <directory proxy:foo>.  Even with
his hack fix the code isn't right since core_reorder_directories doesn't
really do the right thing with <directory d:/path> sections (I can't be
bothered to construct an example, but it should be easy, just mix a regex
section with non-regex sections and you can probably see this bug). 

This patch should fix both, it's completely untested.  I just had 5
minutes and figured I'd get it out there. 

Oh yeah, there's a few pieces of code like this which test for drive
letters that don't test name[0] != '\0'.  It shouldn't be possible for a
<directory> to generate such a name, so I didn't worry about it either. 

Dean

Index: http_core.c
===================================================================
RCS file: /export/home/cvs/apachen/src/main/http_core.c,v
retrieving revision 1.118
diff -u -r1.118 http_core.c
--- http_core.c	1997/09/02 16:12:08	1.118
+++ http_core.c	1997/09/06 01:10:26
@@ -267,8 +267,14 @@
  * See directory_walk().
  */
 
+#if defined(__EMX__) || defined(WIN32)
+#define IS_SPECIAL(entry_core)	\
+    ((entry_core)->r != NULL \
+	|| ((entry_core)->d[0] != '/' && (entry_core)->d[1] != ':'))
+#else
 #define IS_SPECIAL(entry_core)	\
     ((entry_core)->r != NULL || (entry_core)->d[0] != '/')
+#endif
 
 /* We need to do a stable sort, qsort isn't stable.  So to make it stable
  * we'll be maintaining the original index into the list, and using it
Index: http_request.c
===================================================================
RCS file: /export/home/cvs/apachen/src/main/http_request.c,v
retrieving revision 1.81
diff -u -r1.81 http_request.c
--- http_request.c	1997/08/31 21:28:53	1.81
+++ http_request.c	1997/09/06 01:10:26
@@ -383,10 +383,11 @@
 	    entry_dir = entry_core->d;
 
 	    if (entry_core->r
-/* FIXME: Temporarily removed, pending an explanation of function, in order to
-          fix Win32 [Ben]
+#if defined(__EMX__) || defined(WIN32)
+		|| (entry_core[0] != '/' && entry_core[1] != ':')
+#else
 		|| entry_dir[0] != '/'
-*/
+#endif
 		|| entry_core->d_components > i) break;
 
 	    this_conf = NULL;