diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-10-14 05:29:44 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:39:50 -0500 |
commit | 5a30cd8097f043fc7466e72f6d63305883392a46 (patch) | |
tree | d5334c2cc044b3c74d91e9ec971a0c64c2ecc191 | |
parent | 2c6ecae4e62a5bb7acac2872450148fb4521cf3e (diff) | |
download | samba-5a30cd8097f043fc7466e72f6d63305883392a46.tar.gz samba-5a30cd8097f043fc7466e72f6d63305883392a46.tar.bz2 samba-5a30cd8097f043fc7466e72f6d63305883392a46.zip |
r10983: Another case were we want to avoid DNS for unqualified names.
Andrew Bartlett
(This used to be commit 1d7094b8dfd53dfda55db7ce30f47f74864093bf)
-rw-r--r-- | source4/heimdal/lib/krb5/get_host_realm.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/heimdal/lib/krb5/get_host_realm.c b/source4/heimdal/lib/krb5/get_host_realm.c index 78684f20a9..33a3438b12 100644 --- a/source4/heimdal/lib/krb5/get_host_realm.c +++ b/source4/heimdal/lib/krb5/get_host_realm.c @@ -233,6 +233,7 @@ krb5_get_host_realm(krb5_context context, krb5_realm **realms) { char hostname[MAXHOSTNAMELEN]; + krb5_boolean use_dns; if (host == NULL) { if (gethostname (hostname, sizeof(hostname))) @@ -240,5 +241,11 @@ krb5_get_host_realm(krb5_context context, host = hostname; } - return _krb5_get_host_realm_int (context, host, 1, realms); + if (strchr(host, '.') == NULL) { + use_dns = FALSE; + } else { + use_dns = TRUE; + } + + return _krb5_get_host_realm_int (context, host, use_dns, realms); } |