]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Call prng_init after fork in background process
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Thu, 17 Jul 2008 20:57:42 +0000 (20:57 +0000)
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Thu, 17 Jul 2008 20:57:42 +0000 (20:57 +0000)
created by port_share_open, so as to ensure
a newly seeded PRNG sequence.  This is strictly
defensive programming since port_share_proxy
currently does not use the PRNG.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3070 e7ae566f-a301-0410-adde-c780ea21d3b5

ps.c

diff --git a/ps.c b/ps.c
index b5215fcad0053468b1ab902fbbf1ddb0451b2f1d..21b34993fb7a4dc061c8e28713b5093de4be2946 100644 (file)
--- a/ps.c
+++ b/ps.c
@@ -29,6 +29,7 @@
 #include "event.h"
 #include "socket.h"
 #include "fdmisc.h"
+#include "crypto.h"
 #include "ps.h"
 
 #include "memdbg.h"
@@ -791,6 +792,9 @@ port_share_open (const char *host, const int port)
       /* no blocking on control channel back to parent */
       set_nonblock (fd[1]);
 
+      /* initialize prng */
+      prng_init ();
+
       /* execute the event loop */
       port_share_proxy (hostaddr, port, fd[1]);