summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2004-04-03 01:23:51 +0000
committerKen Raeburn <raeburn@mit.edu>2004-04-03 01:23:51 +0000
commitb50f29a4ebc41d43f07a3191259ca915ecadb544 (patch)
tree5179d3a7c1f4c1debffb2a3276652a206ad31297 /src
parente93699e3eb313e128f60ebd007d8d4f9bfd8322e (diff)
downloadkrb5-b50f29a4ebc41d43f07a3191259ca915ecadb544.tar.gz
krb5-b50f29a4ebc41d43f07a3191259ca915ecadb544.tar.xz
krb5-b50f29a4ebc41d43f07a3191259ca915ecadb544.zip
* 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
Diffstat (limited to 'src')
-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)))