diff options
author | Theodore Tso <tytso@mit.edu> | 1995-04-22 04:37:38 +0000 |
---|---|---|
committer | Theodore Tso <tytso@mit.edu> | 1995-04-22 04:37:38 +0000 |
commit | d078d8535edb846b3d8b5d82187775caa3078d5e (patch) | |
tree | e1289f67dbad2c6320b99855f6c4ce7e0abf5e14 /src/kdc | |
parent | 5b3eb02b652e8377c88c585b882c16ff0d6bf87e (diff) | |
download | krb5-d078d8535edb846b3d8b5d82187775caa3078d5e.tar.gz krb5-d078d8535edb846b3d8b5d82187775caa3078d5e.tar.xz krb5-d078d8535edb846b3d8b5d82187775caa3078d5e.zip |
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
Diffstat (limited to 'src/kdc')
-rw-r--r-- | src/kdc/ChangeLog | 5 | ||||
-rw-r--r-- | src/kdc/network.c | 14 |
2 files changed, 10 insertions, 9 deletions
diff --git a/src/kdc/ChangeLog b/src/kdc/ChangeLog index 24df9cc03c..4f24f550a1 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 e08777f38e..ff99911d1d 100644 --- a/src/kdc/network.c +++ b/src/kdc/network.c @@ -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 */ } |