]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
* dnssrv.c (krb5int_make_srv_query_realm): Append a dot to the hostname, if
authorKen Raeburn <raeburn@mit.edu>
Tue, 19 Oct 2004 21:39:53 +0000 (21:39 +0000)
committerKen Raeburn <raeburn@mit.edu>
Tue, 19 Oct 2004 21:39:53 +0000 (21:39 +0000)
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

src/lib/krb5/os/ChangeLog
src/lib/krb5/os/dnssrv.c

index 8282280cb09dd3e1f6ab75a700136f11b26902c8..78e4936bfa1f65018522e8e6028e44f6ef61ae81 100644 (file)
@@ -1,3 +1,9 @@
+2004-10-19  Ken Raeburn  <raeburn@mit.edu>
+
+       * 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  <tlyu@mit.edu>
 
        * dnsglue.c (initparse): Skip query type and class when we lack
index e0c593010ecd3a304cc13bf58d07f51d6388c6ad..dffdc8d077f4ca840f8692a2001b79b14df2bda3 100644 (file)
@@ -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);