* alt_prof.c (kadm5_get_config_params): Add support for Cygnus chpw
authorTom Yu <tlyu@mit.edu>
Wed, 21 Jan 1998 05:17:03 +0000 (05:17 +0000)
committerTom Yu <tlyu@mit.edu>
Wed, 21 Jan 1998 05:17:03 +0000 (05:17 +0000)
* admin.h: Add support for Cygnus chpw.

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

src/lib/kadm5/ChangeLog
src/lib/kadm5/admin.h
src/lib/kadm5/alt_prof.c

index d929b033368d0fa99212a508ef564d329b8844af..230b9cb51422edeff5b7cbc36d73e036bb4c1eda 100644 (file)
@@ -1,3 +1,9 @@
+Tue Jan 20 23:06:36 1998  Tom Yu  <tlyu@mit.edu>
+
+       * alt_prof.c (kadm5_get_config_params): Add support for Cygnus chpw.
+
+       * admin.h: Add support for Cygnus chpw.
+
 Mon Oct 13 10:48:24 1997  Ezra Peisach  <epeisach@mit.edu>
 
        * alt_prof.c (kadm5_get_config_params): When KADM5_CONFIG_ENCTYPES
index 8ba242ab3162e733d62082c56484b08948b1b36b..597ca0eb779b0e92bc6d70f9f31880d57daf84e0 100644 (file)
@@ -94,7 +94,8 @@ typedef long          kadm5_ret_t;
 #define KADM5_CONFIG_ADMIN_SERVER      0x010000
 #define KADM5_CONFIG_DICT_FILE         0x020000
 #define KADM5_CONFIG_MKEY_FROM_KBD     0x040000
-   
+#define KADM5_CONFIG_KPASSWD_PORT      0x080000
+    
 /*
  * permission bits
  */
@@ -187,6 +188,7 @@ typedef struct _kadm5_config_params {
      char *            realm;
      char *            profile;
      int               kadmind_port;
+     int               kpasswd_port;
 
      char *            admin_server;
 
index 810ad200a3a412a0fa6a8d9d6288b185b443c30c..a9094d9b052df41fd0962934f73c207a2691dd83 100644 (file)
@@ -471,6 +471,23 @@ krb5_error_code kadm5_get_config_params(context, kdcprofile, kdcenv,
         }
     }
     
+    /* Get the value for the kpasswd port */
+    if (! (params.mask & KADM5_CONFIG_KPASSWD_PORT)) {
+       hierarchy[2] = "kpasswd_port";
+       if (params_in->mask & KADM5_CONFIG_KPASSWD_PORT) {
+           params.mask |= KADM5_CONFIG_KPASSWD_PORT;
+           params.kpasswd_port = params_in->kpasswd_port;
+       } else if (aprofile &&
+                  !krb5_aprof_get_int32(aprofile, hierarchy, TRUE,
+                                        &ivalue)) { 
+           params.kpasswd_port = ivalue;
+           params.mask |= KADM5_CONFIG_KPASSWD_PORT;
+       } else {
+           params.kpasswd_port = DEFAULT_KPASSWD_PORT;
+           params.mask |= KADM5_CONFIG_KPASSWD_PORT;
+       }
+    }
+    
     /* Get the value for the master key name */
         hierarchy[2] = "master_key_name";
     if (params_in->mask & KADM5_CONFIG_MKEY_NAME) {