From 701bb560f9327fc230da52b1ce4fcd7fbbba46d9 Mon Sep 17 00:00:00 2001 From: Ruediger Pluem Date: Tue, 4 Nov 2008 11:35:21 +0000 Subject: [PATCH] * Move code to a more conveniant place git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@711227 13f79535-47bb-0310-9956-ffa450edef68 --- modules/arch/unix/mod_unixd.c | 58 +++++++++++++++++------------------ 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/modules/arch/unix/mod_unixd.c b/modules/arch/unix/mod_unixd.c index 54239a4b0d..1588c664e1 100644 --- a/modules/arch/unix/mod_unixd.c +++ b/modules/arch/unix/mod_unixd.c @@ -297,35 +297,6 @@ unixd_pre_config(apr_pool_t *pconf, apr_pool_t *plog, return OK; } -static void unixd_hooks(apr_pool_t *pool) -{ - ap_hook_pre_config(unixd_pre_config, - NULL, NULL, APR_HOOK_FIRST); - - ap_hook_drop_privileges(unixd_drop_privileges, - NULL, NULL, APR_HOOK_FIRST); -} - -static const command_rec unixd_cmds[] = { - AP_INIT_TAKE1("User", unixd_set_user, NULL, RSRC_CONF, - "Effective user id for this server"), - AP_INIT_TAKE1("Group", unixd_set_group, NULL, RSRC_CONF, - "Effective group id for this server"), - AP_INIT_TAKE1("ChrootDir", unixd_set_chroot_dir, NULL, RSRC_CONF, - "The directory to chroot(2) into"), - {NULL} -}; - -module AP_MODULE_DECLARE_DATA unixd_module = { - STANDARD20_MODULE_STUFF, - NULL, - NULL, - NULL, - NULL, - unixd_cmds, - unixd_hooks -}; - AP_DECLARE(int) unixd_setup_child(void) { if (set_group_privs()) { @@ -396,3 +367,32 @@ AP_DECLARE(int) unixd_setup_child(void) return 0; } +static void unixd_hooks(apr_pool_t *pool) +{ + ap_hook_pre_config(unixd_pre_config, + NULL, NULL, APR_HOOK_FIRST); + + ap_hook_drop_privileges(unixd_drop_privileges, + NULL, NULL, APR_HOOK_FIRST); +} + +static const command_rec unixd_cmds[] = { + AP_INIT_TAKE1("User", unixd_set_user, NULL, RSRC_CONF, + "Effective user id for this server"), + AP_INIT_TAKE1("Group", unixd_set_group, NULL, RSRC_CONF, + "Effective group id for this server"), + AP_INIT_TAKE1("ChrootDir", unixd_set_chroot_dir, NULL, RSRC_CONF, + "The directory to chroot(2) into"), + {NULL} +}; + +module AP_MODULE_DECLARE_DATA unixd_module = { + STANDARD20_MODULE_STUFF, + NULL, + NULL, + NULL, + NULL, + unixd_cmds, + unixd_hooks +}; + -- 2.50.1