@@ -51,7 +51,7 @@ struct ap_socache_instance_t {
5151/**
5252 * Support for DBM library
5353 */
54- #define SSL_DBM_FILE_MODE ( APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD )
54+ #define DBM_FILE_MODE ( APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD )
5555
5656/* Check for definition of DEFAULT_REL_RUNTIMEDIR */
5757#ifndef DEFAULT_REL_RUNTIMEDIR
@@ -61,16 +61,16 @@ struct ap_socache_instance_t {
6161#endif
6262
6363/* ### this should use apr_dbm_usednames. */
64- #if !defined(SSL_DBM_FILE_SUFFIX_DIR ) && !defined(SSL_DBM_FILE_SUFFIX_PAG )
64+ #if !defined(DBM_FILE_SUFFIX_DIR ) && !defined(DBM_FILE_SUFFIX_PAG )
6565#if defined(DBM_SUFFIX )
66- #define SSL_DBM_FILE_SUFFIX_DIR DBM_SUFFIX
67- #define SSL_DBM_FILE_SUFFIX_PAG DBM_SUFFIX
66+ #define DBM_FILE_SUFFIX_DIR DBM_SUFFIX
67+ #define DBM_FILE_SUFFIX_PAG DBM_SUFFIX
6868#elif defined(__FreeBSD__ ) || (defined(DB_LOCK ) && defined(DB_SHMEM ))
69- #define SSL_DBM_FILE_SUFFIX_DIR ".db"
70- #define SSL_DBM_FILE_SUFFIX_PAG ".db"
69+ #define DBM_FILE_SUFFIX_DIR ".db"
70+ #define DBM_FILE_SUFFIX_PAG ".db"
7171#else
72- #define SSL_DBM_FILE_SUFFIX_DIR ".dir"
73- #define SSL_DBM_FILE_SUFFIX_PAG ".pag"
72+ #define DBM_FILE_SUFFIX_DIR ".dir"
73+ #define DBM_FILE_SUFFIX_PAG ".pag"
7474#endif
7575#endif
7676
@@ -127,9 +127,9 @@ static apr_status_t socache_dbm_init(ap_socache_instance_t *ctx,
127127 apr_pool_clear (ctx -> pool );
128128
129129 if ((rv = apr_dbm_open (& dbm , ctx -> data_file ,
130- APR_DBM_RWCREATE , SSL_DBM_FILE_MODE , ctx -> pool )) != APR_SUCCESS ) {
130+ APR_DBM_RWCREATE , DBM_FILE_MODE , ctx -> pool )) != APR_SUCCESS ) {
131131 ap_log_error (APLOG_MARK , APLOG_ERR , rv , s ,
132- "Cannot create SSLSessionCache DBM file `%s'" ,
132+ "Cannot create socache DBM file `%s'" ,
133133 ctx -> data_file );
134134 return rv ;
135135 }
@@ -146,14 +146,14 @@ static apr_status_t socache_dbm_init(ap_socache_instance_t *ctx,
146146 */
147147 if (geteuid () == 0 /* is superuser */ ) {
148148 chown (ctx -> data_file , ap_unixd_config .user_id , -1 /* no gid change */ );
149- if (chown (apr_pstrcat (p , ctx -> data_file , SSL_DBM_FILE_SUFFIX_DIR , NULL ),
149+ if (chown (apr_pstrcat (p , ctx -> data_file , DBM_FILE_SUFFIX_DIR , NULL ),
150150 ap_unixd_config .user_id , -1 ) == -1 ) {
151151 if (chown (apr_pstrcat (p , ctx -> data_file , ".db" , NULL ),
152152 ap_unixd_config .user_id , -1 ) == -1 )
153153 chown (apr_pstrcat (p , ctx -> data_file , ".dir" , NULL ),
154154 ap_unixd_config .user_id , -1 );
155155 }
156- if (chown (apr_pstrcat (p , ctx -> data_file , SSL_DBM_FILE_SUFFIX_PAG , NULL ),
156+ if (chown (apr_pstrcat (p , ctx -> data_file , DBM_FILE_SUFFIX_PAG , NULL ),
157157 ap_unixd_config .user_id , -1 ) == -1 ) {
158158 if (chown (apr_pstrcat (p , ctx -> data_file , ".db" , NULL ),
159159 ap_unixd_config .user_id , -1 ) == -1 )
@@ -170,8 +170,8 @@ static apr_status_t socache_dbm_init(ap_socache_instance_t *ctx,
170170static void socache_dbm_kill (ap_socache_instance_t * ctx , server_rec * s )
171171{
172172 /* the correct way */
173- unlink (apr_pstrcat (ctx -> pool , ctx -> data_file , SSL_DBM_FILE_SUFFIX_DIR , NULL ));
174- unlink (apr_pstrcat (ctx -> pool , ctx -> data_file , SSL_DBM_FILE_SUFFIX_PAG , NULL ));
173+ unlink (apr_pstrcat (ctx -> pool , ctx -> data_file , DBM_FILE_SUFFIX_DIR , NULL ));
174+ unlink (apr_pstrcat (ctx -> pool , ctx -> data_file , DBM_FILE_SUFFIX_PAG , NULL ));
175175 /* the additional ways to be sure */
176176 unlink (apr_pstrcat (ctx -> pool , ctx -> data_file , ".dir" , NULL ));
177177 unlink (apr_pstrcat (ctx -> pool , ctx -> data_file , ".pag" , NULL ));
@@ -228,17 +228,17 @@ static apr_status_t socache_dbm_store(ap_socache_instance_t *ctx,
228228 apr_pool_clear (ctx -> pool );
229229
230230 if ((rv = apr_dbm_open (& dbm , ctx -> data_file ,
231- APR_DBM_RWCREATE , SSL_DBM_FILE_MODE , ctx -> pool )) != APR_SUCCESS ) {
231+ APR_DBM_RWCREATE , DBM_FILE_MODE , ctx -> pool )) != APR_SUCCESS ) {
232232 ap_log_error (APLOG_MARK , APLOG_ERR , rv , s ,
233- "Cannot open SSLSessionCache DBM file `%s' for writing "
233+ "Cannot open socache DBM file `%s' for writing "
234234 "(store)" ,
235235 ctx -> data_file );
236236 free (dbmval .dptr );
237237 return rv ;
238238 }
239239 if ((rv = apr_dbm_store (dbm , dbmkey , dbmval )) != APR_SUCCESS ) {
240240 ap_log_error (APLOG_MARK , APLOG_ERR , rv , s ,
241- "Cannot store SSL session to DBM file `%s'" ,
241+ "Cannot store socache object to DBM file `%s'" ,
242242 ctx -> data_file );
243243 apr_dbm_close (dbm );
244244 free (dbmval .dptr );
@@ -281,9 +281,9 @@ static apr_status_t socache_dbm_retrieve(ap_socache_instance_t *ctx, server_rec
281281 */
282282 apr_pool_clear (ctx -> pool );
283283 if ((rc = apr_dbm_open (& dbm , ctx -> data_file , APR_DBM_RWCREATE ,
284- SSL_DBM_FILE_MODE , ctx -> pool )) != APR_SUCCESS ) {
284+ DBM_FILE_MODE , ctx -> pool )) != APR_SUCCESS ) {
285285 ap_log_error (APLOG_MARK , APLOG_ERR , rc , s ,
286- "Cannot open SSLSessionCache DBM file `%s' for reading "
286+ "Cannot open socache DBM file `%s' for reading "
287287 "(fetch)" ,
288288 ctx -> data_file );
289289 return rc ;
@@ -337,9 +337,9 @@ static apr_status_t socache_dbm_remove(ap_socache_instance_t *ctx,
337337 apr_pool_clear (ctx -> pool );
338338
339339 if ((rv = apr_dbm_open (& dbm , ctx -> data_file , APR_DBM_RWCREATE ,
340- SSL_DBM_FILE_MODE , ctx -> pool )) != APR_SUCCESS ) {
340+ DBM_FILE_MODE , ctx -> pool )) != APR_SUCCESS ) {
341341 ap_log_error (APLOG_MARK , APLOG_ERR , rv , s ,
342- "Cannot open SSLSessionCache DBM file `%s' for writing "
342+ "Cannot open socache DBM file `%s' for writing "
343343 "(delete)" ,
344344 ctx -> data_file );
345345 return rv ;
@@ -401,9 +401,9 @@ static void socache_dbm_expire(ap_socache_instance_t *ctx, server_rec *s)
401401 /* pass 1: scan DBM database */
402402 keyidx = 0 ;
403403 if ((rv = apr_dbm_open (& dbm , ctx -> data_file , APR_DBM_RWCREATE ,
404- SSL_DBM_FILE_MODE , ctx -> pool )) != APR_SUCCESS ) {
404+ DBM_FILE_MODE , ctx -> pool )) != APR_SUCCESS ) {
405405 ap_log_error (APLOG_MARK , APLOG_ERR , rv , s ,
406- "Cannot open SSLSessionCache DBM file `%s' for "
406+ "Cannot open socache DBM file `%s' for "
407407 "scanning" ,
408408 ctx -> data_file );
409409 break ;
@@ -434,9 +434,9 @@ static void socache_dbm_expire(ap_socache_instance_t *ctx, server_rec *s)
434434
435435 /* pass 2: delete expired elements */
436436 if (apr_dbm_open (& dbm , ctx -> data_file , APR_DBM_RWCREATE ,
437- SSL_DBM_FILE_MODE , ctx -> pool ) != APR_SUCCESS ) {
437+ DBM_FILE_MODE , ctx -> pool ) != APR_SUCCESS ) {
438438 ap_log_error (APLOG_MARK , APLOG_ERR , rv , s ,
439- "Cannot re-open SSLSessionCache DBM file `%s' for "
439+ "Cannot re-open socache DBM file `%s' for "
440440 "expiring" ,
441441 ctx -> data_file );
442442 break ;
@@ -473,9 +473,9 @@ static void socache_dbm_status(ap_socache_instance_t *ctx, request_rec *r,
473473
474474 apr_pool_clear (ctx -> pool );
475475 if ((rv = apr_dbm_open (& dbm , ctx -> data_file , APR_DBM_RWCREATE ,
476- SSL_DBM_FILE_MODE , ctx -> pool )) != APR_SUCCESS ) {
476+ DBM_FILE_MODE , ctx -> pool )) != APR_SUCCESS ) {
477477 ap_log_rerror (APLOG_MARK , APLOG_ERR , rv , r ,
478- "Cannot open SSLSessionCache DBM file `%s' for status "
478+ "Cannot open socache DBM file `%s' for status "
479479 "retrival" ,
480480 ctx -> data_file );
481481 return ;
0 commit comments