From 1b3a4c20134bd44d7b3ba4c91d897cb389efc7de Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Tue, 12 Oct 2004 11:55:30 +0000 Subject: [PATCH] * os/unix/os.h: Define AP_NEED_SET_MUTEX_PERMS. * modules/mappers/mod_rewrite.c, modules/ssl/ssl_engine_mutex.c: Use AP_NEED_SET_MUTEX_PERMS to determine whether unixd_set_*_mutex_perms calls are necessary. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105411 13f79535-47bb-0310-9956-ffa450edef68 --- modules/mappers/mod_rewrite.c | 7 +++---- modules/ssl/ssl_engine_mutex.c | 6 +++--- os/unix/os.h | 5 +++++ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index 717d9aab08..0511a78bf2 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -93,9 +93,8 @@ #include "mod_rewrite.h" -#if !defined(OS2) && !defined(WIN32) && !defined(BEOS) && !defined(NETWARE) +#ifdef AP_NEED_SET_MUTEX_PERMS #include "unixd.h" -#define MOD_REWRITE_SET_MUTEX_PERMS /* XXX Apache should define something */ #endif /* @@ -2432,7 +2431,7 @@ static apr_status_t rewritelock_create(server_rec *s, apr_pool_t *p) return rc; } -#ifdef MOD_REWRITE_SET_MUTEX_PERMS +#ifdef AP_NEED_SET_MUTEX_PERMS rc = unixd_set_global_mutex_perms(rewrite_mapr_lock_acquire); if (rc != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_CRIT, rc, s, @@ -4029,7 +4028,7 @@ static int post_config(apr_pool_t *p, return HTTP_INTERNAL_SERVER_ERROR; } -#ifdef MOD_REWRITE_SET_MUTEX_PERMS +#ifdef AP_NEED_SET_MUTEX_PERMS rv = unixd_set_global_mutex_perms(rewrite_log_lock); if (rv != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, diff --git a/modules/ssl/ssl_engine_mutex.c b/modules/ssl/ssl_engine_mutex.c index 2756107c32..9e69879a60 100644 --- a/modules/ssl/ssl_engine_mutex.c +++ b/modules/ssl/ssl_engine_mutex.c @@ -28,9 +28,9 @@ -- Unknown */ #include "ssl_private.h" -#if !defined(OS2) && !defined(WIN32) && !defined(BEOS) && !defined(NETWARE) + +#ifdef AP_NEED_SET_MUTEX_PERMS #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) @@ -57,7 +57,7 @@ int ssl_mutex_init(server_rec *s, apr_pool_t *p) return FALSE; } -#ifdef MOD_SSL_SET_MUTEX_PERMS +#ifdef AP_NEED_SET_MUTEX_PERMS rv = unixd_set_global_mutex_perms(mc->pMutex); if (rv != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, diff --git a/os/unix/os.h b/os/unix/os.h index a78324fba9..bf44cd6e00 100644 --- a/os/unix/os.h +++ b/os/unix/os.h @@ -23,6 +23,11 @@ #define PLATFORM "Unix" #endif +/* On platforms where AP_NEED_SET_MUTEX_PERMS is defined, modules + * should call unixd_set_*_mutex_perms on mutexes created in the + * parent process. */ +#define AP_NEED_SET_MUTEX_PERMS + #ifdef _OSD_POSIX pid_t os_fork(const char *user); #endif -- 2.40.0