Switch all unix MPMs to use drop_privileges hook (mod_unixd) for startup

and add a flag to prevent running without any module taking responsibility
for managing system privileges!


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@709993 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Kew
2008-11-03 00:46:54 +00:00
parent 0225dbe859
commit 72119d92f5
10 changed files with 35 additions and 64 deletions

View File

@ -49,8 +49,6 @@
#include <sys/prctl.h>
#endif
#include "simple_api.h"
#ifndef DEFAULT_USER
#define DEFAULT_USER "#-1"
#endif
@ -281,6 +279,7 @@ unixd_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
unixd_config.chroot_dir = NULL; /* none */
++sys_privileges;
return OK;
}
@ -289,8 +288,8 @@ static void unixd_hooks(apr_pool_t *pool)
ap_hook_pre_config(unixd_pre_config,
NULL, NULL, APR_HOOK_FIRST);
ap_hook_simple_drop_privileges(unixd_drop_privileges,
NULL, NULL, APR_HOOK_FIRST);
ap_hook_drop_privileges(unixd_drop_privileges,
NULL, NULL, APR_HOOK_FIRST);
}
static const command_rec unixd_cmds[] = {