]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
no message
authorBradley Nicholes <bnicholes@apache.org>
Fri, 30 Mar 2001 16:16:08 +0000 (16:16 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Fri, 30 Mar 2001 16:16:08 +0000 (16:16 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@88615 13f79535-47bb-0310-9956-ffa450edef68

src/CHANGES
src/os/netware/os.c
src/os/netware/os.h

index 9248e2a1a7b47f02e91b2344f524f813b23131b2..8685101ef89fcd5d0e19f16aa20f7bc32a66da03 100644 (file)
@@ -1,5 +1,10 @@
 Changes with Apache 1.3.20
 
+  *) Hooked calls to opendir() and readdir() so that we could add '.' and
+     '..' to the entry list.  By default NetWare does not return these
+     entries which caused mod_autoindex not to display the parent directory
+     entry. [Brad Nicholes <BNICHOLES@novell.com>]
+
   *) Solved a very serious threading problem with WinNT/2K Services.  The
      moment master_main told that the shutdown was complete, the parent
      control thread exited Apache, leaving mod_jserv's Java process running
index 75270f99699808a8c5b57dc853e62f75c610e41c..06785dd9498700c904d1332e5265a09064e4b8b2 100644 (file)
@@ -297,3 +297,30 @@ int ap_os_is_filename_valid(const char *file)
     return 1;
 }
 
+#undef opendir_411
+DIR *os_opendir (const char *pathname)
+{
+    DIR *d = opendir_411 (pathname);
+
+    if (d) {
+        strcpy (d->d_name, "<<**");
+    }
+    return d;
+}
+
+#undef readdir_411
+DIR *os_readdir (DIR *dirP)
+{
+    if ((dirP->d_name[0] == '<') && (dirP->d_name[2] == '*')) {
+        strcpy (dirP->d_name, ".");
+        strcpy (dirP->d_nameDOS, ".");
+        return (dirP);
+    }
+    else if ((dirP->d_name[0] == '.') && (dirP->d_name[1] == '\0')) {
+        strcpy (dirP->d_name, "..");
+        strcpy (dirP->d_nameDOS, "..");
+        return (dirP);
+    }
+    else
+        return readdir_411 (dirP);
+}
index 88fa3d8b468f560b73dcdf4bf7de495408e101ba..8a5919dee0c810522e19aeb4a4d085c0f363d369 100644 (file)
@@ -83,6 +83,7 @@ typedef int gid_t;
 #include <ws2nlm.h>
 #include <winsock2.h>
 #include <fcntl.h>
+#include <dirent.h>
 
 #define NO_LINGCLOSE
 #define NO_SLACK
@@ -120,6 +121,13 @@ typedef int gid_t;
 #define mktemp(s) tmpnam(s)
 #define _getch(c) getch(c)
 
+#define opendir_411(p) os_opendir(p)
+#define openir(p) os_opendir(p)
+DIR *os_opendir (const char *pathname);
+
+#define readdir_411(p) os_readdir(p)
+#define readdir(p) os_readdir(p)
+DIR *os_readdir (DIR *dirP);
 
 /* Prototypes */
 void AMCSocketCleanup(void);