File ntp-4.2.0a-seed_file.patch of Package ntp

--- ntpd/ntp_crypto.c
+++ ntpd/ntp_crypto.c
@@ -3904,10 +3904,15 @@
 		exit (-1);
 	}
 	if ((bytes = RAND_load_file(rand_file, -1)) == 0) {
+		int m_buff = 0;
+		RAND_write_file(rand_file);
+
 		msyslog(LOG_ERR,
-		    "crypto_setup: random seed file %s not found\n",
+		    "crypto_setup: random seed file %s not found - created one\n",
 		    rand_file);
-		exit (-1);
+		crypto_setup();
+		return ( 0 );
+//		exit (-1);
 	}
 	get_systime(&seed);
 	RAND_seed(&seed, sizeof(l_fp));
openSUSE Build Service is sponsored by