From: Theodore Tso Date: Sat, 22 Apr 1995 04:37:38 +0000 (+0000) Subject: Don't rely on krb5_kdc_portname and krb5_kdc_sec_portname anymore. X-Git-Tag: krb5-1.0-beta5~303 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d078d8535edb846b3d8b5d82187775caa3078d5e;p=krb5.git Don't rely on krb5_kdc_portname and krb5_kdc_sec_portname anymore. Use the #define'd versions. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5443 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kdc/ChangeLog b/src/kdc/ChangeLog index 24df9cc03..4f24f550a 100644 --- a/src/kdc/ChangeLog +++ b/src/kdc/ChangeLog @@ -1,3 +1,8 @@ +Sat Apr 22 00:36:37 1995 Theodore Y. Ts'o (tytso@dcl) + + * network.c (setup_network): Don't rely on krb5_kdc_portname and + krb5_kdc_sec_portname anymore. Use the #define'd versions. + Fri Mar 31 16:50:07 1995 Theodore Y. Ts'o (tytso@dcl) * main.c (main): Make sure the context is initialized before it is diff --git a/src/kdc/network.c b/src/kdc/network.c index e08777f38..ff99911d1 100644 --- a/src/kdc/network.c +++ b/src/kdc/network.c @@ -40,8 +40,6 @@ #include #include -extern char *krb5_kdc_udp_portname; -extern char *krb5_kdc_sec_udp_portname; extern int errno; extern short primary_port; @@ -64,7 +62,7 @@ const char *prog; if (primary_port) { sin.sin_port = htons(primary_port); } else { - sp = getservbyname(krb5_kdc_udp_portname, "udp"); + sp = getservbyname(KDC_PORTNAME, "udp"); if (!sp) sin.sin_port = htons(KRB5_DEFAULT_PORT); else @@ -87,15 +85,13 @@ const char *prog; select_nfsd = udp_port_fd+1; /* - * Now we set up the secondary listening port, if it is enabled + * Now we set up the secondary listening port */ - if (!krb5_kdc_sec_udp_portname) - return 0; /* No secondary listening port defined */ - sp = getservbyname(krb5_kdc_sec_udp_portname, "udp"); - if (!sp && sin.sin_port != htons(KRB5_DEFAULT_SEC_PORT)) { + sp = getservbyname(KDC_SECONDARY_PORTNAME, "udp"); + if (!sp && sin.sin_port == htons(KRB5_DEFAULT_SEC_PORT)) { com_err(prog, 0, "%s/udp service unknown\n", - krb5_kdc_sec_udp_portname); + KDC_SECONDARY_PORTNAME); return 0; /* Don't give an error if we can't */ /* find it */ }