From dd713150c19e6fa76759cda3fef28690e304cb04 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Fri, 18 Nov 1994 22:26:22 +0000 Subject: [PATCH] Add magic numbers for keytab, principal, and keyblock git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4698 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/keytab/file/ChangeLog | 5 +++++ src/lib/krb5/keytab/file/ktf_util.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/lib/krb5/keytab/file/ChangeLog b/src/lib/krb5/keytab/file/ChangeLog index 33507d2b8..dd484148f 100644 --- a/src/lib/krb5/keytab/file/ChangeLog +++ b/src/lib/krb5/keytab/file/ChangeLog @@ -1,3 +1,8 @@ +Fri Nov 18 15:34:35 1994 Theodore Y. Ts'o (tytso@dcl) + + * ktf_util.c (krb5_ktfileint_internal_read_entry): Add magic + numbers for keytab, principal, and keyblock. + Wed Oct 26 14:41:31 1994 (tytso@rsx-11) * ktf_get_en.c (krb5_ktfile_get_entry): If the requested kvno is diff --git a/src/lib/krb5/keytab/file/ktf_util.c b/src/lib/krb5/keytab/file/ktf_util.c index a3803eaa8..332611197 100644 --- a/src/lib/krb5/keytab/file/ktf_util.c +++ b/src/lib/krb5/keytab/file/ktf_util.c @@ -258,6 +258,7 @@ krb5_int32 *delete_point; krb5_data *princ; memset(ret_entry, 0, sizeof(krb5_keytab_entry)); + ret_entry->magic = KV5M_KEYTAB_ENTRY; /* fseek to synchronise buffered I/O on the key table. */ @@ -303,6 +304,7 @@ krb5_int32 *delete_point; if (!ret_entry->principal) return ENOMEM; + ret_entry->principal->magic = KV5M_PRINCIPAL; ret_entry->principal->length = count; ret_entry->principal->data = (krb5_data *)calloc(count, sizeof(krb5_data)); if (!ret_entry->principal->data) { @@ -398,6 +400,9 @@ krb5_int32 *delete_point; ret_entry->key.keytype = ntohs(ret_entry->key.keytype); /* 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; goto fail; -- 2.26.2