summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/kdb/ChangeLog5
-rw-r--r--src/lib/kdb/keytab.c4
2 files changed, 8 insertions, 1 deletions
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 <raeburn@mit.edu>
+
+ * keytab.c (krb5_ktkdb_get_entry): Don't use local variable
+ "context" until after it's been set.
+
2003-12-13 Ken Raeburn <raeburn@mit.edu>
* 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)))