httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: [patch] two small problems in ssl_engine_mutex.c
Date Mon, 31 Mar 2003 14:22:29 GMT
William A. Rowe, Jr. wrote:
> 
> One, win32 won't compile (nor any platform missing chown).  In this
> case we didn't need it and have a good macro to look at.

+1. We also use chown in a few other places as well:

./modules/generators/mod_cgid.c:        if (chown(sconf->sockname, unixd_config.user_id,
-1) < 0) {
./modules/ssl/ssl_scache_dbm.c:        chown(mc->szSessionCacheDataFile, unixd_config.user_id,
-1 /* no gid change */);
./modules/ssl/ssl_scache_dbm.c:        if (chown(apr_pstrcat(p, mc->szSessionCacheDataFile,
SSL_DBM_FILE_SUFFIX_DIR, NULL),
./modules/ssl/ssl_scache_dbm.c:            if (chown(apr_pstrcat(p, mc->szSessionCacheDataFile,
".db", NULL),
./modules/ssl/ssl_scache_dbm.c:                chown(apr_pstrcat(p, mc->szSessionCacheDataFile,
".dir", NULL),
./modules/ssl/ssl_scache_dbm.c:        if (chown(apr_pstrcat(p, mc->szSessionCacheDataFile,
SSL_DBM_FILE_SUFFIX_PAG, NULL),
./modules/ssl/ssl_scache_dbm.c:            if (chown(apr_pstrcat(p, mc->szSessionCacheDataFile,
".db", NULL),
./modules/ssl/ssl_scache_dbm.c:                chown(apr_pstrcat(p, mc->szSessionCacheDataFile,
".pag", NULL),

> 
> This raised another bug in the next line.  We assumed because we
> default to SYSV mutexes we should do that magic.  I believe this is
> wrong, and we should be looking for that sort of lock explicitly.
> 

+1. Note that we only call it if APR_USE_SYSVSEM_SERIALIZE is defined,
but the code itself is a noop unless APR_HAS_SYSVSEM_SERIALIZE is defined
(defined means 1). Good catch.

-- 
===========================================================================
   Jim Jagielski   [|]   jim@jaguNET.com   [|]   http://www.jaguNET.com/
      "A society that will trade a little liberty for a little order
             will lose both and deserve neither" - T.Jefferson

Mime
View raw message