Re-add support for supporting the PAC over domain trusts.
authorAndrew Bartlett <abartlet@samba.org>
Tue, 28 Oct 2008 10:07:52 +0000 (21:07 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 4 Nov 2008 05:06:57 +0000 (16:06 +1100)
(This was not entered in lorikeet-heimdal.diff, so missed by metze's import).

Andrew Bartlett

source4/heimdal/kdc/krb5tgs.c

index b986279ad41b6d33f12903f4d7b2065acdc8fa30..4cf93e5a54be2dc0691677b3d8794d3fb0cbe419 100644 (file)
@@ -1376,6 +1376,7 @@ tgs_build_reply(krb5_context context,
     krb5_realm ref_realm = NULL;
     EncTicketPart *tgt = &ticket->ticket;
     KRB5SignedPathPrincipals *spp = NULL;
+    Key *tkey;
     const EncryptionKey *ekey;
     krb5_keyblock sessionkey;
     krb5_kvno kvno;
@@ -1627,27 +1628,24 @@ server_lookup:
        goto out;
     }
 
-    /* check PAC if not cross realm and if there is one */
-    if (!cross_realm) {
-       Key *tkey;
+    /* check PAC if there is one */
 
-       ret = hdb_enctype2key(context, &krbtgt->entry,
-                             krbtgt_etype, &tkey);
-       if(ret) {
-           kdc_log(context, config, 0,
-                   "Failed to find key for krbtgt PAC check");
-           goto out;
-       }
+    ret = hdb_enctype2key(context, &krbtgt->entry,
+                         krbtgt_etype, &tkey);
+    if(ret) {
+       kdc_log(context, config, 0,
+               "Failed to find key for krbtgt PAC check");
+       goto out;
+    }
 
-       ret = check_PAC(context, config, cp,
-                       client, server, ekey, &tkey->key,
-                       tgt, &rspac, &signedpath);
-       if (ret) {
-           kdc_log(context, config, 0,
-                   "Verify PAC failed for %s (%s) from %s with %s",
-                   spn, cpn, from, krb5_get_err_text(context, ret));
-           goto out;
-       }
+    ret = check_PAC(context, config, cp,
+                   client, server, ekey, &tkey->key,
+                   tgt, &rspac, &signedpath);
+    if (ret) {
+       kdc_log(context, config, 0,
+               "Verify PAC failed for %s (%s) from %s with %s",
+               spn, cpn, from, krb5_get_err_text(context, ret));
+       goto out;
     }
 
     /* also check the krbtgt for signature */