mirror of
https://github.com/apache/httpd.git
synced 2025-08-15 23:27:39 +00:00
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:
@ -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[] = {
|
||||
|
Reference in New Issue
Block a user