#define MAXNAMELEN 1024
#endif
-/********************* APACHE1 ******************************************************************************/
#ifndef STANDARD20_MODULE_STUFF
+#define APACHE2
+#endif
+
+/********************* APACHE1 ******************************************************************************/
+#ifndef APACHE2
#include "ap_config.h"
#if defined(sun)
#include <sys/ioccom.h>
child_info;
const char *userdata_key = "waklog_init";
-#endif /* STANDARD20_MODULE_STUFF */
+#endif /* APACHE2 */
/**************************************************************************************************/
#include <krb5.h>
#include <afs/ptuser.h>
#include <rx/rxkad.h>
-#define KEYTAB "/etc/keytab.wwwserver"
-#define PRINCIPAL "someplacewwwserver"
#define AFS_CELL "someplace.edu"
/* If there's an error, retry more aggressively */
vsnprintf (errstr, 1024, fmt, ap);
va_end (ap);
-#ifdef STANDARD20_MODULE_STUFF
+#ifdef APACHE2
ap_log_error (file, line, level | APLOG_NOERRNO, status, s, "(%d) %s", getpid(), errstr);
#else
ap_log_error (file, line, level | APLOG_NOERRNO, s, "(%d) %s", getpid(), errstr);
log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "mod_waklog: cfg is %d", cfg );
}
-#ifdef STANDARD20_MODULE_STUFF
+#ifdef APACHE2
if ( self ) {
/* pull out our principal name and stuff from the environment -- webauth better have sent
through. This here is also where you'd suck stuff out of KRB5CCNAME if we were
}
-#ifndef STANDARD20_MODULE_STUFF
+#ifndef APACHE2
static void waklog_child_exit( server_rec *s, MK_POOL *p ) {
#else
apr_status_t waklog_child_exit( void *sr ) {
log_error (APLOG_MARK, APLOG_DEBUG, 0, s,
"mod_waklog: waklog_child_exit complete");
-#ifdef STANDARD20_MODULE_STUFF
+#ifdef APACHE2
return APR_SUCCESS;
#endif
}
static void
-#ifdef STANDARD20_MODULE_STUFF
+#ifdef APACHE2
waklog_child_init (MK_POOL * p, server_rec * s)
#else
waklog_child_init (server_rec * s, MK_POOL * p)
pr_Initialize( 0, AFSDIR_CLIENT_ETC_DIR, cell );
-#ifdef STANDARD20_MODULE_STUFF
+#ifdef APACHE2
apr_pool_cleanup_register(p, s, waklog_child_exit, apr_pool_cleanup_null);
#endif
}
-#ifdef STANDARD20_MODULE_STUFF
+#ifdef APACHE2
static int
waklog_init_handler (apr_pool_t * p, apr_pool_t * plog,
apr_pool_t * ptemp, server_rec * s)
static
-#ifdef STANDARD20_MODULE_STUFF
+#ifdef APACHE2
int
#else
void
#endif
waklog_new_connection (conn_rec * c
-#ifdef STANDARD20_MODULE_STUFF
+#ifdef APACHE2
, void *dummy
#endif
)
return
-#ifdef STANDARD20_MODULE_STUFF
+#ifdef APACHE2
0
#endif
;
return DECLINED;
}
-#ifndef STANDARD20_MODULE_STUFF
+#ifndef APACHE2
module MODULE_VAR_EXPORT waklog_module = {
STANDARD_MODULE_STUFF,
waklog_init, /* module initializer */