static void ssl_register_hooks(apr_pool_t *p)
{
    /* ssl_hook_ReadReq needs to use the BrowserMatch settings so must
     * run after mod_setenvif's post_read_request hook. */
    static const char *pre_prr[] = { "mod_setenvif.c", NULL };

    ssl_io_filter_register(p);

    ap_hook_pre_connection(ssl_hook_pre_connection,NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_test_config   (ssl_hook_ConfigTest,    NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_post_config   (ssl_init_Module,        NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_http_scheme   (ssl_hook_http_scheme,   NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_default_port  (ssl_hook_default_port,  NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_pre_config    (ssl_hook_pre_config,    NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_child_init    (ssl_init_Child,         NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_check_user_id (ssl_hook_UserCheck,     NULL,NULL, APR_HOOK_FIRST);
    ap_hook_fixups        (ssl_hook_Fixup,         NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_access_checker(ssl_hook_Access,        NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_auth_checker  (ssl_hook_Auth,          NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_post_read_request(ssl_hook_ReadReq, pre_prr,NULL, APR_HOOK_MIDDLE);
    ap_hook_insert_filter (ssl_hook_Insert_Filter, NULL,NULL, APR_HOOK_MIDDLE);
/*    ap_hook_handler       (ssl_hook_Upgrade,       NULL,NULL, APR_HOOK_MIDDLE); */

    ssl_var_register(p);

    APR_REGISTER_OPTIONAL_FN(ssl_proxy_enable);
    APR_REGISTER_OPTIONAL_FN(ssl_engine_disable);

    APR_REGISTER_OPTIONAL_FN(ssl_extlist_by_oid);
}
Example #2
0
static void femto_register_hooks(apr_pool_t *p)
{
  ap_hook_child_init(femto_child_init, NULL, NULL, APR_HOOK_MIDDLE);
  // Need to have it be APR_HOOK_FIRST in order to handle GET
  // requests for our directory (and not get a dir listing).
  ap_hook_handler(femto_handler, NULL, NULL, APR_HOOK_MIDDLE);
}
Example #3
0
/* konoha register hooks */
static void konoha_register_hooks(apr_pool_t *p)
{
    (void)p;
    ap_hook_post_config(CommonModelIndex_Init, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_child_init(CommonModelIndex_child_Init, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_handler(konoha_handler, NULL, NULL, APR_HOOK_FIRST);
}
Example #4
0
/* Install this module into the apache2 infrastructure.
 */
static void h2_hooks(apr_pool_t *pool)
{
    ap_log_perror(APLOG_MARK, APLOG_INFO, 0, pool, "installing hooks");
    
    static const char *const mod_ssl[] = { "mod_ssl.c", NULL};
    
    /* Run once after configuration is set, but before mpm children initialize.
     */
    ap_hook_post_config(h2_post_config, mod_ssl, NULL, APR_HOOK_MIDDLE);
    
    /* Run once after a child process has been created.
     */
    ap_hook_child_init(h2_child_init, NULL, NULL, APR_HOOK_MIDDLE);

    h2_h2_register_hooks();
    h2_h2c_register_hooks();
    h2_task_register_hooks();

    h2_alt_svc_register_hooks();
    
    /* We offer a function to other modules that lets them retrieve
     * the h2 protocol used on a connection (if any).
     */
    APR_REGISTER_OPTIONAL_FN(h2_get_protocol);
}
static void register_hooks(apr_pool_t *p)
{
    ap_hook_post_config(post_config, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_process_connection(pre_connection, NULL, NULL, APR_HOOK_FIRST);
    ap_hook_child_init(child_init, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_handler(check_contents, NULL, NULL, APR_HOOK_LAST);
}
static void geoip_register_hooks(apr_pool_t * p)
{
    /* make sure we run before mod_rewrite's handler */
    static const char *const aszSucc[] =
        { "mod_setenvif.c", "mod_rewrite.c", NULL };

    /* we have two entry points, the header_parser hook, right before
     * the authentication hook used for Dirctory specific enabled geoiplookups
     * or right before directory rewrite rules.
     */
    ap_hook_header_parser(geoip_per_dir, NULL, aszSucc, APR_HOOK_FIRST);

    /* and the servectly wide hook, after reading the request. Perfecly
     * suitable to serve serverwide mod_rewrite actions
     */
    ap_hook_post_read_request(geoip_post_read_request, NULL, aszSucc,
                              APR_HOOK_MIDDLE);

    /* setup our childs GeoIP database once for every child */
    ap_hook_child_init(geoip_child_init, NULL, NULL, APR_HOOK_MIDDLE);

    /* static const char * const list[]={ "mod_geoip.c", NULL }; */
    /* mmap the database(s) into the master process */
    ap_hook_post_config(geoip_post_config, NULL, NULL, APR_HOOK_MIDDLE);

}
/*--------------------------------------------------------------------------*/
static void wd_register_hooks(apr_pool_t *p)
{

    /* Only the mpm_winnt has child init hook handler.
     * Make sure that we are called after the mpm child init handler
     * initializes.
     */
    static const char *const after_mpm[]      = { "mpm_winnt.c", NULL};

    /* Pre config handling
     */
    ap_hook_pre_config(wd_pre_config_hook,
                       NULL,
                       NULL,
                       APR_HOOK_FIRST);

    /* Post config handling
     */
    ap_hook_post_config(wd_post_config_hook,
                        NULL,
                        NULL,
                        APR_HOOK_LAST);

    /* Child init hook
     */
    ap_hook_child_init(wd_child_init_hook,
                       after_mpm,
                       NULL,
                       APR_HOOK_MIDDLE);

    APR_REGISTER_OPTIONAL_FN(ap_watchdog_get_instance);
    APR_REGISTER_OPTIONAL_FN(ap_watchdog_register_callback);
    APR_REGISTER_OPTIONAL_FN(ap_watchdog_set_callback_interval);
}
Example #8
0
static void
register_hooks (apr_pool_t * pool)
{
  ap_hook_post_config (lisp_post_config, 0, 0, APR_HOOK_MIDDLE);
  ap_hook_child_init (lisp_child_init, 0, 0, APR_HOOK_MIDDLE);
  ap_hook_handler (lisp_handler, 0, 0, APR_HOOK_MIDDLE);
}
Example #9
0
static void psgi_register_hooks(apr_pool_t *p)
{
    ap_hook_pre_config(psgi_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_post_config(psgi_post_config, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_child_init(psgi_child_init, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_handler(psgi_handler, NULL, NULL, APR_HOOK_MIDDLE);
}
static void vhx_register_hooks(apr_pool_t *p) {
	ap_hook_translate_name(vhx_hook_vhost, NULL, NULL, APR_HOOK_FIRST);
	ap_hook_child_init(vhx_hook_init, NULL, NULL, APR_HOOK_MIDDLE);
	ap_hook_post_read_request(vhx_hook_itk, NULL, NULL, APR_HOOK_REALLY_FIRST);

	// %v tries to locate hostname from request_rec_t
	register_printf_specifier('v', vhx_print_host, vhx_print_host_info);
}
Example #11
0
static void auth_remote_hooks(apr_pool_t *p)
{
        /* This can be access checker since
         * we don't require r->user to be set. */
    ap_hook_access_checker(check_dir_access,NULL,NULL,APR_HOOK_MIDDLE);

    ap_hook_child_init (child_init, NULL, NULL, APR_HOOK_MIDDLE);
}
Example #12
0
static void
svc_simulator_256b_register_hooks(
    apr_pool_t * p)
{
    ap_hook_post_config(svc_simulator_256b_post_config, NULL, NULL, APR_HOOK_FIRST);
    ap_hook_handler(svc_simulator_256b_handler, NULL, NULL, APR_HOOK_FIRST);
    ap_hook_child_init(svc_simulator_256b_module_init, NULL, NULL, APR_HOOK_FIRST);
}
static void upload_progress_register_hooks (apr_pool_t *p)
{
  ap_hook_fixups(upload_progress_handle_request, NULL, NULL, APR_HOOK_FIRST);
  ap_hook_handler(reportuploads_handler, NULL, NULL, APR_HOOK_FIRST);
  ap_hook_post_config(upload_progress_init, NULL, NULL, APR_HOOK_MIDDLE);
  ap_hook_child_init(upload_progress_child_init, NULL, NULL, APR_HOOK_MIDDLE);
  ap_register_input_filter("UPLOAD_PROGRESS", track_upload_progress, NULL, AP_FTYPE_RESOURCE);
}
static void register_hooks(apr_pool_t *p)
{
		static const char * const parsePre[]={ "mod_auth_digest.c", NULL };
    ap_register_provider(p, AUTHN_PROVIDER_GROUP, "google_authenticator", "0",
                         &authn_google_provider);
		ap_hook_child_init(ga_child_init,0L,0L,APR_HOOK_MIDDLE);
		ap_hook_check_user_id(do_cookie_auth,0L,parsePre,APR_HOOK_FIRST);
}
Example #15
0
static void
 akismet_register_hooks(apr_pool_t *p)
{
    ap_hook_post_config(akismet_post_config, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_child_init(akismet_child_init, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_insert_filter(akismet_insert_filter, NULL, NULL, APR_HOOK_MIDDLE);
    ap_register_input_filter(akismet_filter_name, akismet_filter, NULL, AP_FTYPE_RESOURCE);
}
Example #16
0
static void secuip_register_hooks(apr_pool_t *p)
{
    static const char * const aszPost[]={ "mod_proxy.c", "mod_jk.c", NULL };
    ap_hook_fixups(secuip_checker, NULL, aszPost, APR_HOOK_REALLY_FIRST);
    ap_hook_child_init(setup_redisclient_child_init, NULL, NULL, APR_HOOK_REALLY_FIRST);
    //ap_hook_post_read_request(secuip_checker, NULL, aszPre, APR_HOOK_REALLY_FIRST);
    //ap_hook_access_checker(secuip_checker, NULL, aszPre, APR_HOOK_MIDDLE);
}
Example #17
0
static void register_hooks (apr_pool_t *p)
{
	UNUSED(p);

	ap_hook_post_config (ruid_init, NULL, NULL, APR_HOOK_MIDDLE);
	ap_hook_child_init (ruid_child_init, NULL, NULL, APR_HOOK_MIDDLE);
	ap_hook_post_read_request(ruid_setup, NULL, NULL, APR_HOOK_MIDDLE);
	ap_hook_header_parser(ruid_uiiii, NULL, NULL, APR_HOOK_FIRST);
}
static void register_hooks(apr_pool_t *p)
{
    // read_request should be called after mod_setenvif's one
    ap_hook_post_read_request(dosdetector_read_request,NULL,NULL,APR_HOOK_LAST);

    ap_hook_pre_config(dosdetector_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_post_config(dosdetector_post_config, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_child_init(initialize_child, NULL, NULL, APR_HOOK_MIDDLE);
}
Example #19
0
static void log_fluentd_register_hooks(apr_pool_t *p)
{
	static const char *pre[] = { "mod_log_config.c", NULL };
	fluentd_hash = apr_hash_make(p);

	ap_hook_pre_config(log_fluentd_pre_config, pre, NULL, APR_HOOK_REALLY_FIRST);
	ap_hook_child_init(log_fluentd_child_init, NULL, NULL, APR_HOOK_MIDDLE);
	ap_hook_log_transaction(log_fluentd_transaction,NULL,NULL,APR_HOOK_MIDDLE);
}
static void register_hooks(apr_pool_t *p)
{
	tmpnam(shm_name);
    shmname    = shm_name;

    ap_hook_post_read_request(dosdetector_handler,NULL,NULL,APR_HOOK_MIDDLE);
    ap_hook_post_config(initialize_module, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_child_init(initialize_child, NULL, NULL, APR_HOOK_MIDDLE);
}
Example #21
0
static void ap_sharedmem_register_hook(apr_pool_t *p)
{
    const slotmem_storage_method *storage = mem_getstorage(NULL, "");
    ap_register_provider(p, SLOTMEM_STORAGE, "shared", "0", storage);
    ap_hook_post_config(initialize_cleanup, NULL, NULL, APR_HOOK_LAST);
    ap_hook_pre_config(pre_config, NULL, NULL, APR_HOOK_MIDDLE);

    ap_hook_child_init(child_init, NULL, NULL, APR_HOOK_FIRST);
}
Example #22
0
/*
*    Define the hooks and the functions registered to those hooks
*/
void dtrace_register_hooks(apr_pool_t *p)
{
    ap_hook_post_read_request(apache_receive_request,NULL,NULL,APR_HOOK_MIDDLE);
    ap_hook_child_init(apache_create_child,NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_pre_connection(apache_accept_connection,NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_check_user_id(apache_check_user,NULL,NULL,APR_HOOK_MIDDLE);
    ap_hook_access_checker(apache_check_access,NULL,NULL,APR_HOOK_MIDDLE);
    ap_hook_auth_checker(apache_check_authorization,NULL,NULL,APR_HOOK_MIDDLE);
    ap_hook_log_transaction(apache_log_request,NULL,NULL,APR_HOOK_MIDDLE);
}
Example #23
0
static void mod_mapcache_register_hooks(apr_pool_t *p) {
   ap_hook_child_init(mod_mapcache_child_init, NULL, NULL, APR_HOOK_MIDDLE);
   ap_hook_post_config(mod_mapcache_post_config, NULL, NULL, APR_HOOK_MIDDLE);
   ap_hook_handler(mod_mapcache_request_handler, NULL, NULL, APR_HOOK_MIDDLE);
   static const char * const p1[] = { "mod_alias.c", "mod_rewrite.c", NULL };
   static const char * const n1[]= { "mod_userdir.c",
                                      "mod_vhost_alias.c", NULL };
   ap_hook_translate_name(mapcache_hook_intercept, p1, n1, APR_HOOK_MIDDLE);

}
Example #24
0
static void
register_hooks(apr_pool_t *p)
{
	dav_rainx_register(p);

	ap_hook_post_config(rainx_hook_post_config, NULL, NULL, APR_HOOK_MIDDLE);
	ap_hook_child_init(rainx_hook_child_init, NULL, NULL, APR_HOOK_MIDDLE);
	
	DAV_DEBUG_POOL(p, 0, "Hooks registered");
}
Example #25
0
static void ghc_register_hooks(apr_pool_t *p) {
  fprintf(stderr, "mod_ghc registering... ");
  // hs_add_root(__STGInit_modzmghczm0zi1_ApacheziGlue);
  ap_hook_child_init(doChildInit, NULL, NULL, APR_HOOK_MIDDLE);
  
  // ap_hook_pre_config(doPreConfig, NULL, NULL, APR_HOOK_MIDDLE);
  // ap_hook_post_config(doPostConfig, NULL, NULL, APR_HOOK_MIDDLE);
  
  ap_hook_handler(ghc_handler, NULL, NULL, APR_HOOK_MIDDLE);    
  fprintf(stderr, "mod_ghc registered\n");
}
Example #26
0
/**
 * Callback used to register the hooks.
 * This is the entry point of the module, where all hooks are registered in
 * mod_dav so the requests can be passed.
 * @param p A pool to use for allocations
 */
static void mod_lcgdm_ns_register_hooks(apr_pool_t *p)
{
  dav_ns_mime_init(p, "/etc/mime.types");

  dav_hook_find_liveprop(dav_ns_find_liveprop, NULL, NULL, APR_HOOK_MIDDLE);
  dav_hook_insert_all_liveprops(dav_ns_insert_all_liveprops, NULL, NULL, APR_HOOK_MIDDLE);
  dav_register_liveprop_group(p, &dav_ns_liveprop_group);

  dav_register_provider(p, "nameserver", &dav_ns_provider);

  ap_hook_child_init(dav_ns_child_init, NULL, NULL, APR_HOOK_MIDDLE);
}
Example #27
0
static void sqlalias_register_hooks(apr_pool_t *p)
{
	static const char * const aszSucc[] = { "mod_rewrite.c", NULL };

	ap_hook_post_config(sqlalias_init_handler, NULL, NULL, APR_HOOK_MIDDLE);
	ap_hook_translate_name(sqlalias_redir, NULL, aszSucc, APR_HOOK_FIRST);

#ifdef SQLALIAS_USE_PCONNECT	
	ap_hook_child_init(sqlalias_child_init, NULL, NULL, APR_HOOK_MIDDLE);
	apr_thread_mutex_create(&sqlalias_mutex, APR_THREAD_MUTEX_DEFAULT, p);
#endif
}
Example #28
0
static void amagent_register_hooks(apr_pool_t *p) {
#if AP_SERVER_MAJORVERSION_NUMBER == 2 && AP_SERVER_MINORVERSION_NUMBER < 3
    ap_hook_access_checker(amagent_auth_handler, NULL, NULL, APR_HOOK_FIRST);
#else
    ap_hook_check_access_ex(amagent_auth_handler, NULL, NULL, APR_HOOK_FIRST, AP_AUTH_INTERNAL_PER_CONF);
#endif
    ap_hook_post_config(amagent_init, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_child_init(amagent_worker_init, NULL, NULL, APR_HOOK_MIDDLE);

    ap_hook_insert_filter(amagent_auth_post_insert_filter, NULL, NULL, APR_HOOK_REALLY_FIRST);
    ap_register_input_filter(amagent_post_filter_name, amagent_post_filter, NULL, AP_FTYPE_RESOURCE);
}
static void
mod_vhost_ldap_register_hooks (apr_pool_t * p)
{
	/* Run before mod_rewrite */
	static const char * const aszRewrite[]={ "mod_rewrite.c", NULL };
	ap_hook_child_init(mod_vhost_ldap_child_init, NULL, NULL, APR_HOOK_MIDDLE);
	ap_hook_post_config(mod_vhost_ldap_post_config, NULL, NULL, APR_HOOK_MIDDLE);
	ap_hook_translate_name(mod_vhost_ldap_translate_name, NULL, aszRewrite, APR_HOOK_FIRST);
#ifdef HAVE_UNIX_SUEXEC
	ap_hook_get_suexec_identity(mod_vhost_ldap_get_suexec_id_doer, NULL, NULL, APR_HOOK_MIDDLE);
#endif
}
Example #30
0
static void
register_hooks(apr_pool_t *p)
{
	dav_hook_gather_propsets(dav_rawx_gather_propsets, NULL, NULL, APR_HOOK_MIDDLE);
	dav_hook_find_liveprop(dav_rawx_find_liveprop, NULL, NULL, APR_HOOK_MIDDLE);
	dav_hook_insert_all_liveprops(dav_rawx_insert_all_liveprops, NULL, NULL, APR_HOOK_MIDDLE);

	dav_rawx_register(p);

	ap_hook_post_config(rawx_hook_post_config, NULL, NULL, APR_HOOK_MIDDLE);
	ap_hook_child_init(rawx_hook_child_init, NULL, NULL, APR_HOOK_MIDDLE);

	DAV_DEBUG_POOL(p, 0, "Hooks registered");
}