aboutsummaryrefslogtreecommitdiff
path: root/src/lib/krb5/krb/get_creds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/krb5/krb/get_creds.c')
-rw-r--r--src/lib/krb5/krb/get_creds.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/krb5/krb/get_creds.c b/src/lib/krb5/krb/get_creds.c
index 6099c6d..0e4956e 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/<realm>@<client realm>. 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. */