heimdal use returned server entry from HDB to compare realms
authorAndrew Bartlett <abartlet@samba.org>
Fri, 1 Oct 2010 03:58:36 +0000 (13:58 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 1 Oct 2010 23:11:37 +0000 (09:11 +1000)
Some hdb modules (samba4) may change the case of the realm in
a returned result.  Use that to determine if it matches the krbtgt
realm also returned from the DB (the DB will return it in the 'right' case)

Andrew Bartlett

source4/heimdal/kdc/krb5tgs.c

index 3560a0df668c039eb5c8b6f142c8f99deaac4285..06a535d4d4483fa6a53f801def1a9be5e55425d8 100644 (file)
@@ -1689,7 +1689,7 @@ server_lookup:
      * backward.
      */
 
-    if (strcmp(krb5_principal_get_realm(context, sp),
+    if (strcmp(krb5_principal_get_realm(context, server->entry.principal),
               krb5_principal_get_comp_string(context,
                                              krbtgt->entry.principal,
                                              1)) != 0) {