The only caller doesn't actually populate it. Remove it to simplify internals. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/rpc/virnetlibsshsession.c | 4 +--- src/rpc/virnetlibsshsession.h | 3 +-- src/rpc/virnetsocket.c | 4 +--- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/rpc/virnetlibsshsession.c b/src/rpc/virnetlibsshsession.c index b1420bea2c..bbc5d54386 100644 --- a/src/rpc/virnetlibsshsession.c +++ b/src/rpc/virnetlibsshsession.c @@ -988,8 +988,7 @@ virNetLibsshSessionAuthAddAgentAuth(virNetLibsshSession *sess) int virNetLibsshSessionAuthAddPrivKeyAuth(virNetLibsshSession *sess, - const char *keyfile, - const char *password) + const char *keyfile) { virNetLibsshAuthMethod *auth; @@ -1006,7 +1005,6 @@ virNetLibsshSessionAuthAddPrivKeyAuth(virNetLibsshSession *sess, return -1; } - auth->password = g_strdup(password); auth->filename = g_strdup(keyfile); auth->method = VIR_NET_LIBSSH_AUTH_PRIVKEY; auth->ssh_flags = SSH_AUTH_METHOD_PUBLICKEY; diff --git a/src/rpc/virnetlibsshsession.h b/src/rpc/virnetlibsshsession.h index c3b5f3e80d..7f94fd15dc 100644 --- a/src/rpc/virnetlibsshsession.h +++ b/src/rpc/virnetlibsshsession.h @@ -46,8 +46,7 @@ int virNetLibsshSessionAuthAddPasswordAuth(virNetLibsshSession *sess, int virNetLibsshSessionAuthAddAgentAuth(virNetLibsshSession *sess); int virNetLibsshSessionAuthAddPrivKeyAuth(virNetLibsshSession *sess, - const char *keyfile, - const char *password); + const char *keyfile); int virNetLibsshSessionAuthAddKeyboardAuth(virNetLibsshSession *sess, int tries); diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c index 8280bda007..8fbc69d51c 100644 --- a/src/rpc/virnetsocket.c +++ b/src/rpc/virnetsocket.c @@ -1080,9 +1080,7 @@ virNetSocketNewConnectLibssh(const char *host, } else if (STRCASEEQ(authMethod, "password")) { ret = virNetLibsshSessionAuthAddPasswordAuth(sess, uri); } else if (STRCASEEQ(authMethod, "privkey")) { - ret = virNetLibsshSessionAuthAddPrivKeyAuth(sess, - privkey, - NULL); + ret = virNetLibsshSessionAuthAddPrivKeyAuth(sess, privkey); } else if (STRCASEEQ(authMethod, "agent")) { ret = virNetLibsshSessionAuthAddAgentAuth(sess); } else { -- 2.38.1