weak random numbers on startup, to avoid long delays in testing
situations. Use only for testing.
Update testing scripts accordingly.
ticket: 1233
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22434
dc483132-0cff-0310-8789-
dd5450dbe970
krb5_data pwd, seed;
kdb_log_context *log_ctx;
krb5_kvno mkey_kvno;
+ int strong_random = 1;
- while ((optchar = getopt(argc, argv, "s")) != -1) {
+ while ((optchar = getopt(argc, argv, "sW")) != -1) {
switch(optchar) {
case 's':
do_stash++;
exit(1);
}
break;
+ case 'W':
+ strong_random = 0;
+ break;
case '?':
default:
usage();
log_ctx = util_context->kdblog_context;
printf ("Loading random data\n");
- retval = krb5_c_random_os_entropy (util_context, 1, NULL);
+ retval = krb5_c_random_os_entropy (util_context, strong_random, NULL);
if (retval) {
com_err (progname, retval, "Loading random data");
exit_status++; return;
int db_args_size = 0;
char *errmsg;
int i;
+ int strong_random = 1;
kdb_log_context *log_ctx;
usage();
params.kadmind_port = atoi(*argv);
params.mask |= KADM5_CONFIG_KADMIND_PORT;
+ } else if (strcmp(*argv, "-W") == 0) {
+ strong_random = 0;
} else
break;
argc--; argv++;
}
krb5_klog_syslog(LOG_INFO, "Seeding random number generator");
- ret = krb5_c_random_os_entropy(context, 1, NULL);
+ ret = krb5_c_random_os_entropy(context, strong_random, NULL);
if (ret) {
krb5_klog_syslog(LOG_ERR, "Error getting random seed: %s, aborting",
krb5_get_error_message(context, ret));
sofar_s=0
timewait_s=300
+ovadm_args=-W
+
while true; do
rm -f $adm_start_file
}
#exec xterm
verbose "starting $test"
- spawn $KDB5_UTIL -r $REALMNAME create
+ spawn $KDB5_UTIL -r $REALMNAME create -W
expect_after $def_exp_after
expect "Enter KDC database master key:"
# removed when this is fixed
envstack_push
setup_kerberos_env kdc
- spawn $BINSH -c "exec $KADMIND -r $REALMNAME -nofork 2>>$kadmind_lfile"
+ spawn $BINSH -c "exec $KADMIND -r $REALMNAME -W -nofork 2>>$kadmind_lfile"
envstack_pop
set kadmind_pid [exp_pid]
set kadmind_spawn_id $spawn_id