Skip to content

Commit 4015992

Browse files
committed
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 <[email protected]> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <[email protected]> Reviewed-by: Peter Wu <[email protected]>
1 parent 78bcdca commit 4015992

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

extcap/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ if(LIBSSH_FOUND)
1818
set(CMAKE_REQUIRED_LIBRARIES ${LIBSSH_LIBRARIES})
1919
check_function_exists(ssh_userauth_agent LIBSSH_USERAUTH_AGENT_FOUND)
2020
cmake_pop_check_state()
21-
if(LIBSSH_USERAUTH_AGENT_FOUND)
22-
set(HAVE_SSH_USERAUTH_AGENT 1)
23-
endif()
2421
endif()
2522

2623
# Ensure "run/extcap" exists

extcap/ssh-base.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,6 @@ ssh_session create_ssh_connection(const ssh_params_t* ssh_params, char** err_inf
9797
goto failure;
9898
}
9999

100-
#ifdef HAVE_LIBSSH_USERAUTH_AGENT
101-
g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_INFO, "Connecting using ssh-agent...");
102-
/* Try to authenticate using ssh agent */
103-
if (ssh_userauth_agent(sshs, NULL) == SSH_AUTH_SUCCESS) {
104-
g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_INFO, "done");
105-
return sshs;
106-
}
107-
g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_INFO, "failed");
108-
#endif
109-
110100
/* If a public key path has been provided, try to authenticate using it */
111101
if (ssh_params->sshkey_path) {
112102
ssh_key pkey = ssh_key_new();

0 commit comments

Comments
 (0)