sshdump: remove redundant ssh_userauth_agent call
Since the original introduction of sshdump, ssh_userauth_publickey_auto was already in use which would try the ssh-agent on non-Windows platforms. There is no need to explicitly call ssh_userauth_agent which is dead code anyway due to a typo in the macro name. Change-Id: I976ec3da9e35ade63983ba5ca01163714d466912 Reviewed-on: https://code.wireshark.org/review/37476 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
This commit is contained in:
parent
78bcdca8d3
commit
4015992a89
|
@ -18,9 +18,6 @@ if(LIBSSH_FOUND)
|
|||
set(CMAKE_REQUIRED_LIBRARIES ${LIBSSH_LIBRARIES})
|
||||
check_function_exists(ssh_userauth_agent LIBSSH_USERAUTH_AGENT_FOUND)
|
||||
cmake_pop_check_state()
|
||||
if(LIBSSH_USERAUTH_AGENT_FOUND)
|
||||
set(HAVE_SSH_USERAUTH_AGENT 1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Ensure "run/extcap" exists
|
||||
|
|
|
@ -97,16 +97,6 @@ ssh_session create_ssh_connection(const ssh_params_t* ssh_params, char** err_inf
|
|||
goto failure;
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBSSH_USERAUTH_AGENT
|
||||
g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_INFO, "Connecting using ssh-agent...");
|
||||
/* Try to authenticate using ssh agent */
|
||||
if (ssh_userauth_agent(sshs, NULL) == SSH_AUTH_SUCCESS) {
|
||||
g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_INFO, "done");
|
||||
return sshs;
|
||||
}
|
||||
g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_INFO, "failed");
|
||||
#endif
|
||||
|
||||
/* If a public key path has been provided, try to authenticate using it */
|
||||
if (ssh_params->sshkey_path) {
|
||||
ssh_key pkey = ssh_key_new();
|
||||
|
|
Loading…
Reference in New Issue