httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r710037 - in /httpd/httpd/trunk: include/mpm_common.h modules/arch/unix/mod_unixd.c server/core.c
Date Mon, 03 Nov 2008 11:37:04 GMT
Author: niq
Date: Mon Nov  3 03:37:03 2008
New Revision: 710037

URL: http://svn.apache.org/viewvc?rev=710037&view=rev
Log:
Wrap the global count of privileges handlers operating.  Silence grumblers.

Modified:
    httpd/httpd/trunk/include/mpm_common.h
    httpd/httpd/trunk/modules/arch/unix/mod_unixd.c
    httpd/httpd/trunk/server/core.c

Modified: httpd/httpd/trunk/include/mpm_common.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/mpm_common.h?rev=710037&r1=710036&r2=710037&view=diff
==============================================================================
--- httpd/httpd/trunk/include/mpm_common.h (original)
+++ httpd/httpd/trunk/include/mpm_common.h Mon Nov  3 03:37:03 2008
@@ -365,7 +365,7 @@
 AP_DECLARE_HOOK(int,monitor,(apr_pool_t *p))
 
 /* register modules that undertake to manage system security */
-extern int sys_privileges;
+AP_DECLARE(int) sys_privileges_handlers(int inc);
 AP_DECLARE_HOOK(int, drop_privileges, (apr_pool_t * pchild, server_rec * s))
 
 #ifdef __cplusplus

Modified: httpd/httpd/trunk/modules/arch/unix/mod_unixd.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/arch/unix/mod_unixd.c?rev=710037&r1=710036&r2=710037&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/arch/unix/mod_unixd.c (original)
+++ httpd/httpd/trunk/modules/arch/unix/mod_unixd.c Mon Nov  3 03:37:03 2008
@@ -279,7 +279,7 @@
 
     unixd_config.chroot_dir = NULL; /* none */
 
-    ++sys_privileges;
+    sys_privileges_handlers(1);
     return OK;
 }
 

Modified: httpd/httpd/trunk/server/core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/core.c?rev=710037&r1=710036&r2=710037&view=diff
==============================================================================
--- httpd/httpd/trunk/server/core.c (original)
+++ httpd/httpd/trunk/server/core.c Mon Nov  3 03:37:03 2008
@@ -3887,7 +3887,12 @@
 /* Insist that at least one module will undertake to provide system
  * security by dropping startup privileges.
  */
-AP_DECLARE(int) sys_privileges = 0;
+static int sys_privileges = 0;
+AP_DECLARE(int) sys_privileges_handlers(int inc)
+{
+    sys_privileges += inc;
+    return sys_privileges;
+}
 static int core_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
 {
     if (!sys_privileges) {



Mime
View raw message