From: Greg Hudson Date: Tue, 23 Oct 2012 17:16:44 +0000 (-0400) Subject: Alter responder function signature for consistency X-Git-Tag: krb5-1.12-alpha1~508 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8450ead695639f09862fdcecd46530b1d1b59bfe;p=thirdparty%2Fkrb5.git Alter responder function signature for consistency For the responder callback signature, put the closure argument just after the context, and use KRB5_CALLCONV. These changes make the signature consistent with most other libkrb5 callbacks. ticket: 7419 (new) target_version: 1.11 tags: pullup --- diff --git a/src/include/krb5/krb5.hin b/src/include/krb5/krb5.hin index 6a4f995a64..1db64743e3 100644 --- a/src/include/krb5/krb5.hin +++ b/src/include/krb5/krb5.hin @@ -6479,8 +6479,8 @@ krb5_responder_set_answer(krb5_context ctx, krb5_responder_context rctx, * Responder function for an initial credential exchange. * * @param [in] ctx Library context - * @param [in] rctx Responder context * @param [in] data Callback data + * @param [in] rctx Responder context * * A responder function is like a prompter function, but is used for handling * questions and answers as potentially complex data types. Client @@ -6496,8 +6496,8 @@ krb5_responder_set_answer(krb5_context ctx, krb5_responder_context rctx, * If a required question is unanswered, the prompter may be called. */ typedef krb5_error_code -(*krb5_responder_fn)(krb5_context ctx, krb5_responder_context rctx, - void *data); +(KRB5_CALLCONV *krb5_responder_fn)(krb5_context ctx, void *data, + krb5_responder_context rctx); typedef struct _krb5_responder_otp_tokeninfo { krb5_flags flags; diff --git a/src/lib/krb5/krb/preauth2.c b/src/lib/krb5/krb/preauth2.c index 9ce82d5a35..b900ce42c0 100644 --- a/src/lib/krb5/krb/preauth2.c +++ b/src/lib/krb5/krb/preauth2.c @@ -1006,8 +1006,8 @@ krb5_do_preauth(krb5_context context, krb5_kdc_req *request, /* Call the responder to answer response items. */ if (responder != NULL && !k5_response_items_empty(rock->rctx.items)) { - ret = (*responder)(context, &rock->rctx, - opte->opt_private->responder_data); + ret = (*responder)(context, opte->opt_private->responder_data, + &rock->rctx); if (ret) goto error; }