heimdal:kdc: add support for HDB_ERR_WRONG_REALM
authorStefan Metzmacher <metze@samba.org>
Tue, 10 Feb 2015 13:37:29 +0000 (14:37 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 8 Jul 2015 16:38:20 +0000 (18:38 +0200)
commit2d98800219e1bc434cccc09322b4b509879d2a7d
tree2571c63cea743263ddaa012caede38b74a7d4b05
parentc63f3607881154e1bf86bdd1009f9cdec4a47576
heimdal:kdc: add support for HDB_ERR_WRONG_REALM

A backend can return this if asked with HDB_F_GET_CLIENT|HDB_F_FOR_AS_REQ
for a KRB5_NT_ENTERPRISE_PRINCIPAL record or for HDB_F_GET_SERVER | HDB_F_FOR_TGS_REQ.

entry_ex->entry.principal->realm needs to return the real realm of the principal
(or at least a the realm of the next cross-realm trust hop).

This is needed to route enterprise principals between AD domain trusts.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/heimdal/kdc/kerberos5.c
source4/heimdal/kdc/krb5tgs.c
source4/heimdal/kdc/misc.c
source4/heimdal/lib/hdb/hdb_err.et