diff --git a/src/bind.c b/src/bind.c index eee0eec9..e13d918d 100644 --- a/src/bind.c +++ b/src/bind.c @@ -218,28 +218,12 @@ static int ssh_bind_import_keys(ssh_bind sshbind) { return SSH_OK; } -int ssh_bind_listen(ssh_bind sshbind) { +int ssh_bind_listen(ssh_bind sshbind) +{ const char *host = NULL; socket_t fd; int rc; - /* Apply global bind configurations, if it hasn't been applied before */ - rc = ssh_bind_options_parse_config(sshbind, NULL); - if (rc != 0) { - ssh_set_error(sshbind, SSH_FATAL,"Could not parse global config"); - return SSH_ERROR; - } - - /* Set default hostkey paths if no hostkey was found before */ - if (sshbind->ecdsakey == NULL && - sshbind->rsakey == NULL && - sshbind->ed25519key == NULL) { - - sshbind->ecdsakey = strdup("/etc/ssh/ssh_host_ecdsa_key"); - sshbind->rsakey = strdup("/etc/ssh/ssh_host_rsa_key"); - sshbind->ed25519key = strdup("/etc/ssh/ssh_host_ed25519_key"); - } - /* Apply global bind configurations, if it hasn't been applied before */ rc = ssh_bind_options_parse_config(sshbind, NULL); if (rc != 0) { @@ -289,10 +273,10 @@ int ssh_bind_listen(ssh_bind sshbind) { } sshbind->bindfd = fd; - } else { - SSH_LOG(SSH_LOG_DEBUG, "Using app-provided bind socket"); - } - return 0; + } else { + SSH_LOG(SSH_LOG_DEBUG, "Using app-provided bind socket"); + } + return 0; } int ssh_bind_set_callbacks(ssh_bind sshbind, ssh_bind_callbacks callbacks, void *userdata)