krb5_kt_have_content

Tom Yu tlyu at MIT.EDU
Sat Jun 2 19:48:39 EDT 2012


Greg Hudson <ghudson at MIT.EDU> writes:

> Of course, having sent that out, I just noticed another issue.  The
> Heimdal API signature for krb5_kt_have_content() returns krb5_boolean,
> but the actual return value is a krb5_error_code (0 or KRB5_KT_NOTFOUND).
>
> I think the best choice here is to return krb5_error_code, which is
> normally the same type (int) as krb5_boolean, and maybe suggest that
> Heimdal correct its API since it should be ABI-compatible to do so.

krb5_boolean is an unsigned int, not an int.  Also, on some platforms,
krb5_int32 (which is also krb5_error_code) might not be the same C
type as int.  This is most likely on a platform (probably an embedded
system) whose native integer type is less than 32 bits, and we already
have some places that assume int is at least 32 bits.

It's probably OK for most platforms that people are likely to care
about, but it does add a small increment to the difficulty of making
our code base portable to embedded systems.


More information about the krbdev mailing list