diff options
Diffstat (limited to 'apache2x')
-rw-r--r-- | apache2x/mod_httpauth.c | 16 |
1 files changed, 15 insertions, 1 deletions
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 <http_request.h> #include <ap_config.h> #include <apr_strings.h> -#include "apr_file_io.h" +#include <apr_file_io.h> #include <apr_lib.h> #include <apr_shm.h> +#ifdef AP_NEED_SET_MUTEX_PERMS +#include <unixd.h> +#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; |