File ntp-4.2.6p2-seed_file.patch of Package ntp

diff --git a/ntpd/ntp_crypto.c b/ntpd/ntp_crypto.c
index 2f82c4c..061218e 100644
--- a/ntpd/ntp_crypto.c
+++ b/ntpd/ntp_crypto.c
@@ -3930,10 +3930,12 @@ crypto_setup(void)
 			randfile = rand_file;
 
 		if ((bytes = RAND_load_file(randfile, -1)) == 0) {
+			RAND_write_file(rand_file);
 			msyslog(LOG_ERR,
-			    "crypto_setup: random seed file %s missing",
+			    "crypto_setup: random seed file %s missing - created one\n",
 			    randfile);
-			exit (-1);
+			crypto_setup();
+			return;
 		}
 		get_systime(&seed);
 		RAND_seed(&seed, sizeof(l_fp));
openSUSE Build Service is sponsored by