diff options
author | Stef Walter <stef@memberwebs.com> | 2008-06-27 22:19:52 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2008-06-27 22:19:52 +0000 |
commit | d14cd8e7ea3baa0a779ee6bddc5feacbc66a8e7f (patch) | |
tree | 7a2270ed3acfdb93cdbec4550fa87530deb1bf9f /apache2x/mod_httpauth.c | |
parent | f2cfcea924cd8afbee66ffd03878d03e20e4a37a (diff) |
Set permissions on the global mutex.
Diffstat (limited to 'apache2x/mod_httpauth.c')
-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; |