diff options
author | olavmrk <olavmrk@a716ebb1-153a-0410-b759-cfb97c6a1b53> | 2008-10-20 11:50:10 +0000 |
---|---|---|
committer | olavmrk <olavmrk@a716ebb1-153a-0410-b759-cfb97c6a1b53> | 2008-10-20 11:50:10 +0000 |
commit | 4a11abb0766232162d57096cfaea7445fd60a3d0 (patch) | |
tree | d562bd3b60843035d92dd94aae6692d386249413 /mod_auth_mellon.c | |
parent | daeadc382dbd514679b2c1d8a93565fd98c911dc (diff) | |
download | mod_auth_mellon-4a11abb0766232162d57096cfaea7445fd60a3d0.tar.gz mod_auth_mellon-4a11abb0766232162d57096cfaea7445fd60a3d0.tar.xz mod_auth_mellon-4a11abb0766232162d57096cfaea7445fd60a3d0.zip |
Set permissions on global mutex after creation.
git-svn-id: https://modmellon.googlecode.com/svn/trunk@27 a716ebb1-153a-0410-b759-cfb97c6a1b53
Diffstat (limited to 'mod_auth_mellon.c')
-rw-r--r-- | mod_auth_mellon.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mod_auth_mellon.c b/mod_auth_mellon.c index 0f1ee5e..a7fa884 100644 --- a/mod_auth_mellon.c +++ b/mod_auth_mellon.c @@ -24,6 +24,10 @@ #include <curl/curl.h> +#ifdef AP_NEED_SET_MUTEX_PERMS +#include "unixd.h" +#endif + /* This function is called on server exit. It destroys the shared memory we * allocated for storing session data, and the global mutex we used to @@ -165,6 +169,19 @@ static int am_global_init(apr_pool_t *conf, apr_pool_t *log, return !OK; } +#ifdef AP_NEED_SET_MUTEX_PERMS + /* On some platforms the mutex is implemented as a file. To allow child + * processes running as a different user to open it, it is necessary to + * change the permissions on it. */ + rv = unixd_set_global_mutex_perms(mod->lock); + if (rv != APR_SUCCESS) { + ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, + "Failed to set permissions on session table lock;" + " check User and Group directives"); + return rv; + } +#endif + return OK; } |