From d14cd8e7ea3baa0a779ee6bddc5feacbc66a8e7f Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Fri, 27 Jun 2008 22:19:52 +0000 Subject: Set permissions on the global mutex. --- apache2x/mod_httpauth.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'apache2x/mod_httpauth.c') diff --git a/apache2x/mod_httpauth.c b/apache2x/mod_httpauth.c index 248dff5..426a83b 100644 --- a/apache2x/mod_httpauth.c +++ b/apache2x/mod_httpauth.c @@ -44,10 +44,14 @@ #include #include #include -#include "apr_file_io.h" +#include #include #include +#ifdef AP_NEED_SET_MUTEX_PERMS +#include +#endif + /* Apache defines these */ #undef PACKAGE_BUGREPORT #undef PACKAGE_NAME @@ -164,6 +168,16 @@ httpauth_initialize (apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_ "httpauth: couldn't create shared memory lock: %s", lock_name); } +#ifdef AP_NEED_SET_MUTEX_PERMS + if (rc == APR_SUCCESS) { + rc = unixd_set_global_mutex_perms (shared_lock); + if (rc != APR_SUCCESS) + ap_log_error (APLOG_MARK, APLOG_ERR, rc, s, + "httpauth: Could not set permissions on lock. " + "check User and Group directives"); + } +#endif + if (rc == APR_SUCCESS) shared_lock_name = lock_name; -- cgit v1.2.3