Commit dcb1456e authored by Justin Erenkrantz's avatar Justin Erenkrantz
Browse files

Apply same patch (nee hack) to mod_ssl as was done to mod_rewrite to

get cross-process mutex permissions working.

This is waiting for a proper APR interface, but this does not mean that
we should remain broken in the meantime.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/ssl@95057 13f79535-47bb-0310-9956-ffa450edef68
parent de81e7f3
Loading
Loading
Loading
Loading
+15 −0
Changes for ssl_engine_mutex.c: 15 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -61,10 +61,16 @@
                                  because DEC 25 = OCT 31.''
                                             -- Unknown     */
#include "mod_ssl.h"
#if !defined(OS2) && !defined(WIN32) && !defined(BEOS) && !defined(NETWARE)
#include "unixd.h"
#endif

int ssl_mutex_init(server_rec *s, apr_pool_t *p)
{
    SSLModConfigRec *mc = myModConfig(s);
#if !defined(OS2) && !defined(WIN32) && !defined(BEOS) && !defined(NETWARE)
    apr_status_t rv;
#endif

    if (mc->nMutexMode == SSL_MUTEXMODE_NONE) 
        return TRUE;
@@ -76,6 +82,15 @@ int ssl_mutex_init(server_rec *s, apr_pool_t *p)
                    mc->szMutexFile);
        return FALSE;
    }

#if !defined(OS2) && !defined(WIN32) && !defined(BEOS) && !defined(NETWARE)
    rv = unixd_set_global_mutex_perms_lock(mc->pMutex);
    if (rv != APR_SUCCESS) {
        ssl_log(s, SSL_LOG_ERROR, "Could not set permissions on "
                     "ssl_mutex; check User and Group directives");
        return FALSE;
    }
#endif
    return TRUE;
}