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>
Sat, 2 Oct 2010 02:15:47 +0000 (12:15 +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

kdc/krb5tgs.c

index 877f7dc250d23d6f2004f9a9d6a3c311b73f2fd1..5958e456b5e26ca59d01d3f035ed4a7c52aaf3b1 100644 (file)
@@ -1694,7 +1694,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) {