* locate_kdc.c (krb5_locate_kdc): Don't look up kerberos-sec for TCP service
authorKen Raeburn <raeburn@mit.edu>
Fri, 23 Aug 2002 02:54:02 +0000 (02:54 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 23 Aug 2002 02:54:02 +0000 (02:54 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14748 dc483132-0cff-0310-8789-dd5450dbe970

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

index 08e7f9b8d27e054e3e520af012b07dbf160c02d2..3de2ddf776bb93b4712f52539e10f01f60b74fa0 100644 (file)
@@ -3,6 +3,7 @@
        * locate_kdc.c (krb5int_grow_addrlist): Renamed from grow_list,
        now external.
        (grow_list): New macro.
+       (krb5_locate_kdc): Don't look up kerberos-sec for TCP service.
 
        * sendto_kdc.c (MAX_PASS, dprint): New macros.
        (krb5int_debug_fprint, merge_addrlists): New function.
index 8461d79dcaf965a0e7296f54b0dea59b09bdcc9c..ac64ce04f367ef76aa448b20c659e19145972c91 100644 (file)
@@ -820,12 +820,16 @@ krb5_locate_kdc(krb5_context context, const krb5_data *realm,
     int udpport, sec_udpport;
 
     udpport = get_port (KDC_PORTNAME, 0, KRB5_DEFAULT_PORT);
-    sec_udpport = get_port (KDC_SECONDARY_PORTNAME, 0,
-                           (udpport == htons (KRB5_DEFAULT_PORT)
-                            ? KRB5_DEFAULT_SEC_PORT
-                            : KRB5_DEFAULT_PORT));
-    if (sec_udpport == udpport)
+    if (socktype == SOCK_STREAM)
        sec_udpport = 0;
+    else {
+       sec_udpport = get_port (KDC_SECONDARY_PORTNAME, 0,
+                               (udpport == htons (KRB5_DEFAULT_PORT)
+                                ? KRB5_DEFAULT_SEC_PORT
+                                : KRB5_DEFAULT_PORT));
+       if (sec_udpport == udpport)
+           sec_udpport = 0;
+    }
 
     return krb5int_locate_server (context, realm, addrlist, get_masters, "kdc",
                                  (get_masters