2 #include "http_config.h"
3 #include "http_conf_globals.h"
5 #include "http_protocol.h"
6 #include "http_request.h"
12 #include <sys/ioccom.h>
15 #include <afs/venus.h>
19 #define KEYTAB "/home/drh/keytab.itdwww"
20 #define KEYTAB_PRINCIPAL "itdwww"
22 #define TKT_LIFE 10*60*60
23 #define SLEEP_TIME TKT_LIFE - 5*60
25 #define AFS_CELL "umich.edu" /* NB: lower case */
27 #define K5PATH "FILE:/tmp/waklog.creds.k5"
28 #define K4PATH "/tmp/waklog.creds.k4"
36 char *keytab_principal
;
41 struct ktc_token token
;
42 } waklog_child_config
;
43 waklog_child_config child
;
47 waklog_create_dir_config( pool
*p
, char *path
)
49 waklog_host_config
*cfg
;
51 cfg
= (waklog_host_config
*)ap_pcalloc( p
, sizeof( waklog_host_config
));
55 cfg
->keytab_principal
= KEYTAB_PRINCIPAL
;
56 cfg
->afs_cell
= AFS_CELL
;
64 waklog_create_server_config( pool
*p
, server_rec
*s
)
66 waklog_host_config
*cfg
;
68 cfg
= (waklog_host_config
*)ap_pcalloc( p
, sizeof( waklog_host_config
));
72 cfg
->keytab_principal
= KEYTAB_PRINCIPAL
;
73 cfg
->afs_cell
= AFS_CELL
;
76 ap_set_module_config( s
->module_config
, &waklog_module
, cfg
);
84 set_waklog_protect( cmd_parms
*params
, void *mconfig
, int flag
)
86 waklog_host_config
*cfg
;
89 if ( params
->path
== NULL
) {
91 cfg
= (waklog_host_config
*) ap_get_module_config(
92 params
->server
->module_config
, &waklog_module
);
95 cfg
= (waklog_host_config
*)mconfig
;
106 set_waklog_use_keytab( cmd_parms
*params
, void *mconfig
, char *file
)
108 waklog_host_config
*cfg
;
111 if ( params
->path
== NULL
) {
113 cfg
= (waklog_host_config
*) ap_get_module_config(
114 params
->server
->module_config
, &waklog_module
);
117 cfg
= (waklog_host_config
*)mconfig
;
121 ap_log_error( APLOG_MARK
, APLOG_INFO
|APLOG_NOERRNO
, params
->server
,
122 "mod_waklog: will use keytab: %s", file
);
124 cfg
->keytab
= ap_pstrdup ( params
->pool
, file
);
131 set_waklog_use_keytab_principal( cmd_parms
*params
, void *mconfig
, char *file
)
133 waklog_host_config
*cfg
;
136 if ( params
->path
== NULL
) {
138 cfg
= (waklog_host_config
*) ap_get_module_config(
139 params
->server
->module_config
, &waklog_module
);
142 cfg
= (waklog_host_config
*)mconfig
;
146 ap_log_error( APLOG_MARK
, APLOG_INFO
|APLOG_NOERRNO
, params
->server
,
147 "mod_waklog: will use keytab_principal: %s", file
);
149 cfg
->keytab_principal
= ap_pstrdup ( params
->pool
, file
);
156 set_waklog_use_afs_cell( cmd_parms
*params
, void *mconfig
, char *file
)
158 waklog_host_config
*cfg
;
161 if ( params
->path
== NULL
) {
163 cfg
= (waklog_host_config
*) ap_get_module_config(
164 params
->server
->module_config
, &waklog_module
);
167 cfg
= (waklog_host_config
*)mconfig
;
171 ap_log_error( APLOG_MARK
, APLOG_INFO
|APLOG_NOERRNO
, params
->server
,
172 "mod_waklog: will use afs_cell: %s", file
);
174 cfg
->afs_cell
= ap_pstrdup( params
->pool
, file
);
181 waklog_child_init( server_rec
*s
, pool
*p
)
184 memset( &child
.token
, 0, sizeof( struct ktc_token
) );
192 command_rec waklog_cmds
[ ] =
194 { "WaklogProtected", set_waklog_protect
,
195 NULL
, RSRC_CONF
| ACCESS_CONF
, FLAG
,
196 "enable waklog on a location or directory basis" },
198 { "WaklogUseKeytabPath", set_waklog_use_keytab
,
199 NULL
, RSRC_CONF
| ACCESS_CONF
, TAKE1
,
200 "Use the supplied keytab rather than the default" },
202 { "WaklogUseKeytabPrincipal", set_waklog_use_keytab_principal
,
203 NULL
, RSRC_CONF
| ACCESS_CONF
, TAKE1
,
204 "Use the supplied keytab principal rather than the default" },
206 { "WaklogUseAFSCell", set_waklog_use_afs_cell
,
207 NULL
, RSRC_CONF
| ACCESS_CONF
, TAKE1
,
208 "Use the supplied AFS cell rather than the default" },
215 token_cleanup( void *data
)
217 request_rec
*r
= (request_rec
*)data
;
219 if ( child
.token
.ticketLen
) {
220 memset( &child
.token
, 0, sizeof( struct ktc_token
) );
222 ktc_ForgetAllTokens();
224 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, r
->server
,
225 "mod_waklog: ktc_ForgetAllTokens succeeded: pid: %d", getpid() );
232 waklog_kinit( server_rec
*s
)
234 krb5_error_code kerror
;
235 krb5_context kcontext
= NULL
;
236 krb5_principal kprinc
= NULL
;
237 krb5_get_init_creds_opt kopts
;
239 krb5_ccache kccache
= NULL
;
240 krb5_keytab keytab
= NULL
;
241 char ktbuf
[ MAX_KEYTAB_NAME_LEN
+ 1 ];
242 waklog_host_config
*cfg
;
245 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, s
,
246 "mod_waklog: waklog_kinit called: pid: %d", getpid() );
248 cfg
= (waklog_host_config
*) ap_get_module_config( s
->module_config
,
251 if (( kerror
= krb5_init_context( &kcontext
))) {
252 ap_log_error( APLOG_MARK
, APLOG_ERR
, s
,
253 (char *)error_message( kerror
));
259 if (( kerror
= krb5_cc_resolve( kcontext
, K5PATH
, &kccache
)) != 0 ) {
260 ap_log_error( APLOG_MARK
, APLOG_ERR
, s
,
261 (char *)error_message( kerror
));
266 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, s
,
267 "mod_waklog: keytab_principal: %s", cfg
->keytab_principal
);
269 if (( kerror
= krb5_parse_name( kcontext
, cfg
->keytab_principal
, &kprinc
))) {
270 ap_log_error( APLOG_MARK
, APLOG_ERR
, s
,
271 (char *)error_message( kerror
));
277 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, s
,
278 "mod_waklog: kprinc->realm: %.*s", kprinc
->realm
.length
, kprinc
->realm
.data
);
280 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, s
,
281 "mod_waklog: kprinc->length: %d", kprinc
->length
);
282 for ( i
= 0; i
< kprinc
->length
; i
++ ) {
283 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, s
,
284 "mod_waklog: kprinc->data[%d].data: %.*s", i
, kprinc
->data
[i
].length
, kprinc
->data
[i
].data
);
288 krb5_get_init_creds_opt_init( &kopts
);
289 krb5_get_init_creds_opt_set_tkt_life( &kopts
, TKT_LIFE
);
290 krb5_get_init_creds_opt_set_renew_life( &kopts
, 0 );
291 krb5_get_init_creds_opt_set_forwardable( &kopts
, 1 );
292 krb5_get_init_creds_opt_set_proxiable( &kopts
, 0 );
294 /* keytab from config */
295 strncpy( ktbuf
, cfg
->keytab
, sizeof( ktbuf
) - 1 );
297 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, s
,
298 "mod_waklog: waklog_kinit using: %s", ktbuf
);
300 if (( kerror
= krb5_kt_resolve( kcontext
, ktbuf
, &keytab
)) != 0 ) {
301 ap_log_error( APLOG_MARK
, APLOG_ERR
, s
,
302 (char *)error_message( kerror
));
307 memset( (char *)&v5creds
, 0, sizeof(v5creds
));
310 if (( kerror
= krb5_get_init_creds_keytab( kcontext
, &v5creds
,
311 kprinc
, keytab
, 0, NULL
, &kopts
))) {
313 ap_log_error( APLOG_MARK
, APLOG_ERR
, s
,
314 (char *)error_message( kerror
));
320 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, s
,
321 "mod_waklog: v5creds.client->realm: %.*s", v5creds
.client
->realm
.length
, v5creds
.client
->realm
.data
);
323 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, s
,
324 "mod_waklog: v5creds.client->length: %d", v5creds
.client
->length
);
325 for ( i
= 0; i
< v5creds
.client
->length
; i
++ ) {
326 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, s
,
327 "mod_waklog: v5creds.client->data[%d].data: %.*s",
328 i
, v5creds
.client
->data
[i
].length
, v5creds
.client
->data
[i
].data
);
331 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, s
,
332 "mod_waklog: v5creds.server->realm: %.*s", v5creds
.server
->realm
.length
, v5creds
.server
->realm
.data
);
334 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, s
,
335 "mod_waklog: v5creds.server->length: %d", v5creds
.server
->length
);
336 for ( i
= 0; i
< v5creds
.server
->length
; i
++ ) {
337 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, s
,
338 "mod_waklog: v5creds.server->data[%d].data: %.*s",
339 i
, v5creds
.server
->data
[i
].length
, v5creds
.server
->data
[i
].data
);
342 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, s
,
343 "mod_waklog: waklog_kinit #4" );
345 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, s
,
346 "mod_waklog: waklog_kinit kprinc==v5creds.server: %s",
347 krb5_principal_compare( kcontext
, kprinc
, v5creds
.server
) ? "true" : "false" );
351 #error the proof of the pudding is in the eating
352 if (( kerror
= krb5_verify_init_creds( kcontext
, &v5creds
,
353 v5creds
.server
, keytab
, NULL
, &vopts
)) != 0 ) {
355 ap_log_error( APLOG_MARK
, APLOG_ERR
, s
,
356 (char *)error_message( kerror
));
362 if (( kerror
= krb5_cc_initialize( kcontext
, kccache
, kprinc
)) != 0 ) {
363 ap_log_error( APLOG_MARK
, APLOG_ERR
, s
,
364 (char *)error_message( kerror
));
369 kerror
= krb5_cc_store_cred( kcontext
, kccache
, &v5creds
);
370 krb5_free_cred_contents( kcontext
, &v5creds
);
372 ap_log_error( APLOG_MARK
, APLOG_ERR
, s
,
373 (char *)error_message( kerror
));
378 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, s
,
379 "mod_waklog: waklog_kinit success" );
383 (void)krb5_kt_close( kcontext
, keytab
);
385 krb5_free_principal( kcontext
, kprinc
);
387 krb5_cc_close( kcontext
, kccache
);
389 krb5_free_context( kcontext
);
391 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, s
,
392 "mod_waklog: waklog_kinit: exiting" );
399 waklog_aklog( request_rec
*r
)
402 char buf
[ MAXKTCTICKETLEN
];
403 const char *k4path
= NULL
;
404 const char *k5path
= NULL
;
405 krb5_error_code kerror
;
406 krb5_context kcontext
= NULL
;
408 krb5_creds
*v5credsp
= NULL
;
409 krb5_ccache kccache
= NULL
;
410 struct ktc_principal server
= { "afs", "", "" };
411 struct ktc_principal client
;
412 struct ktc_token token
;
413 waklog_host_config
*cfg
;
416 k5path
= ap_table_get( r
->subprocess_env
, "KRB5CCNAME" );
417 k4path
= ap_table_get( r
->subprocess_env
, "KRBTKFILE" );
419 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, r
->server
,
420 "mod_waklog: waklog_aklog called: k5path: %s, k4path: %s", k5path
, k4path
);
422 if ( !k5path
|| !k4path
|| !*k5path
|| !*k4path
) {
423 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, r
->server
,
424 "mod_waklog: waklog_aklog giving up" );
429 ** Get/build creds from file/tgs, then see if we need to SetToken
432 if (( kerror
= krb5_init_context( &kcontext
))) {
433 /* Authentication Required ( kerberos error ) */
434 ap_log_error( APLOG_MARK
, APLOG_ERR
, r
->server
,
435 (char *)error_message( kerror
));
440 memset( (char *)&increds
, 0, sizeof(increds
));
442 cfg
= (waklog_host_config
*) ap_get_module_config(
443 r
->server
->module_config
, &waklog_module
);
445 /* afs/<cell> or afs */
446 strncpy( buf
, "afs", sizeof( buf
) - 1 );
447 if ( strcmp( cfg
->afs_cell
, AFS_CELL
) ) {
448 strncat( buf
, "/" , sizeof( buf
) - strlen( buf
) - 1 );
449 strncat( buf
, cfg
->afs_cell
, sizeof( buf
) - strlen( buf
) - 1 );
452 /* set server part */
453 if (( kerror
= krb5_parse_name( kcontext
, buf
, &increds
.server
))) {
454 ap_log_error( APLOG_MARK
, APLOG_ERR
, r
->server
,
455 (char *)error_message( kerror
));
460 if (( kerror
= krb5_cc_resolve( kcontext
, k5path
, &kccache
)) != 0 ) {
461 ap_log_error( APLOG_MARK
, APLOG_ERR
, r
->server
,
462 (char *)error_message( kerror
));
467 /* set client part */
468 krb5_cc_get_principal( kcontext
, kccache
, &increds
.client
);
470 increds
.times
.endtime
= 0;
471 /* Ask for DES since that is what V4 understands */
472 increds
.keyblock
.enctype
= ENCTYPE_DES_CBC_CRC
;
474 /* get the V5 credentials */
475 if (( kerror
= krb5_get_credentials( kcontext
, 0, kccache
,
476 &increds
, &v5credsp
) ) ) {
477 ap_log_error( APLOG_MARK
, APLOG_ERR
, r
->server
,
478 "mod_waklog: krb5_get_credentials: %s", error_message( kerror
));
483 if ( v5credsp
->ticket
.length
>= MAXKTCTICKETLEN
) { /* from krb524d.c */
484 ap_log_error( APLOG_MARK
, APLOG_ERR
, r
->server
,
485 "mod_waklog: ticket size (%d) too big to fake", v5credsp
->ticket
.length
);
489 /* assemble the token */
490 memset( &token
, 0, sizeof( struct ktc_token
) );
492 token
.startTime
= v5credsp
->times
.starttime
? v5credsp
->times
.starttime
: v5credsp
->times
.authtime
;
493 token
.endTime
= v5credsp
->times
.endtime
;
494 memmove( &token
.sessionKey
, v5credsp
->keyblock
.contents
, v5credsp
->keyblock
.length
);
495 token
.kvno
= RXKAD_TKT_TYPE_KERBEROS_V5
;
496 token
.ticketLen
= v5credsp
->ticket
.length
;
497 memmove( token
.ticket
, v5credsp
->ticket
.data
, token
.ticketLen
);
499 /* make sure we have to do this */
500 if ( child
.token
.kvno
!= token
.kvno
||
501 child
.token
.ticketLen
!= token
.ticketLen
||
502 (memcmp( &child
.token
.sessionKey
, &token
.sessionKey
,
503 sizeof( token
.sessionKey
) )) ||
504 (memcmp( child
.token
.ticket
, token
.ticket
, token
.ticketLen
)) ) {
506 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, r
->server
,
507 "mod_waklog: client: %s", buf
);
510 memmove( buf
, v5credsp
->client
->data
[0].data
,
511 min( v5credsp
->client
->data
[0].length
, MAXKTCNAMELEN
- 1 ) );
512 buf
[ v5credsp
->client
->data
[0].length
] = '\0';
513 if ( v5credsp
->client
->length
> 1 ) {
514 strncat( buf
, ".", sizeof( buf
) - strlen( buf
) - 1 );
515 buflen
= strlen( buf
);
516 memmove( buf
+ buflen
, v5credsp
->client
->data
[1].data
,
517 min( v5credsp
->client
->data
[1].length
, MAXKTCNAMELEN
- strlen( buf
) - 1 ) );
518 buf
[ buflen
+ v5credsp
->client
->data
[1].length
] = '\0';
521 /* assemble the client */
522 strncpy( client
.name
, buf
, sizeof( client
.name
) - 1 );
523 strncpy( client
.instance
, "", sizeof( client
.instance
) - 1 );
524 memmove( buf
, v5credsp
->client
->realm
.data
,
525 min( v5credsp
->client
->realm
.length
, MAXKTCNAMELEN
- 1 ) );
526 buf
[ v5credsp
->client
->realm
.length
] = '\0';
527 strncpy( client
.cell
, buf
, sizeof( client
.cell
) - 1 );
529 /* assemble the server's cell */
530 strncpy( server
.cell
, cfg
->afs_cell
, sizeof( server
.cell
) - 1 );
532 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, r
->server
,
533 "mod_waklog: server: name=%s, instance=%s, cell=%s",
534 server
.name
, server
.instance
, server
.cell
);
536 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, r
->server
,
537 "mod_waklog: client: name=%s, instance=%s, cell=%s",
538 client
.name
, client
.instance
, client
.cell
);
541 krb_set_tkt_string( (char *)k4path
);
543 /* rumor: we have to do this for AIX 4.1.4 with AFS 3.4+ */
546 if ( ( rc
= ktc_SetToken( &server
, &token
, &client
, 0 ) ) ) {
547 ap_log_error( APLOG_MARK
, APLOG_ERR
, r
->server
,
548 "mod_waklog: settoken returned %d", rc
);
553 memmove( &child
.token
, &token
, sizeof( struct ktc_token
) );
555 /* we'll need to unlog when this connection is done. */
556 ap_register_cleanup( r
->pool
, (void *)r
, token_cleanup
, ap_null_cleanup
);
561 krb5_free_cred_contents( kcontext
, v5credsp
);
562 if ( increds
.client
)
563 krb5_free_principal( kcontext
, increds
.client
);
564 if ( increds
.server
)
565 krb5_free_principal( kcontext
, increds
.server
);
567 krb5_cc_close( kcontext
, kccache
);
569 krb5_free_context( kcontext
);
571 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, r
->server
,
572 "mod_waklog: finished with waklog_aklog" );
579 waklog_child_routine( void *s
, child_info
*pinfo
)
582 ap_log_error( APLOG_MARK
, APLOG_DEBUG
|APLOG_NOERRNO
, s
,
583 "mod_waklog: waklog_child_routine called as root" );
585 /* this was causing the credential file to get owned by root */
599 waklog_init( server_rec
*s
, pool
*p
)
601 extern char *version
;
604 ap_log_error( APLOG_MARK
, APLOG_INFO
|APLOG_NOERRNO
, s
,
605 "mod_waklog: version %s initialized.", version
);
607 pid
= ap_bspawn_child( p
, waklog_child_routine
, s
, kill_always
,
610 ap_log_error( APLOG_MARK
, APLOG_DEBUG
|APLOG_NOERRNO
, s
,
611 "mod_waklog: ap_bspawn_child: %d.", pid
);
616 waklog_phase0( request_rec
*r
)
618 waklog_host_config
*cfg
;
620 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, r
->server
,
621 "mod_waklog: phase0 called" );
624 /* directory config? */
625 cfg
= (waklog_host_config
*)ap_get_module_config(
626 r
->per_dir_config
, &waklog_module
);
630 if ( !cfg
->configured
) {
632 cfg
= (waklog_host_config
*)ap_get_module_config(
633 r
->server
->module_config
, &waklog_module
);
638 if ( !cfg
->protect
) {
639 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, r
->server
,
640 "mod_waklog: phase0 declining" );
644 /* set our environment variables */
645 ap_table_set( r
->subprocess_env
, "KRB5CCNAME", K5PATH
);
646 ap_table_set( r
->subprocess_env
, "KRBTKFILE", K4PATH
);
648 /* do this only if we are still unauthenticated */
649 if ( !child
.token
.ticketLen
) {
651 /* stuff the credentials into the kernel */
655 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, r
->server
,
656 "mod_waklog: phase0 returning" );
662 waklog_phase7( request_rec
*r
)
664 waklog_host_config
*cfg
;
666 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, r
->server
,
667 "mod_waklog: phase7 called" );
670 /* directory config? */
671 cfg
= (waklog_host_config
*)ap_get_module_config(
672 r
->per_dir_config
, &waklog_module
);
675 if ( !cfg
->configured
) {
677 cfg
= (waklog_host_config
*)ap_get_module_config(
678 r
->server
->module_config
, &waklog_module
);
683 if ( !cfg
->protect
) {
687 /* stuff the credentials into the kernel */
690 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, r
->server
,
691 "mod_waklog: phase7 returning" );
697 waklog_new_connection( conn_rec
*c
) {
698 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, c
->server
,
699 "mod_waklog: new_connection called: pid: %d", getpid() );
705 ** Here's a quick explaination for phase0 and phase2:
706 ** Apache does a stat() on the path between phase0 and
707 ** phase2, and must by ACLed rl to succeed. So, at
708 ** phase0 we acquire credentials for umweb:servers from
709 ** a keytab, and at phase2 we must ensure we remove them.
711 ** Failure to "unlog" would be a security risk.
714 waklog_phase2( request_rec
*r
)
716 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, r
->server
,
717 "mod_waklog: phase2 called" );
719 if ( child
.token
.ticketLen
) {
720 memset( &child
.token
, 0, sizeof( struct ktc_token
) );
722 ktc_ForgetAllTokens();
724 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, r
->server
,
725 "mod_waklog: ktc_ForgetAllTokens succeeded: pid: %d", getpid() );
728 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, r
->server
,
729 "mod_waklog: phase2 returning" );
735 static int waklog_phase1( request_rec
*r
)
737 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, r
->server
, "mod_waklog: phase1 returning" );
740 static int waklog_phase3( request_rec
*r
)
742 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, r
->server
, "mod_waklog: phase3 returning" );
745 static int waklog_phase4( request_rec
*r
)
747 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, r
->server
, "mod_waklog: phase4 returning" );
750 static int waklog_phase5( request_rec
*r
)
752 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, r
->server
, "mod_waklog: phase5 returning" );
755 static int waklog_phase6( request_rec
*r
)
757 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, r
->server
, "mod_waklog: phase6 returning" );
760 static void waklog_phase8( request_rec
*r
)
762 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, r
->server
, "mod_waklog: phase8 returning" );
765 static int waklog_phase9( request_rec
*r
)
767 ap_log_error( APLOG_MARK
, APLOG_NOERRNO
|APLOG_DEBUG
, r
->server
, "mod_waklog: phase9 returning" );
772 module MODULE_VAR_EXPORT waklog_module
= {
773 STANDARD_MODULE_STUFF
,
774 waklog_init
, /* module initializer */
776 waklog_create_dir_config
, /* create per-dir config structures */
778 NULL
, /* create per-dir config structures */
780 NULL
, /* merge per-dir config structures */
781 waklog_create_server_config
, /* create per-server config structures */
782 NULL
, /* merge per-server config structures */
783 waklog_cmds
, /* table of config file commands */
784 NULL
, /* [#8] MIME-typed-dispatched handlers */
785 NULL
, /* [#1] URI to filename translation */
786 NULL
, /* [#4] validate user id from request */
787 NULL
, /* [#5] check if the user is ok _here_ */
788 NULL
, /* [#3] check access by host address */
789 NULL
, /* [#6] determine MIME type */
790 waklog_phase7
, /* [#7] pre-run fixups */
791 NULL
, /* [#9] log a transaction */
792 waklog_phase2
, /* [#2] header parser */
793 waklog_child_init
, /* child_init */
794 NULL
, /* child_exit */
795 waklog_phase0
/* [#0] post read-request */
797 ,NULL
, /* EAPI: add_module */
798 NULL
, /* EAPI: remove_module */
799 NULL
, /* EAPI: rewrite_command */
800 waklog_new_connection
/* EAPI: new_connection */