plugin interface functions must specify calling convention
The plugin interfaces were originally implemented for use on Unix where KRB5_CALLCONV, HEIM_CALLCONV and similar are defined as nothing. However, on 32-bit Windows the calling convention matters and executing a __stdcall function through a __cdecl function pointer will result in failures. This change updates the krb5plugin_windc, krb5plugin_service_locate, krb5plugin_send_to_kdc plugins to specify the KRB5_CALLCONV for functions. This brings the plugins into compliance with the heim_plugin_common interface requirement that init() and fini() use the platform specified HEIM_CALLCONV. The krb5-plugin(7) man page is updated and the lib/krb5/test_plugin test is also fixed. With this change all tests pass on 32-bit Windows. Change-Id: Ic9d2e1285c9c179e3898dc9d071ed092bcddc406
This commit is contained in:

committed by
Nico Williams

parent
357a38fc7f
commit
6cfbde4d86
@@ -53,11 +53,11 @@
|
||||
struct hdb_entry_ex;
|
||||
|
||||
typedef krb5_error_code
|
||||
(*krb5plugin_windc_pac_generate)(void *, krb5_context,
|
||||
(KRB5_CALLCONV *krb5plugin_windc_pac_generate)(void *, krb5_context,
|
||||
struct hdb_entry_ex *, krb5_pac *);
|
||||
|
||||
typedef krb5_error_code
|
||||
(*krb5plugin_windc_pac_verify)(void *, krb5_context,
|
||||
(KRB5_CALLCONV *krb5plugin_windc_pac_verify)(void *, krb5_context,
|
||||
const krb5_principal, /* new ticket client */
|
||||
const krb5_principal, /* delegation proxy */
|
||||
struct hdb_entry_ex *,/* client */
|
||||
@@ -66,7 +66,7 @@ typedef krb5_error_code
|
||||
krb5_pac *);
|
||||
|
||||
typedef krb5_error_code
|
||||
(*krb5plugin_windc_client_access)(
|
||||
(KRB5_CALLCONV *krb5plugin_windc_client_access)(
|
||||
void *, krb5_context,
|
||||
krb5_kdc_configuration *config,
|
||||
hdb_entry_ex *, const char *,
|
||||
@@ -79,8 +79,8 @@ typedef krb5_error_code
|
||||
|
||||
typedef struct krb5plugin_windc_ftable {
|
||||
int minor_version;
|
||||
krb5_error_code (*init)(krb5_context, void **);
|
||||
void (*fini)(void *);
|
||||
krb5_error_code (KRB5_CALLCONV *init)(krb5_context, void **);
|
||||
void (KRB5_CALLCONV *fini)(void *);
|
||||
krb5plugin_windc_pac_generate pac_generate;
|
||||
krb5plugin_windc_pac_verify pac_verify;
|
||||
krb5plugin_windc_client_access client_access;
|
||||
|
Reference in New Issue
Block a user