From: Ken Raeburn Date: Tue, 19 Oct 2004 21:39:53 +0000 (+0000) Subject: * dnssrv.c (krb5int_make_srv_query_realm): Append a dot to the hostname, if X-Git-Tag: krb5-1.4-beta1~12 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=03e3e5ace5c743bac25029e7bc3aef19f9a69f22;p=krb5.git * dnssrv.c (krb5int_make_srv_query_realm): Append a dot to the hostname, if there's room in the buffer, to avoid domain search paths. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16832 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 8282280cb..78e4936bf 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,9 @@ +2004-10-19 Ken Raeburn + + * dnssrv.c (krb5int_make_srv_query_realm): Append a dot to the + hostname, if there's room in the buffer, to avoid domain search + paths. + 2004-10-19 Tom Yu * dnsglue.c (initparse): Skip query type and class when we lack diff --git a/src/lib/krb5/os/dnssrv.c b/src/lib/krb5/os/dnssrv.c index e0c593010..dffdc8d07 100644 --- a/src/lib/krb5/os/dnssrv.c +++ b/src/lib/krb5/os/dnssrv.c @@ -139,6 +139,10 @@ krb5int_make_srv_query_realm(const krb5_data *realm, srv->priority = priority; srv->weight = weight; srv->port = port; + /* The returned names are fully qualified. Don't let the + local resolver code do domain search path stuff. */ + if (strlen(host) + 2 < sizeof(host)) + strcat(host, "."); srv->host = strdup(host); if (srv->host == NULL) { free(srv);