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-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1ff0d63317630be60bb92938c7df364379d37ca;p=thirdparty%2Fapache%2Fhttpd.git - 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/modules/ssl@94875 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/ssl_engine_log.c b/ssl_engine_log.c index e30a3b817b3..6050502731a 100644 --- a/ssl_engine_log.c +++ b/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/ssl_scache_shmcb.c b/ssl_scache_shmcb.c index 25957893952..6bcb6fbe8c6 100644 --- a/ssl_scache_shmcb.c +++ b/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);