]> granicus.if.org Git - apache/commitdiff
Apply same patch (nee hack) to mod_ssl as was done to mod_rewrite to
authorJustin Erenkrantz <jerenkrantz@apache.org>
Mon, 13 May 2002 07:38:30 +0000 (07:38 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Mon, 13 May 2002 07:38:30 +0000 (07:38 +0000)
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@95057 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_engine_mutex.c

index f5ee1df13eb3b12ed0fa5655453b24f691bfcc87..4aa6dc547b634c5203fe43c8ca84c464bf33ef26 100644 (file)
                                   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;
 }