From b50f29a4ebc41d43f07a3191259ca915ecadb544 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Sat, 3 Apr 2004 01:23:51 +0000 Subject: [PATCH] * keytab.c (krb5_ktkdb_get_entry): Don't use local variable "context" until after it's been set. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16229 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/kdb/ChangeLog | 5 +++++ src/lib/kdb/keytab.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/kdb/ChangeLog b/src/lib/kdb/ChangeLog index 49ae47865..84bc49e45 100644 --- a/src/lib/kdb/ChangeLog +++ b/src/lib/kdb/ChangeLog @@ -1,3 +1,8 @@ +2004-04-02 Ken Raeburn + + * keytab.c (krb5_ktkdb_get_entry): Don't use local variable + "context" until after it's been set. + 2003-12-13 Ken Raeburn * keytab.c (krb5_ktkdb_get_name): New function. diff --git a/src/lib/kdb/keytab.c b/src/lib/kdb/keytab.c index 4d5894d08..77215f410 100644 --- a/src/lib/kdb/keytab.c +++ b/src/lib/kdb/keytab.c @@ -130,7 +130,7 @@ krb5_ktkdb_get_entry(in_context, id, principal, kvno, enctype, entry) krb5_db_entry db_entry; krb5_boolean more = 0; int n = 0; - int xrealm_tgt = is_xrealm_tgt(context, principal); + int xrealm_tgt; int similar; if (ktkdb_ctx) @@ -138,6 +138,8 @@ krb5_ktkdb_get_entry(in_context, id, principal, kvno, enctype, entry) else context = in_context; + xrealm_tgt = is_xrealm_tgt(context, principal); + /* Open database */ /* krb5_db_init(context); */ if ((kerror = krb5_db_open_database(context))) -- 2.26.2