Support reading a list of TCP port numbers from the KDC config file; default
authorKen Raeburn <raeburn@mit.edu>
Wed, 18 Sep 2002 20:45:36 +0000 (20:45 +0000)
committerKen Raeburn <raeburn@mit.edu>
Wed, 18 Sep 2002 20:45:36 +0000 (20:45 +0000)
to none for now.

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

src/include/krb5/ChangeLog
src/include/krb5/adm.h
src/include/krb5/stock/ChangeLog
src/include/krb5/stock/osconf.h
src/lib/kadm5/ChangeLog
src/lib/kadm5/admin.h
src/lib/kadm5/alt_prof.c

index 7874b8b4094e13e8cb83ce6ec87223906f4f2623..d620091a9870677289cfd780eae5bbc62a0992d7 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-18  Ken Raeburn  <raeburn@mit.edu>
+
+       * adm.h (struct __krb5_realm_params): New field
+       realm_kdc_tcp_ports.
+
 2002-08-29  Ken Raeburn  <raeburn@mit.edu>
 
        * Makefile.in: Revert $(S)=>/ change, for Windows support.
index 820f652b9c488b00e463ba2273119c957310c92d..d7238ace5a6976c197ca0878019223df50950019 100644 (file)
@@ -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;
index 1b8f67f3dee618e79f5392198d487bc044cf0104..890114c126f17a81c7e69df5cb8ee357eecbb3b1 100644 (file)
@@ -1,3 +1,9 @@
+2002-09-18  Ken Raeburn  <raeburn@mit.edu>
+
+       * osconf.h (DEFAULT_KDC_UDP_PORTLIST): Renamed from
+       DEFAULT_KDC_PORTLIST.
+       (DEFAULT_KDC_TCP_PORTLIST): New macro.
+
 2002-07-03  Alexandra Ellwood <lxs@mit.edu>
 
        * osconf.h (DEFAULT_PROFILE_PATH): Conditionalized for Mac OS X
index c4cc76c76a7cd92513ffdad09801c4b9bf07e5d8..e686c94345722b39d8b465c44b1af63342b8e2ff 100644 (file)
@@ -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.
index d9888e378652a3d69b559a9e8b625b8b3079138d..bed518889c6dd9fcbc5e7ab144aaba6b7ed2067a 100644 (file)
@@ -1,5 +1,11 @@
 2002-09-18  Ken Raeburn  <raeburn@mit.edu>
 
+       * 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.
index c3242c03504e3941b0c894058ebc70074c08896a..9c366ff72ef990a5638768a5ef46b660ccf0e59a 100644 (file)
@@ -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;
index 911ea1d9fc4834ca219aaed4b4b75bc2c13f7cb2..758c8857d10712a2d208df6f0b390e6c0748d38e 100644 (file)
@@ -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);