mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
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. This resolves a fatal problem with mod_rewrite on systems where APR uses flock-based mutex. It simplifies mod_ssl as well, which had special logic to perform the chown(). It fixed an init error with mod_ssl on systems where flock is used when the user had no SSLMutex directive. The Unix MPMs continue to call unixd_set_global|proc_mutex_perms() only for SysV sems. There is no permission problem with flock-based accept mutexes since the child init logic for the MPMs is done prior to switching identity. PR: 20312 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100189 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -101,7 +101,6 @@ SSLModConfigRec *ssl_config_global_create(server_rec *s)
|
||||
mc->nMutexMode = SSL_MUTEXMODE_UNSET;
|
||||
mc->nMutexMech = APR_LOCK_DEFAULT;
|
||||
mc->szMutexFile = NULL;
|
||||
mc->ChownMutexFile = FALSE;
|
||||
mc->pMutex = NULL;
|
||||
mc->aRandSeed = apr_array_make(pool, 4,
|
||||
sizeof(ssl_randseed_t));
|
||||
@@ -401,7 +400,6 @@ const char *ssl_cmd_SSLMutex(cmd_parms *cmd,
|
||||
*/
|
||||
mc->nMutexMode = SSL_MUTEXMODE_USED;
|
||||
mc->szMutexFile = NULL;
|
||||
mc->ChownMutexFile = FALSE;
|
||||
|
||||
/* NOTE: previously, 'yes' implied 'sem' */
|
||||
if (!strcasecmp(meth, "default") || !strcasecmp(meth, "yes")) {
|
||||
@@ -415,7 +413,6 @@ const char *ssl_cmd_SSLMutex(cmd_parms *cmd,
|
||||
#if APR_HAS_FLOCK_SERIALIZE
|
||||
else if ((!strcasecmp(meth, "flock") || !strcasecmp(meth, "file")) && file) {
|
||||
mc->nMutexMech = APR_LOCK_FLOCK;
|
||||
mc->ChownMutexFile = TRUE;
|
||||
}
|
||||
#endif
|
||||
#if APR_HAS_POSIXSEM_SERIALIZE
|
||||
|
Reference in New Issue
Block a user