From: Ken Raeburn Date: Fri, 23 Aug 2002 02:54:02 +0000 (+0000) Subject: * locate_kdc.c (krb5_locate_kdc): Don't look up kerberos-sec for TCP service X-Git-Tag: krb5-1.3-alpha1~487 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=55b10782b621ca8f888d103a7b1bcc0469f2184d;p=krb5.git * locate_kdc.c (krb5_locate_kdc): Don't look up kerberos-sec for TCP service git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14748 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 08e7f9b8d..3de2ddf77 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -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. diff --git a/src/lib/krb5/os/locate_kdc.c b/src/lib/krb5/os/locate_kdc.c index 8461d79dc..ac64ce04f 100644 --- a/src/lib/krb5/os/locate_kdc.c +++ b/src/lib/krb5/os/locate_kdc.c @@ -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