1 #define _LARGEFILE64_SOURCE
4 #include "http_config.h"
6 #include "http_protocol.h"
7 #include "http_request.h"
10 #ifdef STANDARD20_MODULE_STUFF
11 #include <apr_strings.h>
12 #include <apr_base64.h>
13 #include <apr_compat.h>
14 #include <apu_compat.h>
16 module AP_MODULE_DECLARE_DATA waklog_module
;
18 #define MK_POOL apr_pool_t
19 #define MK_TABLE_GET apr_table_get
21 extern unixd_config_rec unixd_config
;
22 #define ap_user_id unixd_config.user_id
23 #define ap_group_id unixd_config.group_id
24 #define ap_user_name unixd_config.user_name
25 #define command(name, func, var, type, usage) \
26 AP_INIT_ ## type (name, (void*) func, \
27 (void*)APR_OFFSETOF(waklog_config, var), \
28 OR_AUTHCFG | RSRC_CONF, usage)
33 const char *userdata_key
= "waklog_init";
35 #include "ap_config.h"
39 #define MK_TABLE_GET ap_table_get
40 #define command(name, func, var, type, usage) \
42 (void*)XtOffsetOf(waklog_config, var), \
43 OR_AUTHCFG | RSRC_CONF, type, usage }
44 #endif /* STANDARD20_MODULE_STUFF */
46 #define getModConfig(P, X) P = (waklog_host_config *) ap_get_module_config( (X)->module_config, &waklog_module );
51 #include <sys/ioccom.h>
54 #include <afs/venus.h>
58 #define KEYTAB "/etc/keytab.wwwserver"
59 #define KEYTAB_PRINCIPAL "someplacewwwserver"
60 #define AFS_CELL "someplace.edu"
62 #define TKT_LIFE 10*60*60
63 #define SLEEP_TIME TKT_LIFE - 5*60
64 /* If there's an error, retry more aggressively */
65 #define ERR_SLEEP_TIME 5*60
68 #define K5PATH "FILE:/tmp/waklog.creds.k5"
75 char *keytab_principal
;
81 struct ktc_token token
;
82 } waklog_child_config
;
83 waklog_child_config child
;
86 log_error(const char *file
, int line
, int level
, int status
,
87 const server_rec
*s
, const char *fmt
, ...)
93 vsnprintf(errstr
, sizeof(errstr
), fmt
, ap
);
96 #ifdef STANDARD20_MODULE_STUFF
97 ap_log_error(file
, line
, level
| APLOG_NOERRNO
, status
, s
, "%s", errstr
);
99 ap_log_error(file
, line
, level
| APLOG_NOERRNO
, s
, "%s", errstr
);
105 waklog_create_server_config( MK_POOL
*p
, server_rec
*s
)
107 waklog_host_config
*cfg
;
109 cfg
= (waklog_host_config
*)ap_pcalloc( p
, sizeof( waklog_host_config
));
114 cfg
->keytab
= KEYTAB
;
115 cfg
->keytab_principal
= KEYTAB_PRINCIPAL
;
116 cfg
->afs_cell
= AFS_CELL
;
118 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, s
, "mod_waklog: server config created." );
125 set_waklog_protect( cmd_parms
*params
, void *mconfig
, int flag
)
127 waklog_host_config
*cfg
;
129 getModConfig(cfg
, params
->server
);
133 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, params
->server
, "mod_waklog: waklog_protect set" );
139 set_waklog_keytab( cmd_parms
*params
, void *mconfig
, char *file
)
141 waklog_host_config
*cfg
;
143 getModConfig(cfg
, params
->server
);
145 log_error( APLOG_MARK
, APLOG_INFO
, 0, params
->server
,
146 "mod_waklog: will use keytab: %s", file
);
148 cfg
->keytab
= ap_pstrdup ( params
->pool
, file
);
155 set_waklog_use_keytab_principal( cmd_parms
*params
, void *mconfig
, char *file
)
157 waklog_host_config
*cfg
;
159 getModConfig(cfg
, params
->server
);
161 log_error( APLOG_MARK
, APLOG_INFO
, 0, params
->server
,
162 "mod_waklog: will use keytab_principal: %s", file
);
164 cfg
->keytab_principal
= ap_pstrdup ( params
->pool
, file
);
171 set_waklog_use_afs_cell( cmd_parms
*params
, void *mconfig
, char *file
)
173 waklog_host_config
*cfg
;
175 getModConfig(cfg
, params
->server
);
177 log_error( APLOG_MARK
, APLOG_INFO
, 0, params
->server
,
178 "mod_waklog: will use afs_cell: %s", file
);
180 cfg
->afs_cell
= ap_pstrdup( params
->pool
, file
);
187 #ifdef STANDARD20_MODULE_STUFF
188 waklog_child_init(MK_POOL
*p
, server_rec
*s
)
190 waklog_child_init(server_rec
*s
, MK_POOL
*p
)
194 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, s
,
195 "mod_waklog: child_init called" );
197 memset( &child
.token
, 0, sizeof( struct ktc_token
) );
201 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, s
,
202 "mod_waklog: child_init returned" );
214 command_rec waklog_cmds
[ ] =
216 command("WaklogProtected", set_waklog_protect
, wak_protect
, FLAG
, "enable waklog on a location or directory basis"),
218 command("WaklogKeytab", set_waklog_keytab
, wak_keytab
, TAKE1
, "Use the supplied keytab rather than the default"),
220 command("WaklogUseKeytabPrincipal", set_waklog_use_keytab_principal
, wak_ktprinc
, TAKE1
, "Use the supplied keytab principal rather than the default"),
222 command("WaklogUseAFSCell", set_waklog_use_afs_cell
, wak_afscell
, TAKE1
, "Use the supplied AFS cell rather than the default"),
229 token_cleanup( void *data
)
231 request_rec
*r
= (request_rec
*)data
;
233 if ( child
.token
.ticketLen
) {
234 memset( &child
.token
, 0, sizeof( struct ktc_token
) );
236 ktc_ForgetAllTokens();
238 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, r
->server
,
239 "mod_waklog: ktc_ForgetAllTokens succeeded: pid: %d", getpid() );
246 waklog_kinit( server_rec
*s
)
248 krb5_error_code kerror
= 0;
249 krb5_context kcontext
= NULL
;
250 krb5_principal kprinc
= NULL
;
251 krb5_get_init_creds_opt kopts
;
253 krb5_ccache kccache
= NULL
;
254 krb5_keytab keytab
= NULL
;
255 char ktbuf
[ MAX_KEYTAB_NAME_LEN
+ 1 ];
257 waklog_host_config
*cfg
;
259 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, s
,
260 "mod_waklog: waklog_kinit called: pid: %d", getpid() );
262 getModConfig(cfg
, s
);
264 if (( kerror
= krb5_init_context( &kcontext
))) {
265 log_error( APLOG_MARK
, APLOG_ERR
, 0, s
,
266 "mod_waklog: %s", (char *)error_message( kerror
));
272 if (( kerror
= krb5_cc_resolve( kcontext
, K5PATH
, &kccache
)) != 0 ) {
273 log_error( APLOG_MARK
, APLOG_ERR
, 0, s
,
274 "mod_waklog: %s", (char *)error_message( kerror
));
279 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, s
,
280 "mod_waklog: keytab_principal: %s", cfg
->keytab_principal
);
282 if (( kerror
= krb5_parse_name( kcontext
, cfg
->keytab_principal
, &kprinc
))) {
283 log_error( APLOG_MARK
, APLOG_ERR
, 0, s
,
284 "mod_waklog: %s", (char *)error_message( kerror
));
289 krb5_get_init_creds_opt_init( &kopts
);
290 krb5_get_init_creds_opt_set_tkt_life( &kopts
, TKT_LIFE
);
291 krb5_get_init_creds_opt_set_renew_life( &kopts
, 0 );
292 krb5_get_init_creds_opt_set_forwardable( &kopts
, 1 );
293 krb5_get_init_creds_opt_set_proxiable( &kopts
, 0 );
295 /* keytab from config */
296 strncpy( ktbuf
, cfg
->keytab
, sizeof( ktbuf
) - 1 );
298 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, s
,
299 "mod_waklog: waklog_kinit using: %s", ktbuf
);
301 if (( kerror
= krb5_kt_resolve( kcontext
, ktbuf
, &keytab
)) != 0 ) {
302 log_error( APLOG_MARK
, APLOG_ERR
, 0, s
,
303 "mod_waklog:krb5_kt_resolve %s", (char *)error_message( kerror
));
308 memset( (char *)&v5creds
, 0, sizeof(v5creds
));
311 if (( kerror
= krb5_get_init_creds_keytab( kcontext
, &v5creds
,
312 kprinc
, keytab
, 0, NULL
, &kopts
))) {
314 log_error( APLOG_MARK
, APLOG_ERR
, 0, s
,
315 "mod_waklog:krb5_get_init_creds_keytab %s", (char *)error_message( kerror
));
320 if (( kerror
= krb5_cc_initialize( kcontext
, kccache
, kprinc
)) != 0 ) {
321 log_error( APLOG_MARK
, APLOG_ERR
, 0, s
,
322 "mod_waklog:krb5_cc_initialize %s", (char *)error_message( kerror
));
327 kerror
= krb5_cc_store_cred( kcontext
, kccache
, &v5creds
);
328 krb5_free_cred_contents( kcontext
, &v5creds
);
330 log_error( APLOG_MARK
, APLOG_ERR
, 0, s
,
331 "mod_waklog: %s", (char *)error_message( kerror
));
336 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, s
,
337 "mod_waklog: waklog_kinit success" );
341 (void)krb5_kt_close( kcontext
, keytab
);
343 krb5_free_principal( kcontext
, kprinc
);
345 krb5_cc_close( kcontext
, kccache
);
347 krb5_free_context( kcontext
);
349 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, s
,
350 "mod_waklog: waklog_kinit: exiting" );
357 waklog_aklog( request_rec
*r
)
360 char buf
[ MAXKTCTICKETLEN
];
361 const char *k5path
= NULL
;
362 krb5_error_code kerror
;
363 krb5_context kcontext
= NULL
;
365 krb5_creds
*v5credsp
= NULL
;
366 krb5_ccache kccache
= NULL
;
367 struct ktc_principal server
= { "afs", "", "" };
368 struct ktc_principal client
;
369 struct ktc_token token
;
370 waklog_host_config
*cfg
;
373 k5path
= MK_TABLE_GET( r
->subprocess_env
, "KRB5CCNAME" );
375 log_error( APLOG_MARK
, APLOG_INFO
, 0, r
->server
,
376 "mod_waklog: waklog_aklog called: k5path: %s", k5path
);
378 if ( k5path
== NULL
) {
379 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, r
->server
,
380 "mod_waklog: waklog_aklog giving up" );
385 ** Get/build creds from file/tgs, then see if we need to SetToken
388 if (( kerror
= krb5_init_context( &kcontext
))) {
389 /* Authentication Required ( kerberos error ) */
390 log_error( APLOG_MARK
, APLOG_ERR
, 0, r
->server
,
391 (char *)error_message( kerror
));
396 memset( (char *)&increds
, 0, sizeof(increds
));
398 getModConfig(cfg
, r
->server
);
400 /* afs/<cell> or afs */
401 strncpy( buf
, "afs", sizeof( buf
) - 1 );
402 if ( strcmp( cfg
->afs_cell
, AFS_CELL
) ) {
403 strncat( buf
, "/" , sizeof( buf
) - strlen( buf
) - 1 );
404 strncat( buf
, cfg
->afs_cell
, sizeof( buf
) - strlen( buf
) - 1 );
407 /* set server part */
408 if (( kerror
= krb5_parse_name( kcontext
, buf
, &increds
.server
))) {
409 log_error( APLOG_MARK
, APLOG_ERR
, 0, r
->server
,
410 (char *)error_message( kerror
));
415 if (( kerror
= krb5_cc_resolve( kcontext
, k5path
, &kccache
)) != 0 ) {
416 log_error( APLOG_MARK
, APLOG_ERR
, 0, r
->server
,
417 (char *)error_message( kerror
));
422 /* set client part */
423 krb5_cc_get_principal( kcontext
, kccache
, &increds
.client
);
425 increds
.times
.endtime
= 0;
426 /* Ask for DES since that is what V4 understands */
427 increds
.keyblock
.enctype
= ENCTYPE_DES_CBC_CRC
;
429 /* get the V5 credentials */
430 if (( kerror
= krb5_get_credentials( kcontext
, 0, kccache
,
431 &increds
, &v5credsp
) ) ) {
432 log_error( APLOG_MARK
, APLOG_ERR
, 0, r
->server
,
433 "mod_waklog: krb5_get_credentials: %s", error_message( kerror
));
438 if ( v5credsp
->ticket
.length
>= MAXKTCTICKETLEN
) { /* from krb524d.c */
439 log_error( APLOG_MARK
, APLOG_ERR
, 0, r
->server
,
440 "mod_waklog: ticket size (%d) too big to fake", v5credsp
->ticket
.length
);
444 /* assemble the token */
445 memset( &token
, 0, sizeof( struct ktc_token
) );
447 token
.startTime
= v5credsp
->times
.starttime
? v5credsp
->times
.starttime
: v5credsp
->times
.authtime
;
448 token
.endTime
= v5credsp
->times
.endtime
;
449 memmove( &token
.sessionKey
, v5credsp
->keyblock
.contents
, v5credsp
->keyblock
.length
);
450 token
.kvno
= RXKAD_TKT_TYPE_KERBEROS_V5
;
451 token
.ticketLen
= v5credsp
->ticket
.length
;
452 memmove( token
.ticket
, v5credsp
->ticket
.data
, token
.ticketLen
);
454 /* make sure we have to do this */
455 if ( child
.token
.kvno
!= token
.kvno
||
456 child
.token
.ticketLen
!= token
.ticketLen
||
457 (memcmp( &child
.token
.sessionKey
, &token
.sessionKey
,
458 sizeof( token
.sessionKey
) )) ||
459 (memcmp( child
.token
.ticket
, token
.ticket
, token
.ticketLen
)) ) {
461 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, r
->server
,
462 "mod_waklog: client: %s", buf
);
465 memmove( buf
, v5credsp
->client
->data
[0].data
,
466 min( v5credsp
->client
->data
[0].length
, MAXKTCNAMELEN
- 1 ) );
467 buf
[ v5credsp
->client
->data
[0].length
] = '\0';
468 if ( v5credsp
->client
->length
> 1 ) {
469 strncat( buf
, ".", sizeof( buf
) - strlen( buf
) - 1 );
470 buflen
= strlen( buf
);
471 memmove( buf
+ buflen
, v5credsp
->client
->data
[1].data
,
472 min( v5credsp
->client
->data
[1].length
, MAXKTCNAMELEN
- strlen( buf
) - 1 ) );
473 buf
[ buflen
+ v5credsp
->client
->data
[1].length
] = '\0';
476 /* assemble the client */
477 strncpy( client
.name
, buf
, sizeof( client
.name
) - 1 );
478 strncpy( client
.instance
, "", sizeof( client
.instance
) - 1 );
479 memmove( buf
, v5credsp
->client
->realm
.data
,
480 min( v5credsp
->client
->realm
.length
, MAXKTCNAMELEN
- 1 ) );
481 buf
[ v5credsp
->client
->realm
.length
] = '\0';
482 strncpy( client
.cell
, buf
, sizeof( client
.cell
) - 1 );
484 /* assemble the server's cell */
485 strncpy( server
.cell
, cfg
->afs_cell
, sizeof( server
.cell
) - 1 );
487 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, r
->server
,
488 "mod_waklog: server: name=%s, instance=%s, cell=%s",
489 server
.name
, server
.instance
, server
.cell
);
491 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, r
->server
,
492 "mod_waklog: client: name=%s, instance=%s, cell=%s",
493 client
.name
, client
.instance
, client
.cell
);
497 /* rumor: we have to do this for AIX 4.1.4 with AFS 3.4+ */
500 if ( ( rc
= ktc_SetToken( &server
, &token
, &client
, 0 ) ) ) {
501 log_error( APLOG_MARK
, APLOG_ERR
, 0, r
->server
,
502 "mod_waklog: settoken returned %d", rc
);
507 memmove( &child
.token
, &token
, sizeof( struct ktc_token
) );
509 /* we'll need to unlog when this connection is done. */
510 ap_register_cleanup( r
->pool
, (void *)r
, token_cleanup
, ap_null_cleanup
);
515 krb5_free_cred_contents( kcontext
, v5credsp
);
516 if ( increds
.client
)
517 krb5_free_principal( kcontext
, increds
.client
);
518 if ( increds
.server
)
519 krb5_free_principal( kcontext
, increds
.server
);
521 krb5_cc_close( kcontext
, kccache
);
523 krb5_free_context( kcontext
);
525 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, r
->server
,
526 "mod_waklog: finished with waklog_aklog" );
533 waklog_child_routine( void *s
, child_info
*pinfo
)
536 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, s
,
537 "mod_waklog: waklog_child_routine called as root" );
539 /* this was causing the credential file to get owned by root */
540 #ifdef STANDARD20_MODULE_STUFF
548 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, s
,
549 "mod_waklog: child_routine sleeping" );
551 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, s
,
552 "mod_waklog: slept, calling waklog_kinit" );
557 #ifdef STANDARD20_MODULE_STUFF
559 waklog_init_handler(apr_pool_t
*p
, apr_pool_t
*plog
,
560 apr_pool_t
*ptemp
, server_rec
*s
)
563 extern char *version
;
565 waklog_host_config
*cfg
;
568 getModConfig(cfg
, s
);
570 /* initialize_module() will be called twice, and if it's a DSO
571 * then all static data from the first call will be lost. Only
572 * set up our static data on the second call.
573 * see http://issues.apache.org/bugzilla/show_bug.cgi?id=37519 */
574 apr_pool_userdata_get(&data
, userdata_key
, s
->process
->pool
);
577 apr_pool_userdata_set((const void *)1, userdata_key
,
578 apr_pool_cleanup_null
, s
->process
->pool
);
580 log_error( APLOG_MARK
, APLOG_INFO
, 0, s
,
581 "mod_waklog: version %s initialized.", version
);
583 proc
= (apr_proc_t
*)ap_pcalloc( s
->process
->pool
, sizeof(apr_proc_t
));
585 rv
= apr_proc_fork(proc
, s
->process
->pool
);
587 if (rv
== APR_INCHILD
) {
588 waklog_child_routine(s
, NULL
);
590 apr_pool_note_subprocess(s
->process
->pool
, proc
, APR_KILL_ALWAYS
);
592 /* parent and child */
593 cfg
->forked
= proc
->pid
;
599 waklog_init( server_rec
*s
, MK_POOL
*p
)
601 extern char *version
;
604 log_error( APLOG_MARK
, APLOG_INFO
, 0, s
,
605 "mod_waklog: version %s initialized.", version
);
607 pid
= ap_bspawn_child( p
, waklog_child_routine
, s
, kill_always
,
610 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, s
,
611 "mod_waklog: ap_bspawn_child: %d.", pid
);
616 waklog_phase0( request_rec
*r
)
618 waklog_host_config
*cfg
;
620 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, r
->server
,
621 "mod_waklog: phase0 called" );
623 getModConfig(cfg
, r
->server
);
625 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, r
->server
,
626 "mod_waklog: phase0, checking cfg->protect" );
627 if ( !cfg
->protect
) {
628 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, r
->server
,
629 "mod_waklog: phase0 declining" );
633 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, r
->server
,
634 "mod_waklog: phase0, NOT setting environment variable" );
635 /* set our environment variable */
636 apr_table_set( r
->subprocess_env
, "KRB5CCNAME", K5PATH
);
638 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, r
->server
,
639 "mod_waklog: phase0, checking child.token.ticketLen" );
640 /* do this only if we are still unauthenticated */
641 if ( !child
.token
.ticketLen
) {
643 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, r
->server
,
644 "mod_waklog: phase0, calling waklog_aklog" );
645 /* stuff the credentials into the kernel */
649 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, r
->server
,
650 "mod_waklog: phase0 returning" );
656 waklog_phase7( request_rec
*r
)
658 waklog_host_config
*cfg
;
660 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, r
->server
,
661 "mod_waklog: phase7 called" );
663 getModConfig(cfg
, r
->server
);
665 if ( !cfg
->protect
) {
669 /* stuff the credentials into the kernel */
671 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, r
->server
,
672 "mod_waklog: phase7, calling waklog_aklog" );
675 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, r
->server
,
676 "mod_waklog: phase7 returning" );
682 #ifdef STANDARD20_MODULE_STUFF
687 waklog_new_connection( conn_rec
*c
688 #ifdef STANDARD20_MODULE_STUFF
692 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, c
->base_server
,
693 "mod_waklog: new_connection called: pid: %d", getpid() );
695 #ifdef STANDARD20_MODULE_STUFF
703 ** Here's a quick explaination for phase0 and phase2:
704 ** Apache does a stat() on the path between phase0 and
705 ** phase2, and must by ACLed rl to succeed. So, at
706 ** phase0 we acquire credentials for umweb:servers from
707 ** a keytab, and at phase2 we must ensure we remove them.
709 ** Failure to "unlog" would be a security risk.
712 waklog_phase2( request_rec
*r
)
715 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, r
->server
,
716 "mod_waklog: phase2 called" );
718 if ( child
.token
.ticketLen
) {
719 memset( &child
.token
, 0, sizeof( struct ktc_token
) );
721 ktc_ForgetAllTokens();
723 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, r
->server
,
724 "mod_waklog: ktc_ForgetAllTokens succeeded: pid: %d", getpid() );
727 log_error( APLOG_MARK
, APLOG_DEBUG
, 0, r
->server
,
728 "mod_waklog: phase2 returning" );
733 #ifndef STANDARD20_MODULE_STUFF
734 module MODULE_VAR_EXPORT waklog_module
= {
735 STANDARD_MODULE_STUFF
,
736 waklog_init
, /* module initializer */
738 waklog_create_dir_config
, /* create per-dir config structures */
740 NULL
, /* create per-dir config structures */
742 NULL
, /* merge per-dir config structures */
743 waklog_create_server_config
, /* create per-server config structures */
744 NULL
, /* merge per-server config structures */
745 waklog_cmds
, /* table of config file commands */
746 NULL
, /* [#8] MIME-typed-dispatched handlers */
747 NULL
, /* [#1] URI to filename translation */
748 NULL
, /* [#4] validate user id from request */
749 NULL
, /* [#5] check if the user is ok _here_ */
750 NULL
, /* [#3] check access by host address */
751 NULL
, /* [#6] determine MIME type */
752 waklog_phase7
, /* [#7] pre-run fixups */
753 NULL
, /* [#9] log a transaction */
754 waklog_phase2
, /* [#2] header parser */
755 waklog_child_init
, /* child_init */
756 NULL
, /* child_exit */
757 waklog_phase0
/* [#0] post read-request */
759 ,NULL
, /* EAPI: add_module */
760 NULL
, /* EAPI: remove_module */
761 NULL
, /* EAPI: rewrite_command */
762 waklog_new_connection
/* EAPI: new_connection */
767 waklog_register_hooks(apr_pool_t
*p
)
769 ap_hook_fixups(waklog_phase7
, NULL
, NULL
, APR_HOOK_FIRST
);
770 ap_hook_header_parser(waklog_phase2
, NULL
, NULL
, APR_HOOK_FIRST
);
771 ap_hook_child_init(waklog_child_init
, NULL
, NULL
, APR_HOOK_FIRST
);
772 ap_hook_post_read_request(waklog_phase0
, NULL
, NULL
, APR_HOOK_FIRST
);
773 ap_hook_pre_connection(waklog_new_connection
, NULL
, NULL
, APR_HOOK_FIRST
);
774 ap_hook_post_config(waklog_init_handler
, NULL
, NULL
, APR_HOOK_MIDDLE
);
778 module AP_MODULE_DECLARE_DATA waklog_module
=
780 STANDARD20_MODULE_STUFF
,
781 NULL
, /* create per-dir conf structures */
782 NULL
, /* merge per-dir conf structures */
783 waklog_create_server_config
, /* create per-server conf structures */
784 NULL
, /* merge per-server conf structures */
785 waklog_cmds
, /* table of configuration directives */
786 waklog_register_hooks
/* register hooks */