summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-06-06 20:02:33 +0000
committerNick Mathewson <nickm@torproject.org>2005-06-06 20:02:33 +0000
commitfc40f974c2987e42a6a814fd2eaf0e002e020c18 (patch)
tree50f2280be23d06194ee51c1de00510d668e47031 /src
parent5420aed38ed6fd8e735a5be839174e16faeef9d1 (diff)
downloadtor-fc40f974c2987e42a6a814fd2eaf0e002e020c18.tar.gz
tor-fc40f974c2987e42a6a814fd2eaf0e002e020c18.zip
When RNG seeding fails, die. Backport candidate
svn:r4319
Diffstat (limited to 'src')
-rw-r--r--src/or/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/main.c b/src/or/main.c
index d89dc2b0c2..f23cfa4f87 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -1230,7 +1230,10 @@ static int tor_init(int argc, char *argv[]) {
handle_signals(1);
crypto_global_init();
- crypto_seed_rng();
+ if (crypto_seed_rng()) {
+ log_fn(LOG_ERR, "Unable to seed random number generator. Exiting.");
+ return -1;
+ }
return 0;
}