k5path, kerror );
}
- log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "mod_waklog: set_auth: %d, %s, %s, %d, KRB5CC=%s",
+ log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "mod_waklog: set_auth: %d, %s, %s, %d, KRB5CC=%s user=%s",
self, principal ? principal : "NULL",
- keytab ? keytab : "NULL", storeonly, k5path ? k5path : "NULL");
+ keytab ? keytab : "NULL",
+ storeonly,
+ k5path ? k5path : "NULL",
+#ifdef APACHE2
+ (r && r->user) ? r->user : "NULL"
+#else
+ "NULL"
+#endif
+ );
/* pull the server config record that we care about... */
/* we'll pick this up later after we've checked the cache and current state */
} else
- if (r && r->user) {
+ if (r && r->user && !principal) {
strncpy(k5user, r->user, sizeof(k5user));
keytab = NULL;
} else
} else if ( cfg->default_principal ) {
log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "mod_waklog: phase7 using default user %s", cfg->default_principal);
rc = set_auth( r->server, r, 0, cfg->default_principal, cfg->default_keytab, 0);
+ } else {
+ log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "mod_waklog: phase7 using no default principal");
+ set_auth(r->server, r, 0, NULL, NULL, 0);
}
if ( rc ) {