From 8f1280b5fade20e89620682e87c1f511337a7239 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Tue, 27 Apr 2010 09:02:48 +0000 Subject: [PATCH] Fix a backwards check in get_cached_tgt() in the TGS code git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23945 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/get_creds.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/krb5/krb/get_creds.c b/src/lib/krb5/krb/get_creds.c index 6099c6d91..0e4956e26 100644 --- a/src/lib/krb5/krb/get_creds.c +++ b/src/lib/krb5/krb/get_creds.c @@ -733,14 +733,14 @@ get_cached_tgt(krb5_context context, krb5_tkt_creds_context ctx, *tgt = NULL; /* Construct the principal krbtgt/@. The realm - * won't matter unless we're getting the local TGT. */ + * won't matter if we're getting a foreign TGT. */ code = krb5int_tgtname(context, realm, &ctx->client->realm, &tgtname); if (code != 0) goto cleanup; - /* Match the TGT realm only if we're getting the local TGT. */ + /* Don't match the TGT realm if we're getting a foreign TGT. */ flags = KRB5_TC_SUPPORTED_KTYPES; - if (local_realm) + if (!local_realm) flags |= KRB5_TC_MATCH_SRV_NAMEONLY; /* Construct a matching cred for the ccache query. */ -- 2.26.2