From 4b27a708b6eaccbed9f8b91768063c13b0d8fb6e Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Tue, 12 Sep 1995 01:25:10 +0000 Subject: [PATCH] Integrate Macintosh changes into previous sources git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6764 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/keytab/ChangeLog | 3 +++ src/lib/krb5/keytab/file/ChangeLog | 14 ++++++++++++++ src/lib/krb5/keytab/file/ktf_g_ent.c | 4 ++-- src/lib/krb5/keytab/file/ktf_remove.c | 2 +- src/lib/krb5/keytab/file/ktf_util.c | 19 +++++++++---------- src/lib/krb5/keytab/file/ktfile.h | 2 +- src/lib/krb5/keytab/read_servi.c | 8 ++++---- 7 files changed, 34 insertions(+), 18 deletions(-) diff --git a/src/lib/krb5/keytab/ChangeLog b/src/lib/krb5/keytab/ChangeLog index 4a853fdb7..a76291c80 100644 --- a/src/lib/krb5/keytab/ChangeLog +++ b/src/lib/krb5/keytab/ChangeLog @@ -1,3 +1,6 @@ +Wed Sep 06 14:20:57 1995 Chris Provenzano (proven@mit.edu) + + * read_servi.c : s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/g Tue Aug 29 13:37:56 EDT 1995 Paul Park (pjpark@mit.edu) * ktbase.c - Add routines to deal with externalizing krb5_keytab. These diff --git a/src/lib/krb5/keytab/file/ChangeLog b/src/lib/krb5/keytab/file/ChangeLog index 789ac1321..6a3e64823 100644 --- a/src/lib/krb5/keytab/file/ChangeLog +++ b/src/lib/krb5/keytab/file/ChangeLog @@ -1,3 +1,17 @@ +Mon Sep 11 21:22:44 1995 Ezra Peisach + + * ser_ktf.c (krb5_ktf_keytab_externalize): On Macintosh, keytab + file is not left open + +Wed Sep 06 14:20:57 1995 Chris Provenzano (proven@mit.edu) + + * ktf_g_ent.c, ktf_remove.c, ktf_util.c, ktfile.h : + s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/g + +Tue Sep 05 22:10:34 1995 Chris Provenzano (proven@mit.edu) + + * ktf_util.c : Remove krb5_enctype references, and replace with + krb5_keytype where appropriate Tue Aug 29 13:38:58 EDT 1995 Paul Park (pjpark@mit.edu) * Makefile.in, .Sanitize, ser_ktf.c - Add new module to support diff --git a/src/lib/krb5/keytab/file/ktf_g_ent.c b/src/lib/krb5/keytab/file/ktf_g_ent.c index 7f6120bbd..f6c72fe98 100644 --- a/src/lib/krb5/keytab/file/ktf_g_ent.c +++ b/src/lib/krb5/keytab/file/ktf_g_ent.c @@ -30,12 +30,12 @@ #include "ktfile.h" krb5_error_code -krb5_ktfile_get_entry(context, id, principal, kvno, keytype, entry) +krb5_ktfile_get_entry(context, id, principal, kvno, enctype, entry) krb5_context context; krb5_keytab id; krb5_principal principal; krb5_kvno kvno; - krb5_keytype keytype; + krb5_enctype enctype; krb5_keytab_entry * entry; { krb5_keytab_entry cur_entry, new_entry; diff --git a/src/lib/krb5/keytab/file/ktf_remove.c b/src/lib/krb5/keytab/file/ktf_remove.c index a58cc1056..644209f7a 100644 --- a/src/lib/krb5/keytab/file/ktf_remove.c +++ b/src/lib/krb5/keytab/file/ktf_remove.c @@ -52,7 +52,7 @@ krb5_keytab_entry *entry; break; if ((entry->vno == cur_entry.vno) && - (entry->key.keytype == cur_entry.key.keytype) && + (entry->key.enctype == cur_entry.key.enctype) && krb5_principal_compare(context, entry->principal, cur_entry.principal)) { /* found a match */ krb5_kt_free_entry(context, &cur_entry); diff --git a/src/lib/krb5/keytab/file/ktf_util.c b/src/lib/krb5/keytab/file/ktf_util.c index 42009a050..3713c62d6 100644 --- a/src/lib/krb5/keytab/file/ktf_util.c +++ b/src/lib/krb5/keytab/file/ktf_util.c @@ -63,7 +63,7 @@ * sizeof(krb5_int32) for the principal type (for KEYTAB V2 and higher) * sizeof(krb5_int32) bytes for the timestamp * sizeof(krb5_octet) bytes for the key version number - * sizeof(krb5_int16) bytes for the keytype + * sizeof(krb5_int16) bytes for the enctype * sizeof(krb5_int32) bytes for the key length, followed by the key */ @@ -252,7 +252,7 @@ krb5_int32 *delete_point; { krb5_octet vno; krb5_int16 count; - krb5_int16 keytype; + krb5_int16 enctype; krb5_int16 princ_size; register int i; krb5_int32 size; @@ -396,18 +396,17 @@ krb5_int32 *delete_point; ret_entry->vno = (krb5_kvno)vno; /* key type */ - if (!xfread(&keytype, sizeof(keytype), 1, KTFILEP(id))) { + if (!xfread(&enctype, sizeof(enctype), 1, KTFILEP(id))) { error = KRB5_KT_END; goto fail; } - ret_entry->key.keytype = (krb5_keytype)keytype; + ret_entry->key.enctype = (krb5_enctype)enctype; if (KTVERSION(id) != KRB5_KT_VNO_1) - ret_entry->key.keytype = ntohs(ret_entry->key.keytype); + ret_entry->key.enctype = ntohs(ret_entry->key.enctype); /* key contents */ ret_entry->key.magic = KV5M_KEYBLOCK; - ret_entry->key.etype = ETYPE_UNKNOWN; if (!xfread(&count, sizeof(count), 1, KTFILEP(id))) { error = KRB5_KT_END; @@ -470,7 +469,7 @@ krb5_keytab_entry *entry; { krb5_octet vno; krb5_data *princ; - krb5_int16 count, size, keytype; + krb5_int16 count, size, enctype; krb5_error_code retval = 0; krb5_timestamp timestamp; krb5_int32 princ_type; @@ -562,10 +561,10 @@ krb5_keytab_entry *entry; } /* key type */ if (KTVERSION(id) == KRB5_KT_VNO_1) - keytype = entry->key.keytype; + enctype = entry->key.enctype; else - keytype = htons(entry->key.keytype); - if (!xfwrite(&keytype, sizeof(keytype), 1, KTFILEP(id))) { + enctype = htons(entry->key.enctype); + if (!xfwrite(&enctype, sizeof(enctype), 1, KTFILEP(id))) { goto abend; } /* key length */ diff --git a/src/lib/krb5/keytab/file/ktfile.h b/src/lib/krb5/keytab/file/ktfile.h index c1c55dc88..846596608 100644 --- a/src/lib/krb5/keytab/file/ktfile.h +++ b/src/lib/krb5/keytab/file/ktfile.h @@ -86,7 +86,7 @@ krb5_error_code krb5_ktfile_get_entry krb5_keytab, krb5_principal, krb5_kvno, - krb5_keytype, + krb5_enctype, krb5_keytab_entry *)); krb5_error_code krb5_ktfile_start_seq_get diff --git a/src/lib/krb5/keytab/read_servi.c b/src/lib/krb5/keytab/read_servi.c index e18d199b4..a17443461 100644 --- a/src/lib/krb5/keytab/read_servi.c +++ b/src/lib/krb5/keytab/read_servi.c @@ -35,18 +35,18 @@ * effects: If keyprocarg is not NULL, it is taken to be the name of a * keytab. Otherwise, the default keytab will be used. This * routine opens the keytab and finds the principal associated with - * principal, vno, and keytype and returns the resulting key in *key + * principal, vno, and enctype and returns the resulting key in *key * or returning an error code if it is not found. * returns: Either KSUCCESS or error code. * errors: error code if not found or keyprocarg is invalid. */ krb5_error_code -krb5_kt_read_service_key(context, keyprocarg, principal, vno, keytype, key) +krb5_kt_read_service_key(context, keyprocarg, principal, vno, enctype, key) krb5_context context; krb5_pointer keyprocarg; krb5_principal principal; krb5_kvno vno; - krb5_keytype keytype; + krb5_enctype enctype; krb5_keyblock ** key; { krb5_error_code kerror = KSUCCESS; @@ -70,7 +70,7 @@ krb5_kt_read_service_key(context, keyprocarg, principal, vno, keytype, key) if ((kerror = krb5_kt_resolve(context, (char *)keytabname, &id))) return (kerror); - kerror = krb5_kt_get_entry(context, id, principal, vno, keytype, &entry); + kerror = krb5_kt_get_entry(context, id, principal, vno, enctype, &entry); krb5_kt_close(context, id); if (kerror) -- 2.26.2