version 1.288, 2018/10/11 03:48:04 |
version 1.289, 2018/11/16 02:46:20 |
|
|
|
|
/* setup authentication context */ |
/* setup authentication context */ |
memset(&authctxt, 0, sizeof(authctxt)); |
memset(&authctxt, 0, sizeof(authctxt)); |
pubkey_prepare(&authctxt); |
|
authctxt.server_user = server_user; |
authctxt.server_user = server_user; |
authctxt.local_user = local_user; |
authctxt.local_user = local_user; |
authctxt.host = host; |
authctxt.host = host; |
|
|
authctxt.active_ktype = authctxt.oktypes = authctxt.ktypes = NULL; |
authctxt.active_ktype = authctxt.oktypes = authctxt.ktypes = NULL; |
authctxt.info_req_seen = 0; |
authctxt.info_req_seen = 0; |
authctxt.agent_fd = -1; |
authctxt.agent_fd = -1; |
|
pubkey_prepare(&authctxt); |
if (authctxt.method == NULL) |
if (authctxt.method == NULL) |
fatal("ssh_userauth2: internal error: cannot send userauth none request"); |
fatal("ssh_userauth2: internal error: cannot send userauth none request"); |
|
|
|
|
{ |
{ |
Identity *id; |
Identity *id; |
|
|
if (authctxt->agent_fd != -1) |
if (authctxt->agent_fd != -1) { |
ssh_close_authentication_socket(authctxt->agent_fd); |
ssh_close_authentication_socket(authctxt->agent_fd); |
|
authctxt->agent_fd = -1; |
|
} |
for (id = TAILQ_FIRST(&authctxt->keys); id; |
for (id = TAILQ_FIRST(&authctxt->keys); id; |
id = TAILQ_FIRST(&authctxt->keys)) { |
id = TAILQ_FIRST(&authctxt->keys)) { |
TAILQ_REMOVE(&authctxt->keys, id, next); |
TAILQ_REMOVE(&authctxt->keys, id, next); |