Most likely it *is* fixed in 2.1 - I saw this problem on 2.0, but I looked at the code of 2.1 and saw that the code looks the same, so assumed (I know, assuming is bad...) that it is still broken.
hey, that's a pretty mean trick :)
But this can be applied to 2.0, where I think it isn't fixed yet.
I humbly submit that the patch already listed in APACHE_2_0_BRANCH/STATUS is what should be available in the next 2.0.x release:
* Unix: Handle permissions settings for flock-based mutexes in
unixd_set_global|proc_mutex_perms(). Allow the functions to
be called for any type of mutex. PR 20312
modules/mappers/mod_rewrite.c 1.153
modules/ssl/mod_ssl.h 1.136
modules/ssl/ssl_engine_config.c 1.81
modules/ssl/ssl_engine_mutex.c 1.26
os/unix/unixd.c 1.58
os/unix/unixd.h 1.38
+1: trawick, jerenkrantzThe parts that fix mod_rewrite specifically are the changes to mod_rewrite.c, unixd.c, and unixd.h. the ssl changes are just a cleanup made possible by the infrastructure knowing when a chown() is necessary.
The issues with your patch are:
. your patch does the chown() for more than just flock()-ed files
. there is a better place to put the non-portable flock() code, both to keep it out of mod_rewrite and to help solve the problem for any other modules
