If the file specified by SSLMutex cannot be created (because the directory does not exist for example), children will segfault on init without giving any reason that the user can figure out. This happens because the module init in the parent never checks to see if the mutex intialization succeded. This patch adds this check and a user-friendly error message.
(Justin made one formatting change to this patch.)
Submitted by: Adam Sussman <myddryn@vishnu.vidya.com>
Reviewed by: Justin Erenkrantz
Bill Stoddard [Fri, 15 Feb 2002 22:26:35 +0000 (22:26 +0000)]
Add a reference counter to the mem_cache_object_t and code to
manage deleting the cache_object after the reference count
drops to 0. Not fully tested yet..
Aaron Bannert [Fri, 15 Feb 2002 21:14:30 +0000 (21:14 +0000)]
Change the verbage on the ScoreBoardFile in our default configs.
Also change the default to be commented out (unspecified) so we
get anonymous shared memory by default.
Aaron Bannert [Fri, 15 Feb 2002 20:48:19 +0000 (20:48 +0000)]
Implement new ScoreBoardFile directive logic. This affects how we
create the scoreboard's shared memory segment. We now have the best of
both worlds:
if config specifies ScoreBoardFile
create name-based shared memory, errors are fatal
else /* we get to choose */
create anonymous shared memory
if ENOTIMPL
create name-based shared memory from DEFAULT_SCOREBOARD
else
errors are fatal
This gives us the flexibility to have anonymous shared memory (on platforms
that support it) as well as name-based shared memory when third-party
programs want access to our scoreboard.
The ap_scoreboard_fname static variable is now owned by the scoreboard.c
file, and no longer by the MPMs. The MPMs MUST NOT set ap_scoreboard_fname
to a default, since that will override the default creation logic and
only allow name-based segments.
- Unset content-length in mod_deflate so that the network-layer filters are
free to do what they want and that no C-L is improperly returned.
- Allow non-GET requests and non-html responses to be compressed.
Joshua Slive [Fri, 15 Feb 2002 16:07:28 +0000 (16:07 +0000)]
Change the format slightly so that each "context" get's its own tag in
a <contextlist>. This should make it easier to, for example, generate
an index of all the directives available in a certain context.
Also, add a css stylesheet, turn off link underlining, and turn all the
directive and module names green. Further refinement necessary for sure.
Just toss these debug messages since so many people use httpd with
LogLevel 'debug' and complain if they see anything that says "error"
in it. This case isn't even interesting unless you are hard-core.
Bill Stoddard [Thu, 14 Feb 2002 23:04:43 +0000 (23:04 +0000)]
This is a bug or two away from working... Open both the header and data
files in the open_entity call. Need to be a bit smarter in managing the
cache_info structure
Joshua Slive [Thu, 14 Feb 2002 00:48:04 +0000 (00:48 +0000)]
Add the parts for the xml to html transformation system for the module
docs. Details will be at
http://httpd.apache.org/docs-project/docsformat.html
shortly.
These files cannot be distributed at present - Justin, update your RC.32
Win32 is not escaping or rejecting ANY hazerdous shell command strings
in Apache 2.0 at present. These would include the pipe character (|)
which allows the user to construct malicious request strings.
This needs consideration in code and configuration before we reintroduce
a batch-file based example.
Reported by: Ory Segal <ORY.SEGAL@SANCTUMINC.COM> 13 Feb 2002
Aaron Bannert [Wed, 13 Feb 2002 06:09:02 +0000 (06:09 +0000)]
Just a heads up to let people know what I'm working on. I ran into
some problems with the new POD code in the worker MPM, and although
I'm almost finished I didn't want people rolling a tarball without
knowing of these problems first.
Brian Pane [Wed, 13 Feb 2002 04:49:55 +0000 (04:49 +0000)]
Performance optimization: updated the worker MPM to recycle
per-transaction pools instead of destroying them. Based on
Ian's benchmark testing, this reduces CPU utilization by
about 1% on Solaris.
The final commit to achieve a quality release. We cannot use CreateThread
on Win32 when using the clib; msvcrt has its own initialization and
destruction, so it needs its own turn. _createthreadex is the same but
different - it's implemented by msvcrt and causes all the appropriate
setup and teardown to occur.
Address the issue raised on list that users with a LanguagePriority
directive alone expect 'ForceLanguagePriority Prefer' behavior even
if that directive is omitted.
What happened? 0.9.6b built just dandy without the flags... 0.9.6c won't
build for jack without these changes. Of course they don't harm 0.9.6b
builders either, unless they are outside of the states/EU/AU and find
themselves free to ignore IP considerations.
I'd really like to know _why_ 0.9.6c doesn't configure itself rationally.
Ian Holsman [Tue, 12 Feb 2002 22:54:16 +0000 (22:54 +0000)]
once more with feeling
obj was set before the mutex so someone could have came and updated h->cache_obj
between us setting obj, and useing it.
running now for 10 minutes without core (a record!)
After hours of debugging, the answer was -trivial-, but extremely
obscure and difficult to trace. This should do away with the handle
corruption we experienced. If anyone cares to walk the crt (source
is installed in vc\src\crt if you install it w/ Visual C++/Studio)
it's worth understanding why this occured.
This patch
1. creates the pipe non-inherited, and dups the write end
for inheritence with limited permissions.
2. sets the STD_ERROR_HANDLE _after_ we fixup the FILE *stderr and fd 2.
3. Splits the signal_monitor event in two, service_init/service_term
for clarity and correctness.
Perform a serious scrubbing of the child process, before we report that
we failed to create the child. Cleans up CloseHandle() destruction to
match all created handles - and postpone populating the *child_exit_event
until we succeed.
This code seriously misassumed (and may yet) that stderr was a valid file.
It also has some bogus non-apr code that probably does great evil to win32
services. This must be bumped into .32, code review is incomplete still.
Greg Ames [Sun, 10 Feb 2002 21:16:25 +0000 (21:16 +0000)]
accept() error handling should be OK now.
I don't have a strong opinion on what we should do if the parent dies, now
that we don't have a real life example of that any more. It was a little
confusing at first, but OTOH it kept serving requests.
Greg Stein [Sat, 9 Feb 2002 01:57:38 +0000 (01:57 +0000)]
Get rid of the DAVParam support. That was a concept to help out
mod_dav providers in the 1.0.x series. Nowadays, the providers are
full-fledged Apache modules and can define their own directives and
set up per-server and per-directory parameters. (for example,
mod_dav_fs and the DAVLockDB directive)
Aaron Bannert [Thu, 7 Feb 2002 23:01:47 +0000 (23:01 +0000)]
Allow statically linked support binaries with the new
--enable-static-support flag, and enable this behavior in
the binbuild script. Also add a new --enable-static-htdbm
flag.
Allow mod_autoindex to serve symlinks if permitted and optimize our stats
so that only one stat() is needed.
If we get APR_FINFO_MIN bits, lookup_dirent won't do a repeated stat()
call. So, let's do it here. Also, if we see a symlink, expand it.
(Technically, we don't *have* to expand the symlinks - the resolve_symlink
fix handles that, but we can't really assume that.) Since we know that
dirent will be rr->finfo anyway, go back to relying on dirent only for
APR_DIR checks.
Fix resolve_symlink to save the original symlink name if known.
We would previously receive APR_INCOMPLETE on symlinks if wanted has
FINFO_NAME set because it isn't supported via apr_stat(). Furthermore, we
don't care what the real name is anyway (even if it apr_stat returned
.name) - we want to call it by the name the symlink says it is.