mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-27 15:54:22 +02:00
Defer seed_rng until after closefrom call.
seed_rng will initialize OpenSSL, and some engine providers (eg Intel's QAT) will open descriptors for their own use. bz#3483, patch from joel.d.schuetze at intel.com, ok djm@
This commit is contained in:
parent
dffa644801
commit
cf1a9852d7
4
sshd.c
4
sshd.c
@ -1580,8 +1580,6 @@ main(int ac, char **av)
|
|||||||
/* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
|
/* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
|
||||||
sanitise_stdfd();
|
sanitise_stdfd();
|
||||||
|
|
||||||
seed_rng();
|
|
||||||
|
|
||||||
/* Initialize configuration options to their default values. */
|
/* Initialize configuration options to their default values. */
|
||||||
initialize_server_options(&options);
|
initialize_server_options(&options);
|
||||||
|
|
||||||
@ -1703,6 +1701,8 @@ main(int ac, char **av)
|
|||||||
else
|
else
|
||||||
closefrom(REEXEC_DEVCRYPTO_RESERVED_FD);
|
closefrom(REEXEC_DEVCRYPTO_RESERVED_FD);
|
||||||
|
|
||||||
|
seed_rng();
|
||||||
|
|
||||||
/* If requested, redirect the logs to the specified logfile. */
|
/* If requested, redirect the logs to the specified logfile. */
|
||||||
if (logfile != NULL)
|
if (logfile != NULL)
|
||||||
log_redirect_stderr_to(logfile);
|
log_redirect_stderr_to(logfile);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user