+Tue Oct 3 23:10:57 1995 Theodore Y. Ts'o <tytso@dcl>
+
+ * cpw.c (enter_rnd_key, enter_pwd_key):
+ * kdb5_edit.c (kdb5_edit_Init): Use the kdc.conf file to determine
+ the default list of keysalt tuples to be used. This is
+ stored in std_ks_tuple, and is used by cpw.c for random
+ keys and when a list of keysalts is not specified.
+
Mon Sep 18 03:59:47 1995 Ezra Peisach <epeisach@kangaroo.mit.edu>
* kdb5_edit.c (show_principal): Show key version and last password
extern krb5_boolean dbactive;
extern FILE *scriptfile;
-/*
- * XXX This realy should be configured from kdc.conf
- */
-static krb5_key_salt_tuple ks_tuple_rnd_def[] =
- {{ ENCTYPE_DES_CBC_CRC, 0 },
- { ENCTYPE_DES_CBC_MD5, 0 },
- { ENCTYPE_DES_CBC_CRC, KRB5_KDB_SALTTYPE_V4},
- { ENCTYPE_DES_CBC_MD5, KRB5_KDB_SALTTYPE_V4}};
-static int ks_tuple_rnd_def_count = 4;
-
static void
enter_rnd_key(argc, argv, entry)
int argc;
int nprincs = 1;
if ((retval = krb5_dbe_crk(edit_context, &master_encblock,
- ks_tuple_rnd_def,
- ks_tuple_rnd_def_count, entry))) {
+ std_ks_tuple,
+ std_ks_tuple_count, entry))) {
com_err(argv[0], retval, "while generating random key");
krb5_db_free_principal(edit_context, entry, nprincs);
exit_status++;
}
}
-static krb5_key_salt_tuple ks_tuple_default[] = {{ ENCTYPE_DES_CBC_CRC, 0 }};
-static int ks_tuple_count_default = 1;
-
void
enter_pwd_key(cmdname, princ, ks_tuple, ks_tuple_count, entry)
char * cmdname;
}
if (ks_tuple_count == 0) {
- ks_tuple_count = ks_tuple_count_default;
- ks_tuple = ks_tuple_default;
+ ks_tuple_count = std_ks_tuple_count;
+ ks_tuple = std_ks_tuple;
}
if ((retval = krb5_dbe_cpw(edit_context, &master_encblock, ks_tuple,
ks_tuple_count, password, entry))) {
0
};
+krb5_key_salt_tuple ks_tuple_default[] = {{ ENCTYPE_DES_CBC_CRC, 0 }};
+
+krb5_key_salt_tuple *std_ks_tuple = ks_tuple_default;
+int std_ks_tuple_count = 1;
+
char *Err_no_master_msg = "Master key not entered!\n";
char *Err_no_database = "Database not currently opened!\n";
char *current_dbname = NULL;
-
/*
* XXX Ick, ick, ick. These global variables shouldn't be global....
*/
if (rparams->realm_flags_valid)
mblock.flags = rparams->realm_flags;
+ /* Get the value of the supported key/salt pairs */
+ if (rparams->realm_num_keysalts) {
+ std_ks_tuple_count = rparams->realm_num_keysalts;
+ std_ks_tuple = rparams->realm_keysalts;
+ rparams->realm_num_keysalts = 0;
+ rparams->realm_keysalts = (krb5_key_salt_tuple *) NULL;
+ }
+
+
krb5_free_realm_params(edit_context, rparams);
}