Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 34439 invoked by uid 500); 31 Mar 2003 06:53:14 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 34406 invoked from network); 31 Mar 2003 06:53:13 -0000 Errors-To: Message-Id: <5.2.0.9.2.20030331005024.032ba800@pop3.rowe-clan.net> X-Sender: wrowe%rowe-clan.net@pop3.rowe-clan.net X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Mon, 31 Mar 2003 00:53:12 -0600 To: dev@httpd.apache.org From: "William A. Rowe, Jr." Subject: [patch] two small problems in ssl_engine_mutex.c Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=====================_344846968==_" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --=====================_344846968==_ Content-Type: text/plain; charset="us-ascii" 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. 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. Please review. Bill --=====================_344846968==_ Content-Type: text/plain; charset="us-ascii" Content-Disposition: attachment; filename="ssl_mutex.patch" Index: modules/ssl/ssl_engine_mutex.c =================================================================== RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_mutex.c,v retrieving revision 1.17.2.4 diff -u -r1.17.2.4 ssl_engine_mutex.c --- modules/ssl/ssl_engine_mutex.c 30 Mar 2003 23:17:22 -0000 1.17.2.4 +++ modules/ssl/ssl_engine_mutex.c 31 Mar 2003 06:50:40 -0000 @@ -84,16 +84,21 @@ "Cannot create SSLMutex"); return FALSE; } +#if APR_HAS_FLOCK_SERIALIZE if (mc->szMutexFile && mc->ChownMutexFile == TRUE) chown(mc->szMutexFile, unixd_config.user_id, -1); +#endif -#if APR_USE_SYSVSEM_SERIALIZE - rv = unixd_set_global_mutex_perms(mc->pMutex); - if (rv != APR_SUCCESS) { - ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, - "Could not set permissions on ssl_mutex; check User " - "and Group directives"); - return FALSE; +#if APR_HAS_SYSVSEM_SERIALIZE + if (((mc->nMutexMech == APR_LOCK_DEFAULT) && APR_USE_SYSVSEM_SERIALIZE) + || (mc->nMutexMech == APR_LOCK_SYSVSEM)) { + rv = unixd_set_global_mutex_perms(mc->pMutex); + if (rv != APR_SUCCESS) { + ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, + "Could not set permissions on ssl_mutex; check User " + "and Group directives"); + return FALSE; + } } #endif return TRUE; --=====================_344846968==_ Content-Type: text/plain; charset="us-ascii" --=====================_344846968==_--