[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 0/3] Allow use of ssh_bind_accept_fd without ssh_bind_listen
[Thread Prev] | [Thread Next]
- Subject: [PATCH v2 0/3] Allow use of ssh_bind_accept_fd without ssh_bind_listen
- From: Alan Dunn <amdunn@xxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Tue, 21 Jan 2014 08:19:29 -0600
- To: libssh@xxxxxxxxxx
- Cc: Alan Dunn <amdunn@xxxxxxxxx>
Hi folks, I noticed that ssh_bind_accept_fd doesn't appear to work on its own for accepting fds that have come through an accept on a listening socket. It seems that server private keys are read in from their file locations in ssh_bind_listen, so that if ssh_bind_accept_fd is used instead without the intent to ever use ssh_bind_listen, then a subsequent ssh_handle_key_exchange will always return an error (server_set_kex in server.c wil return -1). This patch allows keys to be set up in ssh_bind_accept_fd or ssh_bind_listen, whichever is called first. Then ssh_bind_accept_fd can be called by itself. v2: - Style changes as suggested by Andreas Alan Dunn (3): Separate out key import functionality from ssh_bind_listen Import keys during ssh_bind_accept_fd Test change to ssh_bind_accept_fd src/bind.c | 47 +++++++++---- tests/test_ssh_bind_accept_fd.c | 139 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 173 insertions(+), 13 deletions(-) create mode 100644 tests/test_ssh_bind_accept_fd.c -- 1.7.9.5
[PATCH v2 1/3] Separate out key import functionality from ssh_bind_listen | Alan Dunn <amdunn@xxxxxxxxx> |
[PATCH v2 2/3] Import keys during ssh_bind_accept_fd | Alan Dunn <amdunn@xxxxxxxxx> |
[PATCH v2 3/3] Test change to ssh_bind_accept_fd | Alan Dunn <amdunn@xxxxxxxxx> |
Re: [PATCH v2 0/3] Allow use of ssh_bind_accept_fd without ssh_bind_listen | Andreas Schneider <asn@xxxxxxxxxxxxxx> |