svn commit: lorikeet r480 - in trunk/heimdal/lib/krb5: .

abartlet at samba.org abartlet at samba.org
Fri Oct 14 05:30:26 GMT 2005


Author: abartlet
Date: 2005-10-14 05:30:25 +0000 (Fri, 14 Oct 2005)
New Revision: 480

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=lorikeet&rev=480

Log:
Merge from Samba4:  Don't lookup DNS for unqualified names.

Andrew Bartlett

Modified:
   trunk/heimdal/lib/krb5/get_host_realm.c


Changeset:
Modified: trunk/heimdal/lib/krb5/get_host_realm.c
===================================================================
--- trunk/heimdal/lib/krb5/get_host_realm.c	2005-10-03 23:33:37 UTC (rev 479)
+++ trunk/heimdal/lib/krb5/get_host_realm.c	2005-10-14 05:30:25 UTC (rev 480)
@@ -233,6 +233,7 @@
 		    krb5_realm **realms)
 {
     char hostname[MAXHOSTNAMELEN];
+    krb5_boolean use_dns;
 
     if (host == NULL) {
 	if (gethostname (hostname, sizeof(hostname)))
@@ -240,5 +241,11 @@
 	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);
 }



More information about the samba-cvs mailing list