The only caller doesn't pass the password. Remove the argument.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/rpc/virnetsocket.c | 3 +--
src/rpc/virnetsshsession.c | 7 +------
src/rpc/virnetsshsession.h | 3 +--
3 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c
index 8fbc69d51c..b9b7328f87 100644
--- a/src/rpc/virnetsocket.c
+++ b/src/rpc/virnetsocket.c
@@ -954,8 +954,7 @@ virNetSocketNewConnectLibSSH2(const char *host,
} else if (STRCASEEQ(authMethod, "privkey")) {
ret = virNetSSHSessionAuthAddPrivKeyAuth(sess,
username,
- privkey,
- NULL);
+ privkey);
} else if (STRCASEEQ(authMethod, "agent")) {
ret = virNetSSHSessionAuthAddAgentAuth(sess, username);
} else {
diff --git a/src/rpc/virnetsshsession.c b/src/rpc/virnetsshsession.c
index 485318d09b..08f246be61 100644
--- a/src/rpc/virnetsshsession.c
+++ b/src/rpc/virnetsshsession.c
@@ -1056,13 +1056,11 @@ virNetSSHSessionAuthAddAgentAuth(virNetSSHSession *sess,
int
virNetSSHSessionAuthAddPrivKeyAuth(virNetSSHSession *sess,
const char *username,
- const char *keyfile,
- const char *password)
+ const char *keyfile)
{
virNetSSHAuthMethod *auth;
char *user = NULL;
- char *pass = NULL;
char *file = NULL;
if (!username || !keyfile) {
@@ -1076,13 +1074,11 @@ virNetSSHSessionAuthAddPrivKeyAuth(virNetSSHSession *sess,
user = g_strdup(username);
file = g_strdup(keyfile);
- pass = g_strdup(password);
if (!(auth = virNetSSHSessionAuthMethodNew(sess)))
goto error;
auth->username = user;
- auth->password = pass;
auth->filename = file;
auth->method = VIR_NET_SSH_AUTH_PRIVKEY;
@@ -1091,7 +1087,6 @@ virNetSSHSessionAuthAddPrivKeyAuth(virNetSSHSession *sess,
error:
VIR_FREE(user);
- VIR_FREE(pass);
VIR_FREE(file);
virObjectUnlock(sess);
return -1;
diff --git a/src/rpc/virnetsshsession.h b/src/rpc/virnetsshsession.h
index 7a056df37f..8d6c99c547 100644
--- a/src/rpc/virnetsshsession.h
+++ b/src/rpc/virnetsshsession.h
@@ -56,8 +56,7 @@ int virNetSSHSessionAuthAddAgentAuth(virNetSSHSession *sess,
int virNetSSHSessionAuthAddPrivKeyAuth(virNetSSHSession *sess,
const char *username,
- const char *keyfile,
- const char *password);
+ const char *keyfile);
int virNetSSHSessionAuthAddKeyboardAuth(virNetSSHSession *sess,
const char *username,
--
2.38.1