diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2002-12-23 02:44:36 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2002-12-23 02:44:36 +0000 |
commit | 1d568f9fce07fd6ea1f6d9f84cd204a17264e28e (patch) | |
tree | 2084cadaa0ce05bde8cbfed050eb35c3cd3cb3d2 /sshconnect2.c | |
parent | faa1ea8c20f6f234e14b192705ddaeb1bc67f7de (diff) |
- markus@cvs.openbsd.org 2002/12/13 10:03:15
[channels.c misc.c sshconnect2.c]
cleanup debug messages, more useful information for the client user.
Diffstat (limited to 'sshconnect2.c')
-rw-r--r-- | sshconnect2.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/sshconnect2.c b/sshconnect2.c index 755be5cca..5859199d7 100644 --- a/sshconnect2.c +++ b/sshconnect2.c | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: sshconnect2.c,v 1.108 2002/11/21 22:45:31 markus Exp $"); | 26 | RCSID("$OpenBSD: sshconnect2.c,v 1.109 2002/12/13 10:03:15 markus Exp $"); |
27 | 27 | ||
28 | #include "ssh.h" | 28 | #include "ssh.h" |
29 | #include "ssh2.h" | 29 | #include "ssh2.h" |
@@ -236,7 +236,7 @@ ssh_userauth2(const char *local_user, const char *server_user, char *host, | |||
236 | debug2("service_accept: %s", reply); | 236 | debug2("service_accept: %s", reply); |
237 | xfree(reply); | 237 | xfree(reply); |
238 | } else { | 238 | } else { |
239 | debug("buggy server: service_accept w/o service"); | 239 | debug2("buggy server: service_accept w/o service"); |
240 | } | 240 | } |
241 | packet_check_eom(); | 241 | packet_check_eom(); |
242 | debug("SSH2_MSG_SERVICE_ACCEPT received"); | 242 | debug("SSH2_MSG_SERVICE_ACCEPT received"); |
@@ -271,7 +271,7 @@ ssh_userauth2(const char *local_user, const char *server_user, char *host, | |||
271 | if (authctxt.agent != NULL) | 271 | if (authctxt.agent != NULL) |
272 | ssh_close_authentication_connection(authctxt.agent); | 272 | ssh_close_authentication_connection(authctxt.agent); |
273 | 273 | ||
274 | debug("ssh-userauth2 successful: method %s", authctxt.method->name); | 274 | debug("Authentication succeeded (%s).", authctxt.method->name); |
275 | } | 275 | } |
276 | void | 276 | void |
277 | userauth(Authctxt *authctxt, char *authlist) | 277 | userauth(Authctxt *authctxt, char *authlist) |
@@ -345,7 +345,7 @@ input_userauth_failure(int type, u_int32_t seq, void *ctxt) | |||
345 | 345 | ||
346 | if (partial != 0) | 346 | if (partial != 0) |
347 | log("Authenticated with partial success."); | 347 | log("Authenticated with partial success."); |
348 | debug("authentications that can continue: %s", authlist); | 348 | debug("Authentications that can continue: %s", authlist); |
349 | 349 | ||
350 | clear_auth_state(authctxt); | 350 | clear_auth_state(authctxt); |
351 | userauth(authctxt, authlist); | 351 | userauth(authctxt, authlist); |
@@ -377,7 +377,7 @@ input_userauth_pk_ok(int type, u_int32_t seq, void *ctxt) | |||
377 | } | 377 | } |
378 | packet_check_eom(); | 378 | packet_check_eom(); |
379 | 379 | ||
380 | debug("input_userauth_pk_ok: pkalg %s blen %u lastkey %p hint %d", | 380 | debug("Server accepts key: pkalg %s blen %u lastkey %p hint %d", |
381 | pkalg, blen, authctxt->last_key, authctxt->last_key_hint); | 381 | pkalg, blen, authctxt->last_key, authctxt->last_key_hint); |
382 | 382 | ||
383 | do { | 383 | do { |
@@ -762,7 +762,7 @@ userauth_pubkey_agent(Authctxt *authctxt) | |||
762 | if (k == NULL) { | 762 | if (k == NULL) { |
763 | debug2("userauth_pubkey_agent: no more keys"); | 763 | debug2("userauth_pubkey_agent: no more keys"); |
764 | } else { | 764 | } else { |
765 | debug("userauth_pubkey_agent: testing agent key %s", comment); | 765 | debug("Offering agent key: %s", comment); |
766 | xfree(comment); | 766 | xfree(comment); |
767 | ret = send_pubkey_test(authctxt, k, agent_sign_cb, -1); | 767 | ret = send_pubkey_test(authctxt, k, agent_sign_cb, -1); |
768 | if (ret == 0) | 768 | if (ret == 0) |
@@ -790,7 +790,7 @@ userauth_pubkey(Authctxt *authctxt) | |||
790 | key = options.identity_keys[idx]; | 790 | key = options.identity_keys[idx]; |
791 | filename = options.identity_files[idx]; | 791 | filename = options.identity_files[idx]; |
792 | if (key == NULL) { | 792 | if (key == NULL) { |
793 | debug("try privkey: %s", filename); | 793 | debug("Trying private key: %s", filename); |
794 | key = load_identity_file(filename); | 794 | key = load_identity_file(filename); |
795 | if (key != NULL) { | 795 | if (key != NULL) { |
796 | sent = sign_and_send_pubkey(authctxt, key, | 796 | sent = sign_and_send_pubkey(authctxt, key, |
@@ -798,7 +798,7 @@ userauth_pubkey(Authctxt *authctxt) | |||
798 | key_free(key); | 798 | key_free(key); |
799 | } | 799 | } |
800 | } else if (key->type != KEY_RSA1) { | 800 | } else if (key->type != KEY_RSA1) { |
801 | debug("try pubkey: %s", filename); | 801 | debug("Offering public key: %s", filename); |
802 | sent = send_pubkey_test(authctxt, key, | 802 | sent = send_pubkey_test(authctxt, key, |
803 | identity_sign_cb, idx); | 803 | identity_sign_cb, idx); |
804 | } | 804 | } |
@@ -904,7 +904,7 @@ ssh_keysign(Key *key, u_char **sigp, u_int *lenp, | |||
904 | pid_t pid; | 904 | pid_t pid; |
905 | int to[2], from[2], status, version = 2; | 905 | int to[2], from[2], status, version = 2; |
906 | 906 | ||
907 | debug("ssh_keysign called"); | 907 | debug2("ssh_keysign called"); |
908 | 908 | ||
909 | if (stat(_PATH_SSH_KEY_SIGN, &st) < 0) { | 909 | if (stat(_PATH_SSH_KEY_SIGN, &st) < 0) { |
910 | error("ssh_keysign: no installed: %s", strerror(errno)); | 910 | error("ssh_keysign: no installed: %s", strerror(errno)); |
@@ -993,7 +993,7 @@ userauth_hostbased(Authctxt *authctxt) | |||
993 | } | 993 | } |
994 | } | 994 | } |
995 | if (!found) { | 995 | if (!found) { |
996 | debug("userauth_hostbased: no more client hostkeys"); | 996 | debug("No more client hostkeys for hostbased authentication."); |
997 | return 0; | 997 | return 0; |
998 | } | 998 | } |
999 | if (key_to_blob(private, &blob, &blen) == 0) { | 999 | if (key_to_blob(private, &blob, &blen) == 0) { |
@@ -1107,7 +1107,6 @@ static char *preferred = NULL; | |||
1107 | static Authmethod * | 1107 | static Authmethod * |
1108 | authmethod_get(char *authlist) | 1108 | authmethod_get(char *authlist) |
1109 | { | 1109 | { |
1110 | |||
1111 | char *name = NULL; | 1110 | char *name = NULL; |
1112 | u_int next; | 1111 | u_int next; |
1113 | 1112 | ||
@@ -1128,7 +1127,7 @@ authmethod_get(char *authlist) | |||
1128 | 1127 | ||
1129 | for (;;) { | 1128 | for (;;) { |
1130 | if ((name = match_list(preferred, supported, &next)) == NULL) { | 1129 | if ((name = match_list(preferred, supported, &next)) == NULL) { |
1131 | debug("no more auth methods to try"); | 1130 | debug("No more authentication methods to try."); |
1132 | current = NULL; | 1131 | current = NULL; |
1133 | return NULL; | 1132 | return NULL; |
1134 | } | 1133 | } |
@@ -1138,7 +1137,7 @@ authmethod_get(char *authlist) | |||
1138 | if ((current = authmethod_lookup(name)) != NULL && | 1137 | if ((current = authmethod_lookup(name)) != NULL && |
1139 | authmethod_is_enabled(current)) { | 1138 | authmethod_is_enabled(current)) { |
1140 | debug3("authmethod_is_enabled %s", name); | 1139 | debug3("authmethod_is_enabled %s", name); |
1141 | debug("next auth method to try is %s", name); | 1140 | debug("Next authentication method: %s", name); |
1142 | return current; | 1141 | return current; |
1143 | } | 1142 | } |
1144 | } | 1143 | } |