What is the intended calling convention on Windows between GSS mechglue and SPI?

Greg Hudson ghudson at MIT.EDU
Mon Jun 13 12:19:23 EDT 2011


On Mon, 2011-06-13 at 11:33 -0400, Sam Hartman wrote:
> I don't think MIT has shipped a working mechglue that can dynamically
> load mechanisms on Windows, although perhaps the 1.9 code has this
> functionality if built on Windows. It certainly has not been in an MIT
> KFW release.

Based on one user report, if you build 1.9 on Windows you don't get
functioning GSSAPI.  I haven't looked into specifics.  (When I got the
build system working again, I only tested kinit and klist.)  I doubt
there's a compatibility issue here.

> The current trunk code does not decorate the function pointers in
> mglueP.h with any calling convention.
> 
> I think that means that we'll use the C calling convention when calling
> through the function pointers into dynamic mechanisms.
> 
> I'm guessing this is a bug.

Heimdal appears to use __stdcall on Windows in its mechglue/mech
interface.  If we want it to be eventually possible to mix mechglues, we
probably need to follow suit.

I haven't been able to find any compelling reason for Windows DLLs to
decorate all of their APIS with __stdcall (NSS doesn't seem to do it,
for example), but it doesn't appear to be an uncommon practice.





More information about the krbdev mailing list