aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGilles Chehade <gilles@poolp.org>2019-11-17 13:14:02 +0100
committerGilles Chehade <gilles@poolp.org>2019-11-17 13:14:02 +0100
commit89f3c1c66d6a65510066a1c1d74bd547e80483d0 (patch)
tree7a8112cf08a3cd6fa180df7506550cb308bc214c
parenttest for strnvis swapped parameters (diff)
downloadOpenSMTPD-89f3c1c66d6a65510066a1c1d74bd547e80483d0.tar.xz
OpenSMTPD-89f3c1c66d6a65510066a1c1d74bd547e80483d0.zip
don't put seed_rng() in compat, just call RAND_status() in smtpd.c
-rw-r--r--openbsd-compat/Makefile.am1
-rw-r--r--smtpd/smtpd.c3
2 files changed, 2 insertions, 2 deletions
diff --git a/openbsd-compat/Makefile.am b/openbsd-compat/Makefile.am
index c4be840c..7dcb8952 100644
--- a/openbsd-compat/Makefile.am
+++ b/openbsd-compat/Makefile.am
@@ -5,7 +5,6 @@ libopenbsd_compat_a_SOURCES = empty.c
libopenbsd_compat_a_SOURCES += arc4random.c
libopenbsd_compat_a_SOURCES += base64.c
libopenbsd_compat_a_SOURCES += bsd-misc.c
-libopenbsd_compat_a_SOURCES += entropy.c
libopenbsd_compat_a_SOURCES += event_asr_run.c
diff --git a/smtpd/smtpd.c b/smtpd/smtpd.c
index 4b88c3df..38ab265f 100644
--- a/smtpd/smtpd.c
+++ b/smtpd/smtpd.c
@@ -666,7 +666,8 @@ main(int argc, char *argv[])
if (parse_config(conf, conffile, opts))
exit(1);
- seed_rng();
+ if (RAND_status() != 1)
+ errx(1, "PRNG is not seeded");
if (strlcpy(env->sc_conffile, conffile, PATH_MAX)
>= PATH_MAX)