From c1519ad280dce377da28fd90cb5ee9e271e08768 Mon Sep 17 00:00:00 2001 From: Alexandra Ellwood Date: Tue, 8 Jul 2008 17:07:08 +0000 Subject: [PATCH] Changes to krb5_kt_default_name changed the krb5 ABI. Reverted API prototype change and added a temporary variable to avoid casting problems. ticket: 5432 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20502 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/krb5/krb5.hin | 2 +- src/lib/krb5/os/ktdefname.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/include/krb5/krb5.hin b/src/include/krb5/krb5.hin index 4192362c2..403bb9f66 100644 --- a/src/include/krb5/krb5.hin +++ b/src/include/krb5/krb5.hin @@ -1605,7 +1605,7 @@ krb5_error_code KRB5_CALLCONV krb5_kt_resolve krb5_error_code KRB5_CALLCONV krb5_kt_default_name (krb5_context, char *, - size_t ); + int ); krb5_error_code KRB5_CALLCONV krb5_kt_default (krb5_context, krb5_keytab * ); diff --git a/src/lib/krb5/os/ktdefname.c b/src/lib/krb5/os/ktdefname.c index 28fac5dee..022d93cc5 100644 --- a/src/lib/krb5/os/ktdefname.c +++ b/src/lib/krb5/os/ktdefname.c @@ -37,10 +37,11 @@ extern char *krb5_defkeyname; char *krb5_overridekeyname = NULL; krb5_error_code KRB5_CALLCONV -krb5_kt_default_name(krb5_context context, char *name, size_t namesize) +krb5_kt_default_name(krb5_context context, char *name, int name_size) { char *cp = 0; char *retval; + unsigned int namesize = (name_size < 0 ? 0 : name_size); if (krb5_overridekeyname) { if (namesize < (strlen(krb5_overridekeyname)+1)) -- 2.26.2