Don't rely on krb5_kdc_portname and krb5_kdc_sec_portname anymore.
authorTheodore Tso <tytso@mit.edu>
Sat, 22 Apr 1995 04:37:38 +0000 (04:37 +0000)
committerTheodore Tso <tytso@mit.edu>
Sat, 22 Apr 1995 04:37:38 +0000 (04:37 +0000)
Use the #define'd versions.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5443 dc483132-0cff-0310-8789-dd5450dbe970

src/kdc/ChangeLog
src/kdc/network.c

index 24df9cc03c3b0c7de6c8360b49bee797c6706bb6..4f24f550a15678935e9ee64a7b4e15aed9b04839 100644 (file)
@@ -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
index e08777f38e57914f05d2a0c234d250b879dad97c..ff99911d1dfd68b48ab70400fbb5feb3ff727d7f 100644 (file)
@@ -40,8 +40,6 @@
 #include <arpa/inet.h>
 #include <netdb.h>
 
-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 */
     }