]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap/pop3: Don't open /dev/urandom at startup. Nothing needs it.
authorTimo Sirainen <tss@iki.fi>
Fri, 11 Jul 2008 22:40:33 +0000 (01:40 +0300)
committerTimo Sirainen <tss@iki.fi>
Fri, 11 Jul 2008 22:40:33 +0000 (01:40 +0300)
--HG--
branch : HEAD

src/imap/main.c
src/pop3/main.c

index 1bf0a5831cda19261cbc474153fe5fc1e347fc93..b3a4599136292966b3f34f2f4b3985a2b40215e6 100644 (file)
@@ -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);
index 8ab66d3faa6bcc4d3041de7d5f1438dce49dca6d..3f50a0bc8a986be43983a71501849c4f03861a09 100644 (file)
@@ -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();