aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-07-17 20:57:42 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-07-17 20:57:42 +0000
commit6ee8f6f8af9159cff8c68fddcca20fb618ffddf0 (patch)
tree286cca4ba0d04908a924afee61c6afe0d911c115
parentAdded warning when using chroot without specifying user and group. (diff)
downloadopenvpn-6ee8f6f8af9159cff8c68fddcca20fb618ffddf0.tar.xz
Call prng_init after fork in background process
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
-rw-r--r--ps.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ps.c b/ps.c
index b5215fc..21b3499 100644
--- 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]);