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:
Jeffrey Altman
2021-11-18 09:16:45 -05:00
committed by Nico Williams
parent 357a38fc7f
commit 6cfbde4d86
5 changed files with 24 additions and 22 deletions
+3 -3
View File
@@ -34,19 +34,19 @@
#include <krb5_locl.h>
#include "locate_plugin.h"
static krb5_error_code
static krb5_error_code KRB5_CALLCONV
resolve_init(krb5_context context, void **ctx)
{
*ctx = NULL;
return 0;
}
static void
static void KRB5_CALLCONV
resolve_fini(void *ctx)
{
}
static krb5_error_code
static krb5_error_code KRB5_CALLCONV
resolve_lookup(void *ctx,
enum locate_service_type service,
const char *realm,