diff options
author | Damien Miller <djm@mindrot.org> | 2018-11-23 00:40:06 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2018-11-23 00:42:05 +0100 |
commit | 42c5ec4b97b6a1bae70f323952d0646af16ce710 (patch) | |
tree | 6d85f7daebb7241b80bc91126f433dca62e850e8 /sftp-server-main.c | |
parent | upstream: Output info on SIGUSR1 as well as (diff) | |
download | openssh-42c5ec4b97b6a1bae70f323952d0646af16ce710.tar.xz openssh-42c5ec4b97b6a1bae70f323952d0646af16ce710.zip |
refactor libcrypto initialisation
Don't call OpenSSL_add_all_algorithms() unless OpenSSL actually
supports it.
Move all libcrypto initialisation to a single function, and call that
from seed_rng() that is called early in each tool's main().
Prompted by patch from Rosen Penev
Diffstat (limited to 'sftp-server-main.c')
-rw-r--r-- | sftp-server-main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sftp-server-main.c b/sftp-server-main.c index c6ccd623e..6230d897d 100644 --- a/sftp-server-main.c +++ b/sftp-server-main.c @@ -43,6 +43,8 @@ main(int argc, char **argv) /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */ sanitise_stdfd(); + seed_rng(); + if ((user_pw = getpwuid(getuid())) == NULL) { fprintf(stderr, "No user found for uid %lu\n", (u_long)getuid()); |