mirror of
https://github.com/clearml/dropbear
synced 2025-01-31 10:57:01 +00:00
Load hostkeys before daemon(), since daemon()'s chdir("/") will prevent us
finding keys in $PWD. --HG-- extra : convert_revision : 02c413252c90e9de8e03d91e9939dde3029f5c0a
This commit is contained in:
parent
d5897b9a5d
commit
692d737a82
@ -123,6 +123,10 @@ void main_noinetd() {
|
|||||||
int childsock;
|
int childsock;
|
||||||
int childpipe[2];
|
int childpipe[2];
|
||||||
|
|
||||||
|
// Note: commonsetup() must happen before we daemon()ise. Otherwise
|
||||||
|
// daemon() will chdir("/"), and we won't be able to find local-dir hostkeys.
|
||||||
|
commonsetup();
|
||||||
|
|
||||||
/* fork */
|
/* fork */
|
||||||
if (svr_opts.forkbg) {
|
if (svr_opts.forkbg) {
|
||||||
int closefds = 0;
|
int closefds = 0;
|
||||||
@ -136,8 +140,6 @@ void main_noinetd() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
commonsetup();
|
|
||||||
|
|
||||||
/* should be done after syslog is working */
|
/* should be done after syslog is working */
|
||||||
if (svr_opts.forkbg) {
|
if (svr_opts.forkbg) {
|
||||||
dropbear_log(LOG_INFO, "Running in background");
|
dropbear_log(LOG_INFO, "Running in background");
|
||||||
|
Loading…
Reference in New Issue
Block a user