mirror of
https://github.com/apache/httpd.git
synced 2025-11-05 05:30:39 +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:
@@ -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))
|
||||
|
||||
/* 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
|
||||
|
||||
@@ -279,7 +279,7 @@ unixd_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
|
||||
|
||||
unixd_config.chroot_dir = NULL; /* none */
|
||||
|
||||
++sys_privileges;
|
||||
sys_privileges_handlers(1);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
* 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) {
|
||||
|
||||
Reference in New Issue
Block a user