1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-06 16:49:32 +03:00

Wrap the global count of privileges handlers operating. Silence grumblers.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@710037 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Kew
2008-11-03 11:37:03 +00:00
parent c764e3608a
commit a1252f96e3
3 changed files with 8 additions and 3 deletions

View File

@@ -365,7 +365,7 @@ extern const char *ap_mpm_set_exception_hook(cmd_parms *cmd, void *dummy,
AP_DECLARE_HOOK(int,monitor,(apr_pool_t *p)) AP_DECLARE_HOOK(int,monitor,(apr_pool_t *p))
/* register modules that undertake to manage system security */ /* 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)) AP_DECLARE_HOOK(int, drop_privileges, (apr_pool_t * pchild, server_rec * s))
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -279,7 +279,7 @@ unixd_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
unixd_config.chroot_dir = NULL; /* none */ unixd_config.chroot_dir = NULL; /* none */
++sys_privileges; sys_privileges_handlers(1);
return OK; return OK;
} }

View File

@@ -3887,7 +3887,12 @@ static int core_pre_connection(conn_rec *c, void *csd)
/* Insist that at least one module will undertake to provide system /* Insist that at least one module will undertake to provide system
* security by dropping startup privileges. * 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) static int core_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
{ {
if (!sys_privileges) { if (!sys_privileges) {