]> granicus.if.org Git - apache/commitdiff
* Move code to a more conveniant place
authorRuediger Pluem <rpluem@apache.org>
Tue, 4 Nov 2008 11:35:21 +0000 (11:35 +0000)
committerRuediger Pluem <rpluem@apache.org>
Tue, 4 Nov 2008 11:35:21 +0000 (11:35 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@711227 13f79535-47bb-0310-9956-ffa450edef68

modules/arch/unix/mod_unixd.c

index 54239a4b0d5ce5b1cc95eeb5097101982b455517..1588c664e1e1b6c29ada6ebb8d3876d8f7871962 100644 (file)
@@ -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
+};
+