From d988c6c1055a553dfa90bee8acc3df910027bb0a Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sat, 12 Jul 2008 01:40:33 +0300 Subject: [PATCH] imap/pop3: Don't open /dev/urandom at startup. Nothing needs it. --HG-- branch : HEAD --- src/imap/main.c | 6 ------ src/pop3/main.c | 6 ------ 2 files changed, 12 deletions(-) diff --git a/src/imap/main.c b/src/imap/main.c index 1bf0a5831c..b3a4599136 100644 --- a/src/imap/main.c +++ b/src/imap/main.c @@ -11,7 +11,6 @@ #include "restrict-access.h" #include "fd-close-on-exec.h" #include "process-title.h" -#include "randgen.h" #include "module-dir.h" #include "dict-client.h" #include "mail-storage.h" @@ -145,10 +144,6 @@ static void drop_privileges(void) /* Log file or syslog opening probably requires roots */ open_logfile(); - /* Most likely needed. Have to open /dev/urandom before possible - chrooting. */ - random_init(); - /* Load the plugins before chrooting. Their init() is called later. */ if (getenv("MAIL_PLUGINS") != NULL) { const char *plugin_dir = getenv("MAIL_PLUGIN_DIR"); @@ -281,7 +276,6 @@ static void main_deinit(void) commands_deinit(); mail_storage_deinit(); dict_driver_unregister(&dict_driver_client); - random_deinit(); pool_unref(&namespace_pool); str_free(&capability_string); diff --git a/src/pop3/main.c b/src/pop3/main.c index 8ab66d3faa..3f50a0bc8a 100644 --- a/src/pop3/main.c +++ b/src/pop3/main.c @@ -11,7 +11,6 @@ #include "buffer.h" #include "istream.h" #include "process-title.h" -#include "randgen.h" #include "module-dir.h" #include "var-expand.h" #include "dict-client.h" @@ -166,10 +165,6 @@ static void drop_privileges(void) /* Log file or syslog opening probably requires roots */ open_logfile(); - /* Most likely needed. Have to open /dev/urandom before possible - chrooting. */ - random_init(); - /* Load the plugins before chrooting. Their init() is called later. */ if (getenv("MAIL_PLUGINS") != NULL) { const char *plugin_dir = getenv("MAIL_PLUGIN_DIR"); @@ -267,7 +262,6 @@ static void main_deinit(void) module_dir_unload(&modules); mail_storage_deinit(); dict_driver_unregister(&dict_driver_client); - random_deinit(); lib_signals_deinit(); closelog(); -- 2.47.3