This is called from gsskrb5_set_dns_canonicalize() and krb5_set_dns_canonicalize_hostname()
and is used by Samba to ensure that the AD DC sees the name as specified by the client.
We allow the krb5.conf to override, if specifically configured.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
}
if (r[0].type == KRB5_NCRT_BOGUS) {
- /* No rules, or no valid rules */
- r[0].type = KRB5_NCRT_NSS;
+ /* No rules, or no valid rules */
+ if (context->flags & KRB5_CTX_F_DNS_CANONICALIZE_HOSTNAME) {
+ r[0].type = KRB5_NCRT_NSS;
+ } else {
+ r[0].type = KRB5_NCRT_AS_IS;
+ }
}
*rules = r;