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));
*/
mc->nMutexMode = SSL_MUTEXMODE_USED;
mc->szMutexFile = NULL;
- mc->ChownMutexFile = FALSE;
/* NOTE: previously, 'yes' implied 'sem' */
if (!strcasecmp(meth, "default") || !strcasecmp(meth, "yes")) {
#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
#include "mod_ssl.h"
#if !defined(OS2) && !defined(WIN32) && !defined(BEOS) && !defined(NETWARE)
#include "unixd.h"
+#define MOD_SSL_SET_MUTEX_PERMS /* XXX Apache should define something */
#endif
int ssl_mutex_init(server_rec *s, apr_pool_t *p)
"Cannot create SSLMutex");
return FALSE;
}
-#if !defined(OS2) && !defined(WIN32) && !defined(BEOS) && !defined(NETWARE)
- if (mc->szMutexFile && mc->ChownMutexFile == TRUE)
- chown(mc->szMutexFile, unixd_config.user_id, -1);
-#endif
-#if APR_HAS_SYSVSEM_SERIALIZE
-#if APR_USE_SYSVSEM_SERIALIZE
- if (mc->nMutexMech == APR_LOCK_DEFAULT ||
- mc->nMutexMech == APR_LOCK_SYSVSEM) {
-#else
- if (mc->nMutexMech == APR_LOCK_SYSVSEM) {
-#endif
- rv = unixd_set_global_mutex_perms(mc->pMutex);
- if (rv != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
- "Could not set permissions on ssl_mutex; check User "
- "and Group directives");
- return FALSE;
- }
+#ifdef MOD_SSL_SET_MUTEX_PERMS
+ rv = unixd_set_global_mutex_perms(mc->pMutex);
+ if (rv != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
+ "Could not set permissions on ssl_mutex; check User "
+ "and Group directives");
+ return FALSE;
}
#endif
return TRUE;