From: Ken Raeburn Date: Wed, 18 Sep 2002 20:45:36 +0000 (+0000) Subject: Support reading a list of TCP port numbers from the KDC config file; default X-Git-Tag: krb5-1.3-alpha1~373 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c821d8b631975757ec6b348cdf49322c26ac9426;p=krb5.git Support reading a list of TCP port numbers from the KDC config file; default to none for now. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14878 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/krb5/ChangeLog b/src/include/krb5/ChangeLog index 7874b8b40..d620091a9 100644 --- a/src/include/krb5/ChangeLog +++ b/src/include/krb5/ChangeLog @@ -1,3 +1,8 @@ +2002-09-18 Ken Raeburn + + * adm.h (struct __krb5_realm_params): New field + realm_kdc_tcp_ports. + 2002-08-29 Ken Raeburn * Makefile.in: Revert $(S)=>/ change, for Windows support. diff --git a/src/include/krb5/adm.h b/src/include/krb5/adm.h index 820f652b9..d7238ace5 100644 --- a/src/include/krb5/adm.h +++ b/src/include/krb5/adm.h @@ -200,6 +200,7 @@ typedef struct __krb5_realm_params { char * realm_mkey_name; char * realm_stash_file; char * realm_kdc_ports; + char * realm_kdc_tcp_ports; char * realm_acl_file; krb5_int32 realm_kadmind_port; krb5_enctype realm_enctype; diff --git a/src/include/krb5/stock/ChangeLog b/src/include/krb5/stock/ChangeLog index 1b8f67f3d..890114c12 100644 --- a/src/include/krb5/stock/ChangeLog +++ b/src/include/krb5/stock/ChangeLog @@ -1,3 +1,9 @@ +2002-09-18 Ken Raeburn + + * osconf.h (DEFAULT_KDC_UDP_PORTLIST): Renamed from + DEFAULT_KDC_PORTLIST. + (DEFAULT_KDC_TCP_PORTLIST): New macro. + 2002-07-03 Alexandra Ellwood * osconf.h (DEFAULT_PROFILE_PATH): Conditionalized for Mac OS X diff --git a/src/include/krb5/stock/osconf.h b/src/include/krb5/stock/osconf.h index c4cc76c76..e686c9434 100644 --- a/src/include/krb5/stock/osconf.h +++ b/src/include/krb5/stock/osconf.h @@ -76,7 +76,8 @@ #define DEFAULT_KPASSWD_PORT 464 #define KPASSWD_PORTNAME "kpasswd" -#define DEFAULT_KDC_PORTLIST "88,750" +#define DEFAULT_KDC_UDP_PORTLIST "88,750" +#define DEFAULT_KDC_TCP_PORTLIST "" /* * Defaults for the KADM5 admin system. diff --git a/src/lib/kadm5/ChangeLog b/src/lib/kadm5/ChangeLog index d9888e378..bed518889 100644 --- a/src/lib/kadm5/ChangeLog +++ b/src/lib/kadm5/ChangeLog @@ -1,5 +1,11 @@ 2002-09-18 Ken Raeburn + * admin.h (struct __krb5_realm_params): New field + realm_kdc_tcp_ports. + * alt_prof.c (krb5_read_realm_params): Fill it in by looking up + "kdc_tcp_ports" in the config file. + (krb5_free_realm_params): Free the storage. + * logger.c (klog_com_err_proc, krb5_klog_init, krb5_klog_close, severity2string, klog_vsyslog, krb5_klog_syslog, krb5_klog_reopen): Always define functions in prototype style. diff --git a/src/lib/kadm5/admin.h b/src/lib/kadm5/admin.h index c3242c035..9c366ff72 100644 --- a/src/lib/kadm5/admin.h +++ b/src/lib/kadm5/admin.h @@ -252,6 +252,7 @@ typedef struct __krb5_realm_params { char * realm_mkey_name; char * realm_stash_file; char * realm_kdc_ports; + char * realm_kdc_tcp_ports; char * realm_acl_file; krb5_int32 realm_kadmind_port; krb5_enctype realm_enctype; diff --git a/src/lib/kadm5/alt_prof.c b/src/lib/kadm5/alt_prof.c index 911ea1d9f..758c8857d 100644 --- a/src/lib/kadm5/alt_prof.c +++ b/src/lib/kadm5/alt_prof.c @@ -838,7 +838,10 @@ krb5_read_realm_params(kcontext, realm, kdcprofile, kdcenv, rparamp) hierarchy[2] = "kdc_ports"; if (!krb5_aprof_get_string(aprofile, hierarchy, TRUE, &svalue)) rparams->realm_kdc_ports = svalue; - + hierarchy[2] = "kdc_tcp_ports"; + if (!krb5_aprof_get_string(aprofile, hierarchy, TRUE, &svalue)) + rparams->realm_kdc_tcp_ports = svalue; + /* Get the name of the acl file */ hierarchy[2] = "acl_file"; if (!krb5_aprof_get_string(aprofile, hierarchy, TRUE, &svalue)) @@ -990,6 +993,8 @@ krb5_free_realm_params(kcontext, rparams) krb5_xfree(rparams->realm_keysalts); if (rparams->realm_kdc_ports) krb5_xfree(rparams->realm_kdc_ports); + if (rparams->realm_kdc_tcp_ports) + krb5_xfree(rparams->realm_kdc_tcp_ports); if (rparams->realm_acl_file) krb5_xfree(rparams->realm_acl_file); krb5_xfree(rparams);