aboutsummaryrefslogtreecommitdiff
path: root/libssh/auth.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2009-12-26 22:12:08 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2009-12-26 22:12:08 +0100
commit77baa2df156e60b8516820049eb34937490d765b (patch)
tree962e1380f2b9c7f1d4f7ec774d6bdee6e9e0c0a3 /libssh/auth.c
parenta229cb46763cb4a1be1a0e3b6d93e6e0d106561d (diff)
downloadlibssh-77baa2df156e60b8516820049eb34937490d765b.tar.gz
libssh-77baa2df156e60b8516820049eb34937490d765b.tar.xz
libssh-77baa2df156e60b8516820049eb34937490d765b.zip
Fix a few log strings and levels in auth.c
Diffstat (limited to 'libssh/auth.c')
-rw-r--r--libssh/auth.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/libssh/auth.c b/libssh/auth.c
index a6e5fad..48bd6ea 100644
--- a/libssh/auth.c
+++ b/libssh/auth.c
@@ -919,13 +919,13 @@ int ssh_userauth_autopubkey(ssh_session session, const char *passphrase) {
return rc;
} else if (rc != SSH_AUTH_SUCCESS) {
- ssh_log(session, SSH_LOG_PACKET, "Public key refused by server\n");
+ ssh_log(session, SSH_LOG_PROTOCOL, "Public key refused by server");
SAFE_FREE(id);
SAFE_FREE(privkeyfile);
publickey_free(publickey);
continue;
}
- ssh_log(session, SSH_LOG_RARE, "Public key accepted");
+ ssh_log(session, SSH_LOG_PROTOCOL, "Public key accepted");
/* pubkey accepted by server ! */
rc = ssh_userauth_agent_pubkey(session, NULL, publickey);
if (rc == SSH_AUTH_ERROR) {
@@ -937,15 +937,15 @@ int ssh_userauth_autopubkey(ssh_session session, const char *passphrase) {
return rc;
} else if (rc != SSH_AUTH_SUCCESS) {
ssh_log(session, SSH_LOG_RARE,
- "Server accepted public key but refused the signature\n"
- "It might be a bug of libssh\n");
+ "Server accepted public key but refused the signature ;"
+ " It might be a bug of libssh");
SAFE_FREE(id);
SAFE_FREE(privkeyfile);
publickey_free(publickey);
continue;
}
/* auth success */
- ssh_log(session, SSH_LOG_RARE, "Authentication using %s success\n",
+ ssh_log(session, SSH_LOG_PROTOCOL, "Authentication using %s success",
privkeyfile);
SAFE_FREE(id);
SAFE_FREE(privkeyfile);
@@ -964,8 +964,8 @@ int ssh_userauth_autopubkey(ssh_session session, const char *passphrase) {
size = ARRAY_SIZE(keytab);
if (session->identity) {
- ssh_log(session, SSH_LOG_RARE,
- "Trying identity file %s\n", session->identity);
+ ssh_log(session, SSH_LOG_PROTOCOL,
+ "Trying identity file %s", session->identity);
id = malloc(strlen(session->identity) + 1 + 4);
if (id == NULL) {
@@ -1001,7 +1001,7 @@ int ssh_userauth_autopubkey(ssh_session session, const char *passphrase) {
return rc;
} else {
if (rc != SSH_AUTH_SUCCESS){
- ssh_log(session, SSH_LOG_RARE, "Publickey refused by server");
+ ssh_log(session, SSH_LOG_PROTOCOL, "Publickey refused by server");
string_free(pubkey);
pubkey = NULL;
SAFE_FREE(privkeyfile);
@@ -1011,10 +1011,10 @@ int ssh_userauth_autopubkey(ssh_session session, const char *passphrase) {
}
/* Public key accepted by server! */
- ssh_log(session, SSH_LOG_RARE, "Trying to read privatekey %s", privkeyfile);
+ ssh_log(session, SSH_LOG_PROTOCOL, "Trying to read privatekey %s", privkeyfile);
privkey = privatekey_from_file(session, privkeyfile, type, passphrase);
if (privkey == NULL) {
- ssh_log(session, SSH_LOG_FUNCTIONS,
+ ssh_log(session, SSH_LOG_RARE,
"Reading private key %s failed (bad passphrase ?)",
privkeyfile);
string_free(pubkey);
@@ -1038,7 +1038,7 @@ int ssh_userauth_autopubkey(ssh_session session, const char *passphrase) {
return rc;
} else {
if (rc != SSH_AUTH_SUCCESS){
- ssh_log(session, SSH_LOG_FUNCTIONS,
+ ssh_log(session, SSH_LOG_RARE,
"The server accepted the public key but refused the signature");
string_free(pubkey);
pubkey = NULL;
@@ -1050,7 +1050,7 @@ int ssh_userauth_autopubkey(ssh_session session, const char *passphrase) {
}
/* auth success */
- ssh_log(session, SSH_LOG_RARE,
+ ssh_log(session, SSH_LOG_PROTOCOL,
"Successfully authenticated using %s", privkeyfile);
string_free(pubkey);
privatekey_free(privkey);
@@ -1065,7 +1065,7 @@ int ssh_userauth_autopubkey(ssh_session session, const char *passphrase) {
return SSH_AUTH_SUCCESS;
}
/* at this point, pubkey is NULL and so is privkeyfile */
- ssh_log(session, SSH_LOG_FUNCTIONS,
+ ssh_log(session, SSH_LOG_PROTOCOL,
"Tried every public key, none matched");
ssh_set_error(session,SSH_NO_ERROR,"No public key matched");
if (id) {