]> granicus.if.org Git - apache/commitdiff
- Sync with modssl 2.8.8-1.3.24
authorCliff Woolley <jwoolley@apache.org>
Tue, 30 Apr 2002 03:47:31 +0000 (03:47 +0000)
committerCliff Woolley <jwoolley@apache.org>
Tue, 30 Apr 2002 03:47:31 +0000 (03:47 +0000)
- Also a minor change to add more useful error
  logging for shmcb startup failures

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

CHANGES
modules/ssl/ssl_engine_log.c
modules/ssl/ssl_scache_shmcb.c

diff --git a/CHANGES b/CHANGES
index b13c5edf81e4629d8497af835084a71893549265..c6c8b31250b7acc78460593c52288d95649f3bb1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,10 @@
 Changes with Apache 2.0.37
 
+  *) Synced with remaining changes from mod_ssl 2.8.8-1.3.24:
+     - Avoid SIGBUS on sparc machines with SHMCB session caches
+     - Allow whitespace between the pipe and the name of the
+     program in SSLLog "| /path/to/program".  [Cliff Woolley]
+
   *) Introduce mod_ext_filter and mod_deflate experimental modules
      to the Win32 build (zlib sources must be in srclib\zlib.)
      [William Rowe]
index e30a3b817b39b892789bc642df1fff08e86963a4..6050502731a37437d57ef5047746934a71a45a6b 100644 (file)
@@ -97,6 +97,8 @@ void ssl_log_open(server_rec *s_main, server_rec *s, apr_pool_t *p)
             return;
         else if (sc->log_file_name[0] == '|') {
             szLogFile = sc->log_file_name + 1;
+            while (*szLogFile == ' ' || *szLogFile == '\t')
+                szLogFile++;
             if ((pl = ap_open_piped_log(p, szLogFile)) == NULL) {
                 ssl_log(s, SSL_LOG_ERROR|SSL_ADD_ERRNO,
                         "Cannot open reliable pipe to SSL logfile filter %s", szLogFile);
index 2595789395243a6e953dabb539ef124ec1ffd1c7..6bcb6fbe8c65c5558beacaa77d15b902a3abc86a 100644 (file)
@@ -269,13 +269,10 @@ static void shmcb_set_safe_time_ex(unsigned char *, const unsigned char *);
 
 /* This is necessary simply so that the size passed to memset() is not a
  * compile-time constant, preventing the compiler from optimising it. */
-#if 0
-/* XXX: this isn't used, is it needed? */
 static void shmcb_safe_clear(void *ptr, size_t size)
 {
        memset(ptr, 0, size);
 }
-#endif
 
 /* Underlying functions for session-caching */
 static BOOL shmcb_init_memory(server_rec *, void *, unsigned int);
@@ -385,8 +382,10 @@ void ssl_scache_shmcb_init(server_rec *s, apr_pool_t *p)
                              mc->nSessionCacheDataSize, 
                              mc->szSessionCacheDataFile,
                              mc->pPool)) != APR_SUCCESS) {
+        char buf[100];
         ssl_log(s, SSL_LOG_ERROR,
-                "Cannot allocate shared memory: %d", rv);
+                "Cannot allocate shared memory: (%d)%s", rv,
+                apr_strerror(rv, buf, sizeof(buf)));
         ssl_die();
     }
 
@@ -394,8 +393,10 @@ void ssl_scache_shmcb_init(server_rec *s, apr_pool_t *p)
                              apr_shm_baseaddr_get(mc->pSessionCacheDataMM),
                              mc->nSessionCacheDataSize,
                              mc->pPool)) != APR_SUCCESS) {
+        char buf[100];
         ssl_log(s, SSL_LOG_ERROR,
-                "Cannot initialize rmm: %d", rv);
+                "Cannot initialize rmm: (%d)%s", rv,
+                apr_strerror(rv, buf, sizeof(buf)));
         ssl_die();
     }
 
@@ -1179,7 +1180,7 @@ static BOOL shmcb_insert_encoded_session(
                 "internal error");
         return FALSE;
     }
-    memset(idx, 0, sizeof(SHMCBIndex));
+    shmcb_safe_clear(idx, sizeof(SHMCBIndex));
     shmcb_set_safe_time(&(idx->expires), expiry_time);
     shmcb_set_safe_uint(&(idx->offset), new_offset);