httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject cvs commit: httpd-2.0/modules/ssl mod_ssl.h ssl_engine_config.c ssl_engine_mutex.c
Date Sat, 29 Mar 2003 02:18:43 GMT
jim         2003/03/28 18:18:43

  Modified:    modules/ssl mod_ssl.h ssl_engine_config.c ssl_engine_mutex.c
  Log:
  Because SSL's child init is run *after* we change uid/gid. So we need to ensure that file-based
  locks have the correct perms so that the child process
  can access them
  
  Revision  Changes    Path
  1.127     +1 -0      httpd-2.0/modules/ssl/mod_ssl.h
  
  Index: mod_ssl.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/mod_ssl.h,v
  retrieving revision 1.126
  retrieving revision 1.127
  diff -u -r1.126 -r1.127
  --- mod_ssl.h	14 Mar 2003 02:20:50 -0000	1.126
  +++ mod_ssl.h	29 Mar 2003 02:18:43 -0000	1.127
  @@ -406,6 +406,7 @@
       ssl_mutexmode_t nMutexMode;
       apr_lockmech_e  nMutexMech;
       const char     *szMutexFile;
  +    BOOL           ChownMutexFile;
       apr_global_mutex_t   *pMutex;
       apr_array_header_t   *aRandSeed;
       apr_hash_t     *tVHostKeys;
  
  
  
  1.77      +3 -0      httpd-2.0/modules/ssl/ssl_engine_config.c
  
  Index: ssl_engine_config.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_config.c,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -r1.76 -r1.77
  --- ssl_engine_config.c	28 Mar 2003 00:43:26 -0000	1.76
  +++ ssl_engine_config.c	29 Mar 2003 02:18:43 -0000	1.77
  @@ -101,6 +101,7 @@
       mc->nMutexMode             = SSL_MUTEXMODE_UNSET;
       mc->nMutexMech             = APR_LOCK_DEFAULT;
       mc->szMutexFile            = NULL;
  +    mc->ChownMutexFile         = FALSE;
       mc->pMutex                 = NULL;
       mc->aRandSeed              = apr_array_make(pool, 4,
                                                   sizeof(ssl_randseed_t));
  @@ -400,6 +401,7 @@
        */
       mc->nMutexMode  = SSL_MUTEXMODE_USED;
       mc->szMutexFile = NULL;
  +    mc->ChownMutexFile = FALSE;
   
       /* NOTE: previously, 'yes' implied 'sem' */
       if (!strcasecmp(meth, "default") || !strcasecmp(meth, "yes")) {
  @@ -413,6 +415,7 @@
   #if APR_HAS_FLOCK_SERIALIZE
       else if ((!strcasecmp(meth, "flock") || !strcasecmp(meth, "file")) && file)
{
           mc->nMutexMech = APR_LOCK_FLOCK;
  +        mc->ChownMutexFile = TRUE;
       }
   #endif
   #if APR_HAS_POSIXSEM_SERIALIZE
  
  
  
  1.23      +2 -0      httpd-2.0/modules/ssl/ssl_engine_mutex.c
  
  Index: ssl_engine_mutex.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_mutex.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- ssl_engine_mutex.c	27 Mar 2003 23:51:22 -0000	1.22
  +++ ssl_engine_mutex.c	29 Mar 2003 02:18:43 -0000	1.23
  @@ -88,6 +88,8 @@
                            "Cannot create SSLMutex");
           return FALSE;
       }
  +    if (mc->szMutexFile && mc->ChownMutexFile == TRUE)
  +        chown(mc->szMutexFile, unixd_config.user_id, -1);
   
   #if APR_USE_SYSVSEM_SERIALIZE
       rv = unixd_set_global_mutex_perms(mc->pMutex);
  
  
  

Mime
View raw message