You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Stipe Tolj <a2...@smail.Uni-Koeln.DE> on 1998/01/22 19:37:19 UTC

Apache 1.2.5 Win32 CYGWIN32 support patch

Hi their Apache developers,

this is a request for adding the CYGWIN32 support patch I recently made for
the latest Apache 1.2.5 release for Win32 systems (Windows 95 and NT) to the
orginal Apache 1.2.5 source code distribution.

There are only some additional #define CGWIN32 blocks needed to support
the Cygnus GNU C/C++ 2.7.2 b18 compiler for Win32 (http://www.cygnus.com).

It compiles and runs fine on any i386 platform running one of both Win32 OS.
As a matter of fact the server still has to run in single-process mode, i.e.
the CYGWIN32 compiler seems unable to do fork() operations. This is to be
fixed in the next update. Although, there are some things added, which go
beyond the simple CYGWIN32 support of the code, like the new HTML output
look for directiry indexing. They don't have to be added for
compatibility purposes.

Please have a look at the attached cygwin32-patch.tar.gz file for the 8
source code files which have been edited. The compiled binaries are
available at (http://www-public.rz.uni-duesseldorf.de/~tolj). Roy Fielding
has noted that I should change the name of the binary distribution since
this is no official verion of the Apache Group. I will do so, as soon
as possible. 

I think it is worth integrating the CYGWIN32 support to the orginal source
code distribution of the server, because this would break a bridge to
the Microsoft Win32 architecture world which yet is done by the seperated
source code development of the Apache 1.3b3 version. This support claims
not to be faster, (since I had no time testing this) nor to be a competitor
to the official 1.3b3 release.

Note that also one of the biggest free software distribution on the net for
UNIX systems supports the CYGWIN32 build, it't the latest Perl 5.004_04
distribution from Larry Wall at (http://www.perl.com), another reason why
Apache should too.



NOTE: I have added a new feature to the source code which was orginaly not
supported by 1.2.5 from the Apache Group.

        gcc -c -DDIRECT_HOSTNAME http_main.c

adds the feature of specifying the ServerName (as in httpd.conf) as option
at server startup directly, i.e.

        httpd -f /etc/httpd.conf -n cip-sun01.protheus.net

would specify the ServerName as written. Main aim of this feature is to start
server processes from profiles using the uname command in workstation pools
and such things. How about adding this to the orginal distribution?!

Please tell me what you thing of it.

Sincerely, Stipe.


..........................................................................
stud.rer.pol. Stipe Tolj                HTTP Server Development Management 
Department of Economical Computer Science,  University of Cologne, Germany

E-Mails: tolj@uni-duesseldorf.de		   (use as default please)
	 a2790289@smail.rrz.uni-koeln.de                (primary optional) 
	 stolj@mi.uni-koeln.de                        (secondary optional)

Homepages: http://www-public.rz.uni-duesseldorf.de/~tolj       (main site)
	   http://abel.mi.uni-koeln.de/~stolj          (experimental site) 
..........................................................................

Re: Apache 1.2.5 Win32 CYGWIN32 support patch

Posted by Dean Gaudet <dg...@arctic.org>.
Some comments, in addition to what Brian said, although I'm not sure
you're on the development list so you may not have seen Brian's remarks.
I encourage you to join the development list and assist with the
win32 effort in 1.3.

- you should #define NO_KILLPG in conf.h rather than create another
definition in http_main.c.  In fact it looks like you didn't even provide
a conf.h section for CYGWIN32 at all.  This is the normal way to do a
port, there are a lot of examples in conf.h.

- portability patches should not include new features mixed in

- if you disable the longjmps as you have timeouts are completely broken,
this isn't exactly a good thing

- your patch does not deal with file system case-insensitivity, or 8.3
names... which makes it insecure

- you've removed the daemons_max_free test... and not replaced it with
anything... so the server won't respect MaxSpareServers

Unfortunately I really don't think we can accept this patch, it would make
the situation worse than it is now in my opinion.  Even some of our more
obscure ports for ancient unix platforms and mainframe platforms would be
more stable... and since win32 is such a wide-spread platform it would due
us harm to support it so poorly (in 1.2 that is). 

But I did notice one thing that the other win32 folks here should check on:

+    /*
+     * CAUTION: Security leak on Win32 systems in the next if statement.
+     *          Clients may override document_root by /.......
+     */
+
+                                                       /* _###_ by ST. */
     if (allow_opts & OPT_INDEXES)
+
+        /*
+         * Check for /..... overriding for Win32. A maximum of 2 dots
+         * is allowed,  if more dots are within the path deny
+         * access to index. Seems to work.
+         */
+
+#ifdef CYGWIN32                                        /* _###_ by ST. */
+        if (strstr(r->filename, "...") != NULL) {
+            log_reason ("Directory index forbidden by rule", r->filename, r);
+            return HTTP_FORBIDDEN;
+        } else return index_directory (r, d);
+#else
         return index_directory (r, d);
+#endif
+
 

I remember this from DOS days, you could use a whack of ..... to go up
a bunch of directories.  I wasn't aware this always worked... but maybe
it works on win95.  I don't think we currently test for this in 1.3.

Laters
Dean

Re: Apache 1.2.5 Win32 CYGWIN32 support patch

Posted by Rob Hartill <ro...@imdb.com>.
On Thu, 22 Jan 1998, Stipe Tolj wrote:

> Hi their Apache developers,
> 
> this is a request for adding the CYGWIN32 support patch I recently made for
> the latest Apache 1.2.5 release for Win32 systems (Windows 95 and NT) to the
> orginal Apache 1.2.5 source code distribution.

thanks for that huge mail. Just what I needed.

why can't people learn to mail URLs.