Summary: | mod_python makes Apache crash when used with mod_auth_ldap | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | Emmanuel Blot <emmanuel.blot> |
Component: | mod_authn_ldap | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | francois.pesce |
Priority: | P2 | Keywords: | FixedInTrunk, PatchAvailable |
Version: | 2.0.55 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Attachments: | Patch to avoid NULL value for env in mod_auth_ldap |
Description
Emmanuel Blot
2006-03-21 11:23:42 UTC
Created attachment 17997 [details]
Patch to avoid NULL value for env in mod_auth_ldap
If the problem comes from a NULL value in AUTHENTICATE_* environment variable,
as you said, this little patch may fix it.
Never reassign bugs off the notification lists please. Add yourself as a cc, or simply use the additional-comment-from key to search for your own incidents :) Any update about this issue? (In reply to comment #3) > Any update about this issue? The bug seems to be in mod_python rather than apache (whose documentation doesn't AFAICS promise any such environment variables). Having said that, the patch looks fine. The drawback is, it fixes just one instance of the underlying bug. (this is a quick reaction to your question, and ICBW). Any reason for the pstrdup in your patch? Surely no consumer is going to write to memory returned from an env var? Probably because I've been too much bothered of memory leaks in other open source projects where a function heterogeneously and randomly returns const char OR allocated result, that made me unable to know when to deallocate or not. Feel free to change that if you want. I know some (not all) of the subtleties and differences from pools allocation in comparison to "classic" allocation function, but I've decided to keep an homogeneous allocation type to this result. And vals[i] is usualy allocated via apr_pstrdup(). Feel free to change it if you prefer. fixed in 2.4.1 |