Jeff Trawick [Sun, 18 Jun 2000 03:05:41 +0000 (03:05 +0000)]
Make unixd_config.user_name const char * instead of char * to avoid
a warning when the set-user-name command handler saves the address of
the arg from the config file.
Time to jump back into 2.0 again... here are yesterday's updates to
the MSVC conversion scripts, since the old ones would occasional be
whacked. Again I ask, if you see better code here, please commit it.
Jeff Trawick [Sat, 17 Jun 2000 12:29:53 +0000 (12:29 +0000)]
Fill in missing implementations of AP_INIT_whatever for when
AP_DEBUG is not defined. Apache now compiles for me on FreeBSD
3.4 when AP_DEBUG isn't defined (albeit with a few warnings).
Greg Stein [Sat, 17 Jun 2000 01:29:29 +0000 (01:29 +0000)]
ap_bvputs() is a misnomer; introduce ap_bputstrs()
[todo: proxy and file_cache code should be updated for new name]
add ap_vbputstrs()
use ap_vbputstrs() from http_protocol.
use EOF in a few places, rather than the magic "-1" constant
Jeff Trawick [Fri, 16 Jun 2000 16:41:21 +0000 (16:41 +0000)]
Turn on buffering for config file reads. This is dependent on ap_fgets()
doing the right thing.
Brian Havard implemented buffering for ap_fgets() on Win32 recently; OS/2 had
it already. This provides it for Unix.
changes to ap_read(), ap_getc(), ap_fgets() for Unix:
1) this fixes a problem in where ap_open() where a lock is created for
non-buffered files
2) this fixes problems setting rv correctly in the ap_read() buffered
path
3) since ap_read() works as expected, it is possible to make ap_getc()
and ap_fgets() even smaller
4) ap_fgets() no longer cares about '\r'
Jeff Trawick [Fri, 16 Jun 2000 12:00:58 +0000 (12:00 +0000)]
Fix segfault when reporting this type of syntax error:
"</container> without matching <container> section", where
container is VirtualHost or Directory or whatever.
This was a path not covered by the fix in 2.0a4 to report
the proper line numbers (sorry!).
Jeff Trawick [Thu, 15 Jun 2000 13:42:01 +0000 (13:42 +0000)]
Include the proper header file (under X/Open, at least) for ntohs() in
a couple of modules. This lets us link-edit successfully again on OS/390.
(OS/390 only has the macro form of these functions.)
Tony Finch [Thu, 15 Jun 2000 00:56:37 +0000 (00:56 +0000)]
Prevent the source code for CGIs from being revealed when using
mod_vhost_alias and the CGI directory is under the document root
and a user makes a request like http://www.example.com//cgi-bin/cgi
as reported in <news:960999105.344321@ernani.logica.co.uk>
David Reid [Wed, 14 Jun 2000 00:17:21 +0000 (00:17 +0000)]
Tidy up the beos mpm by
- removing some unused variables
- correct a problem with pool allocations that killed the server
- add back the ap_lingering close call which I removed in error
just before going on holiday.
Bill Stoddard [Tue, 13 Jun 2000 14:09:22 +0000 (14:09 +0000)]
Add mpm.h to the src/modules/mpm/winnt directory (it's empty for now, but its presense
is required for http_core.c, et. al.). Update ApacheCore.dsp to pick it up in the
include path.
Ryan Bloom [Tue, 13 Jun 2000 01:22:06 +0000 (01:22 +0000)]
Fix the configuration process. If no modules are specified in a given
directory, then that directory is no longer added to the build process.
Also, I have added a .cvsignore to the file_cache directory and removed
a generated file from this directory. Finally, I have removed
some unnecessary checks from the config.m4 files.
Ryan Bloom [Mon, 12 Jun 2000 21:47:17 +0000 (21:47 +0000)]
Clean up a big chunk of ap_config.h. This basically stops ap_config.h from
including any files. Because of this change, other files must include
their own headers. I also cleaned up a couple of other bugs in some
modules because I had to compile them all.
I expect this to break multiple platforms, but this will be fixed over time.
The massive configure cleanup is almost done. I will go through the files
one more time after this commit.
Chuck Murcko [Mon, 12 Jun 2000 21:41:58 +0000 (21:41 +0000)]
New mod_proxy/mod_cache (file cache) for 2.0. This uses a caching API so
that shared mem, LDAP servers, DBs, etc. can also be used for proxy
caching. The caching API is very young, and subject to change as APR changes.
proxy_cache.c from the proxy subdir is no longer used.
Build with --enable-modules=proxy,cache
Lightly tested on Linux, no warranties expressed or implied yet.
This should be considered a *reference* proxy implementation for 2.0. What
actually ends up shipping with 2.0 is likely going to be rather different as
the redesign evolves. This may end up being the 2.0 backwards compatibility
workalike.
Modified to work with today's conf/build/layout scheme
Jeff Trawick [Mon, 12 Jun 2000 21:39:57 +0000 (21:39 +0000)]
Fix logging of errors creating the httpd.pid file.
perror() was converted to ap_log_error(), which will interpret the
specified APR error code properly.
The existing ap_log_error() call was changed so that the message is
formatted properly. Note that this call is made from the mpm after
we detach from the foreground process, so it can only appear in the
log.
Jeff Trawick [Mon, 12 Jun 2000 21:08:25 +0000 (21:08 +0000)]
Back out ap_set_default_perms(). Remove old logic to play with umask
around the creation of the httpd.pid file. Pass explicit permissions to
ap_open(), omitting write-ability except by the owning user. As always,
we end up with rw-r--r-- for the permissions unless the umask is something
unusual.
Note that the OS/2 and Win32 implementations of ap_open() ignore the
permissions parameter altogether.
Ryan Bloom [Mon, 12 Jun 2000 16:00:33 +0000 (16:00 +0000)]
Add a new function ap_set_default_fperms. This allows people to set the
umask to be used when creating files. This should change the permissions
of files created using APR_DEFAULT_OS. Also removed a warning introduced
with the sys/stat.h changes.
Ryan Bloom [Mon, 12 Jun 2000 15:29:09 +0000 (15:29 +0000)]
Remove the final vestiges of stat.h from Apache 2.0. All calls are now to
ap_stat. This also adds the new function ap_lstat(). This function is
analogous to lstat.
Jeff Trawick [Sun, 11 Jun 2000 22:06:57 +0000 (22:06 +0000)]
Fix a couple of problems with the pre/post config processing changes:
1) symptom: on system with bad/no DNS setup, ServerName isn't
processed so init fails
cause:
ap_fini_vhost_config() called before ap_process_config_tree(), so
ServerName was never stored in the config structure
2) symptom: on system with virtual hosts configured, SIGSEGV in
open_multi_logs()
cause:
the module configs for the virtual hosts haven't been merged in
yet, and open_multi_logs() gets NULL for the mod_log_config
configuration
This stuff needs to be cleaned up further, exploring the use of a
post-config hook for fixup_virtual_hosts(), ap_fini_vhost_config(),
and ap_sort_hooks(), getting a lot of logic out of main(), and
processing the config tree only once.
Ben Laurie [Sun, 11 Jun 2000 14:08:16 +0000 (14:08 +0000)]
Make "make depend" work - pending a real fix, that is. I did attempt to do this
properly, but that means some radical autoconf shit that is, once more, beyond
me.
Jeff Trawick [Sat, 10 Jun 2000 18:20:35 +0000 (18:20 +0000)]
Get FreeBSD 3.4 building again. It doesn't have lib dl, so the build
was broken as of the time we started always sticking in -ldl.
src/modules/standard/config.m4:
. don't add "-ldl" to LIBS for FreeBSD either
. back out previous change regarding LTFLAGS; it should be o.k.
to add it for any platform, because libtool knows what to do with
it (no, Greg A., I haven't added support for it to OS/390 libtool
yet :) )
src/lib/apr/configure.in:
. if dlopen() isn't found in lib dl, don't fret (yet); try to find
it in the default libraries;
Ryan Bloom [Sat, 10 Jun 2000 16:15:08 +0000 (16:15 +0000)]
Cleanup more of the Apache configuration. This removes all of the shared
memory checks, because Apache relies completely on APR for shared memory
support. In doing this, we also need to know how APR/MM are providing
our shared memory (ie file or memory) that requires the change made to
APR's configure script that was just committed.
Jeff Trawick [Sat, 10 Jun 2000 11:25:26 +0000 (11:25 +0000)]
Fix a Solaris compilation problem with mod_cgid:
Use <sys/un.h> to get sockaddr_un. Previously we declared it ourselves
for unknown reasons. I am now able to compile on Linux (RH6.1), Solaris
8, and FreeBSD 3.4. Also, I don't see a mention in UNP V1 (2e) of the
need to play tricks to get sockaddr_un.
dgaudet [Sat, 10 Jun 2000 02:06:02 +0000 (02:06 +0000)]
another iteration on the saferead/bhalfduplex stuff ... there was a
commented out bhalfduplex call which ryan missed; and which was a bit
more troublesome to solve with the iol interface.
dgaudet [Sat, 10 Jun 2000 01:10:10 +0000 (01:10 +0000)]
fix dependencies. (what is a .lo anyway? i tried making the .o depend
on the .h which is how dependencies usually work, but the other rules
didn't work out right unless i used a .lo ... i suppose this only matters
to folks building with -j N)
Ryan Bloom [Fri, 9 Jun 2000 21:19:52 +0000 (21:19 +0000)]
Remove a bunch of string functions from Apache. These are basically
standard string functions like strstr, strcasecmp, etc that Apache used
to define for platforms that don't have them. These functions and the
feature tests have moved down to APR where they really belong. In doing
this, I am also able to remove a bunch of tests from the Apache configure
process.
Ryan Bloom [Fri, 9 Jun 2000 18:57:16 +0000 (18:57 +0000)]
Remove all occurances of strerror from Apache. ap_strerror works just
fine with standard errno values, and it is more portable. This also allows
me to remove the check for strerror from Apache's configure script.
Andrew Braund's very complete review of the Win32 documentation!
These should have a profound effect on the number of Win32 inquiries
and problem reports.
I will have some minor notes on running as another user, and
using the perl .dsp conversion scripts to add as a seperate
commit later today.
Jeff Trawick [Fri, 9 Jun 2000 14:48:58 +0000 (14:48 +0000)]
The prefork MPM now uses an APR lock for the accept() mutex.
It has not been getting a lock at all recently.
Note: The TPF and SGI folks need to each APR how to get the most
efficient lock on those platforms. (For SGI it depends on whether
or not we're building for SMP.)