]> granicus.if.org Git - apache/commitdiff
If the file specified by SSLMutex cannot be created (because the directory does...
authorJustin Erenkrantz <jerenkrantz@apache.org>
Sat, 16 Feb 2002 18:35:21 +0000 (18:35 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Sat, 16 Feb 2002 18:35:21 +0000 (18:35 +0000)
(Justin made one formatting change to this patch.)

Submitted by: Adam Sussman <myddryn@vishnu.vidya.com>
Reviewed by: Justin Erenkrantz

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93441 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/ssl/ssl_engine_init.c
modules/ssl/ssl_engine_mutex.c

diff --git a/CHANGES b/CHANGES
index 9a56dafe92a0102ed9ae174485427a2c56455c6c..7d65b43929062678857423c5da7fe22582ac3f3a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,8 @@
 Changes with Apache 2.0.33-dev
+
+  *) Fix segfault and display error when SSLMutex file can not be
+     created.  [Adam Sussman <myddryn@vishnu.vidya.com>]
+
   *) Add reference counting to mod_mem_cache cache objects to
      better manage removing objects from the cache.
      [Bill Stoddard]
index b587235a063226a7c79fe1105717f0716c13a20c..c7a977645483b384441e696e8cfd16fae86b2f05 100644 (file)
@@ -214,7 +214,9 @@ int ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
     /*
      *  initialize the mutex handling and session caching
      */
-    ssl_mutex_init(s, p);
+    if (!ssl_mutex_init(s, p)) {
+        return HTTP_INTERNAL_SERVER_ERROR;
+    }
     ssl_scache_init(s, p);
 
     /*
index 8164d28b6969ad2dbe903a64a67ab20bcfe82ccc..fb0f06b4132df996897b9b541bac106649910348 100644 (file)
@@ -70,8 +70,12 @@ int ssl_mutex_init(server_rec *s, apr_pool_t *p)
         return TRUE;
 
     if (apr_lock_create(&mc->pMutex, APR_MUTEX, APR_LOCKALL, APR_LOCK_DEFAULT,
-                        mc->szMutexFile, p) != APR_SUCCESS)
+                        mc->szMutexFile, p) != APR_SUCCESS) {
+        ssl_log(s, SSL_LOG_CRIT|SSL_ADD_ERRNO,
+                   "Cannot create SSLMutex file `%s'",
+                    mc->szMutexFile);
         return FALSE;
+    }
     return TRUE;
 }