Changes to krb5_kt_default_name changed the krb5 ABI. Reverted
authorAlexandra Ellwood <lxs@mit.edu>
Tue, 8 Jul 2008 17:07:08 +0000 (17:07 +0000)
committerAlexandra Ellwood <lxs@mit.edu>
Tue, 8 Jul 2008 17:07:08 +0000 (17:07 +0000)
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
src/lib/krb5/os/ktdefname.c

index 4192362c2db5c3a46c9e5d703370904619793c40..403bb9f6669260debb339235331ac105293ae080 100644 (file)
@@ -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 * );
index 28fac5deea930dae3859e2f4e5d4a8b2d86364d1..022d93cc56a93d44304b41345e0525b0308ef5b7 100644 (file)
@@ -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))