Hi Ralf,
After you finish finally to insert all of my other patches into the
standard source tree of mod_ssl, I have a magic patch which can
finally resolve the most annoying problem of many mod_ssl users: The
conflicts with modules which were compiled without the patched
header files (i.e. httpd.h) and/or without "-DEAPI".
The trick is simple, and I already used it to extend the
functionality of Xt Widgets (e.g. Motif, Xaw, etc.) with no need for
recompilation or even for the source.
The trick is based on allocating more than needed for any of the
relevant structures (request_rec, conn_rec, server_rec), but passing
only part of them to the caller (from the middle, so the extra space
is in "negative" addresses relative to the beginning of the "real"
structures, to avoid conflict with other extensions, such as the
current EAPI). During the life cycle of the structure, the extra
information (e.g. ctx) is accessed using a negative offset (of
course, with the correct alignments; It's simple). When the
structure should be freed, the "free()" function receives the
ORIGINAL address which was returned by the original malloc. Of
course, in our case it is even simpler, since the garbage collection
of the pool mechanism does it automatically.
It is recommended to include a magic number in the extra information
so in case of a structure which was allocated not through the
standard places (http_config.c, http_main.c, http_protocol.c, and
http_request.c), a safety check can be done, and the extra
information will be ignored.
Together with my other patches, I think that it deserves a new major
number - 2.6.0-1.3.12 :-)
--
Eli Marmor
************************************************************
* ___ _ __ ___ __ _ |__ _ _ [EMAIL PROTECTED] *
* | | | \ | | \ | / |\/ El-Mar Software Ltd. *
* | | | _) | | _) / | \ Tel.: 972-50-237338 *
* ___________________________ Fax: 972-9-766-1314 *
* \_________________________ \ http://elmar.co.il *
* _________ __ ____ \ \____ __ _ *
* \_______ \ \_\| _ \ __ \____ \ \ \ | | *
* \ \ | | \ \ \_\ \ \ \ \ | | *
* \ \ | | _\ \ ) ) \ \ \_\_ *
* \ \ |_| \___) (_/ \_\ \_\ *
* \ \_______________________________ *
* \________________________________\ *
* *
**********************************************
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]