* avoid a dependency on a libkdb5 type). */
void *(*client_entry)(krb5_context context, krb5_kdcpreauth_rock rock);
+ /* Get a pointer to the verto context an asynchronous plugin should
+ * use to create events in the edata or verify method. */
+ struct verto_ctx *(*event_context)(krb5_context context,
+ krb5_kdcpreauth_rock rock);
+
/* End of version 1 kdcpreauth callbacks. */
} *krb5_kdcpreauth_callbacks;
krb5_data *response);
void dispatch(void *handle, struct sockaddr *local_addr,
const krb5_fulladdr *remote_addr, krb5_data *request,
- int is_tcp, loop_respond_fn respond, void *arg);
+ int is_tcp, verto_ctx *vctx, loop_respond_fn respond, void *arg);
krb5_error_code make_toolong_error (void *handle, krb5_data **);
/*
void
dispatch(void *handle, struct sockaddr *local_saddr,
const krb5_fulladdr *remote_faddr, krb5_data *request, int is_tcp,
- loop_respond_fn respond, void *arg)
+ verto_ctx *vctx, loop_respond_fn respond, void *arg)
{
krb5_error_code ret;
krb5_keytab kt = NULL;
}
void
-dispatch(void *cb, struct sockaddr *local_saddr, const krb5_fulladdr *from,
- krb5_data *pkt, int is_tcp, loop_respond_fn respond, void *arg)
+dispatch(void *cb, struct sockaddr *local_saddr,
+ const krb5_fulladdr *from, krb5_data *pkt, int is_tcp,
+ verto_ctx *vctx, loop_respond_fn respond, void *arg)
{
krb5_error_code retval;
krb5_kdc_req *as_req;
* process_as_req frees the request if it is called
*/
if (!(retval = setup_server_realm(as_req->server))) {
- process_as_req(as_req, pkt, from, finish_dispatch, state);
+ process_as_req(as_req, pkt, from, vctx, finish_dispatch,
+ state);
return;
}
else
/*ARGSUSED*/
void
process_as_req(krb5_kdc_req *request, krb5_data *req_pkt,
- const krb5_fulladdr *from, loop_respond_fn respond, void *arg)
+ const krb5_fulladdr *from, verto_ctx *vctx,
+ loop_respond_fn respond, void *arg)
{
krb5_error_code errcode;
krb5_timestamp rtime;
state->rock.request = state->request;
state->rock.inner_body = state->inner_body;
state->rock.rstate = state->rstate;
+ state->rock.vctx = vctx;
if (!state->request->client) {
state->status = "NULL_CLIENT";
errcode = KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN;
return rock->client;
}
+static verto_ctx *
+event_context(krb5_context context, krb5_kdcpreauth_rock rock)
+{
+ return rock->vctx;
+}
+
static struct krb5_kdcpreauth_callbacks_st callbacks = {
1,
max_time_skew,
fast_armor,
get_string,
free_string,
- client_entry
+ client_entry,
+ event_context
};
static krb5_error_code
void
process_as_req (krb5_kdc_req *, krb5_data *,
const krb5_fulladdr *,
- loop_respond_fn, void *);
+ verto_ctx *, loop_respond_fn, void *);
/* do_tgs_req.c */
krb5_error_code
const krb5_fulladdr *,
krb5_data *,
int,
+ verto_ctx *,
loop_respond_fn,
void *);
krb5_enc_tkt_part *enc_tkt_reply);
typedef void (*kdc_hint_respond_fn)(void *arg);
void
-get_preauth_hint_list(krb5_kdc_req *request, krb5_kdcpreauth_rock rock,
- krb5_pa_data ***e_data_out, kdc_hint_respond_fn respond,
- void *arg);
+get_preauth_hint_list(krb5_kdc_req *request,
+ krb5_kdcpreauth_rock rock, krb5_pa_data ***e_data_out,
+ kdc_hint_respond_fn respond, void *arg);
void
load_preauth_plugins(krb5_context context);
void
krb5_db_entry *client;
krb5_key_data *client_key;
struct kdc_request_state *rstate;
+ verto_ctx *vctx;
};
#define isflagset(flagfield, flag) (flagfield & (flag))
init_addr(&state->faddr, ss2sa(&state->saddr));
/* This address is in net order. */
dispatch(state->handle, ss2sa(&state->daddr), &state->faddr,
- &state->request, 0, process_packet_response, state);
+ &state->request, 0, ctx, process_packet_response, state);
}
static int
local_saddrp = ss2sa(&state->local_saddr);
dispatch(state->conn->handle, local_saddrp, &conn->faddr,
- &state->request, 1, process_tcp_response, state);
+ &state->request, 1, ctx, process_tcp_response, state);
}
return;