コード例 #1
0
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);
}
コード例 #2
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);
}
コード例 #3
0
ファイル: mod_dtrace.c プロジェクト: 0xffea/illumos-userland
/*
*    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);
}
コード例 #4
0
ファイル: agent.c プロジェクト: JonathanFu/OpenAM-1
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);
}
コード例 #5
0
/*
	Definition of MOD_BUT hooks. This is parsed by httpd during startup
	and the symbols are loaded into the httpd core. 
*/
static void mod_but_register_hooks (apr_pool_t *p)
{
	static const char * const cfgPost[]={ "http_core.c", NULL };
  	ap_hook_post_config(mod_but_shm_initialize, NULL, cfgPost, APR_HOOK_MIDDLE);
	ap_hook_post_config(mod_but_shm_initialize_history, NULL, cfgPost, APR_HOOK_MIDDLE);
	ap_hook_post_config(mod_but_shm_initialize_cookiestore, NULL, cfgPost, APR_HOOK_MIDDLE);
	ap_hook_access_checker(but_access, NULL, NULL, APR_HOOK_FIRST);

//	ap_register_input_filter("MOD_BUT_IN", mod_but_input_filter, NULL, AP_FTYPE_CONTENT_SET);
//	ap_hook_insert_filter(mod_but_insert_input_filter, NULL, NULL, APR_HOOK_FIRST);

	ap_register_output_filter("MOD_BUT_OUT", mod_but_output_filter, NULL, AP_FTYPE_CONTENT_SET);
	ap_hook_insert_filter(mod_but_insert_output_filter, NULL, NULL, APR_HOOK_LAST);


}
コード例 #6
0
static void register_hooks(apr_pool_t *p)
{   
    ap_hook_post_config(mod_stlog_init, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_post_read_request(mod_stlog_post_read_request, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_translate_name(mod_stlog_translate_name, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_map_to_storage(mod_stlog_map_to_storage, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_check_user_id(mod_stlog_check_user_id, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_type_checker(mod_stlog_type_checker, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_access_checker(mod_stlog_access_checker, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_auth_checker(mod_stlog_auth_checker, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_insert_filter(mod_stlog_insert_filter, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_fixups(mod_stlog_fixups, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_quick_handler(mod_stlog_quick_handler, NULL, NULL, APR_HOOK_FIRST);
    ap_hook_handler(mod_stlog_handler, NULL, NULL, APR_HOOK_REALLY_FIRST);
    ap_hook_log_transaction(mod_stlog_log_transaction, NULL, NULL, APR_HOOK_MIDDLE);
    //ap_hook_error_log(mod_stlog_error_log, NULL, NULL, APR_HOOK_MIDDLE);
}
コード例 #7
0
/*
 * Register additional hooks.
 */
static void
but_register_hooks(apr_pool_t *p)
{
	static const char * const cfgPost[] = { "http_core.c", NULL };

	ap_hook_post_config(but_post_config, NULL, cfgPost, APR_HOOK_MIDDLE);
	ap_hook_child_init(but_child_init, NULL, NULL, APR_HOOK_MIDDLE);
	ap_hook_access_checker(but_access_checker, NULL, NULL, APR_HOOK_FIRST);

#if 0
	ap_register_input_filter("MOD_BUT_IN", mod_but_input_filter, NULL, AP_FTYPE_CONTENT_SET);
	ap_hook_insert_filter(mod_but_insert_input_filter, NULL, NULL, APR_HOOK_FIRST);
#endif

	ap_register_output_filter("MOD_BUT_OUT", but_output_filter, NULL, AP_FTYPE_CONTENT_SET);
	ap_hook_insert_filter(but_insert_output_filter, NULL, NULL, APR_HOOK_LAST);
}
コード例 #8
0
ファイル: mod_openaaa.c プロジェクト: n13l/openaaa
static void
register_hooks(apr_pool_t *p)
{
	/* pre_connection hook needs to run after mod_ssl connection hook. */
	static const char *pre_ssl[] = { "mod_ssl.c", NULL };

	ap_hook_child_init(child_init, NULL, NULL, APR_HOOK_MIDDLE);
	ap_hook_optional_fn_retrieve(optional_fn_retrieve, NULL,NULL,APR_HOOK_MIDDLE);
	ap_hook_post_config(post_config, NULL, NULL, APR_HOOK_MIDDLE);
	ap_hook_pre_connection(pre_connection, pre_ssl, NULL, APR_HOOK_MIDDLE);
	ap_hook_create_request(create_request, NULL, NULL, APR_HOOK_MIDDLE);
	ap_hook_post_read_request(post_read_request,NULL,NULL, APR_HOOK_LAST);
	ap_hook_check_authn(check_authn, NULL,NULL, APR_HOOK_FIRST, AP_AUTH_INTERNAL_PER_CONF);
	ap_hook_access_checker(access_checker, NULL, NULL, APR_HOOK_MIDDLE);
	ap_hook_check_access(check_access, NULL, NULL, APR_HOOK_MIDDLE, AP_AUTH_INTERNAL_PER_CONF);
	ap_hook_auth_checker(auth_checker, NULL, NULL, APR_HOOK_MIDDLE);
	ap_hook_fixups(fixups, NULL, NULL, APR_HOOK_LAST);

	ap_register_provider(p, AP_SOCACHE_PROVIDER_GROUP, "tls-aaa",
	                     AP_SOCACHE_PROVIDER_VERSION, &socache_tls_aaa);
};
コード例 #9
0
ファイル: mod_track.c プロジェクト: sunilmallya/mod_track
/* Apace Register Hooks */
static void mod_track_register_hooks (apr_pool_t *p){

	//Worth trying this -
	//ap_hook_quick_handler -    called before any request processing, used by cache modules.
       
	//After accepting connection
	ap_hook_pre_connection(log_pre_conn,NULL,NULL,APR_HOOK_FIRST);
 
	//Post request read
	ap_hook_post_read_request(log_post_conn,NULL,NULL,APR_HOOK_LAST);

	//header parser
	ap_hook_header_parser(log_header_parser, NULL, NULL, APR_HOOK_MIDDLE);

	//Hook before output is sent
	log_output_start_handle = ap_register_output_filter("MOD_TRACK",
                                  log_output_start,
                                  NULL,
                                  AP_FTYPE_CONTENT_SET+1);
 
	//cleanup handler
	ap_hook_access_checker(cleanup_handler, NULL, NULL, APR_HOOK_LAST);

}
コード例 #10
0
ファイル: mod_allowmethods.c プロジェクト: AzerTyQsdF/osx
static void am_register_hooks(apr_pool_t * p)
{
    ap_hook_access_checker(am_check_access, NULL, NULL, APR_HOOK_REALLY_FIRST);
}
コード例 #11
0
ファイル: mod_evasive24.c プロジェクト: OSUI/mod_evasive
static void register_hooks(apr_pool_t *p) {
  ap_hook_access_checker(access_checker, NULL, NULL, APR_HOOK_MIDDLE);
  apr_pool_cleanup_register(p, NULL, apr_pool_cleanup_null, destroy_hit_list);
};
コード例 #12
0
static void interval_limit_register_hooks(apr_pool_t *p)
{
    ap_hook_access_checker(interval_limit_access_checker, NULL, NULL, APR_HOOK_MIDDLE);
}
コード例 #13
0
ファイル: mod_access.c プロジェクト: kheradmand/Break
static void register_hooks(apr_pool_t *p)
{
    ap_hook_access_checker(check_dir_access,NULL,NULL,APR_HOOK_MIDDLE);
}