From: Cliff Woolley Date: Tue, 30 Apr 2002 03:47:31 +0000 (+0000) Subject: - Sync with modssl 2.8.8-1.3.24 X-Git-Tag: 2.0.36~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0db4d51f742db2a41958868f48ddb8cb11a2b4de;p=apache - Sync with modssl 2.8.8-1.3.24 - 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 --- diff --git a/CHANGES b/CHANGES index b13c5edf81..c6c8b31250 100644 --- 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] diff --git a/modules/ssl/ssl_engine_log.c b/modules/ssl/ssl_engine_log.c index e30a3b817b..6050502731 100644 --- a/modules/ssl/ssl_engine_log.c +++ b/modules/ssl/ssl_engine_log.c @@ -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); diff --git a/modules/ssl/ssl_scache_shmcb.c b/modules/ssl/ssl_scache_shmcb.c index 2595789395..6bcb6fbe8c 100644 --- a/modules/ssl/ssl_scache_shmcb.c +++ b/modules/ssl/ssl_scache_shmcb.c @@ -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);