summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-12-23 02:44:36 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-12-23 02:44:36 +0000
commit1d568f9fce07fd6ea1f6d9f84cd204a17264e28e (patch)
tree2084cadaa0ce05bde8cbfed050eb35c3cd3cb3d2
parentfaa1ea8c20f6f234e14b192705ddaeb1bc67f7de (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.
-rw-r--r--ChangeLog5
-rw-r--r--channels.c12
-rw-r--r--misc.c4
-rw-r--r--sshconnect2.c25
4 files changed, 24 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index c75b2890e..335614598 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -65,6 +65,9 @@
65 - markus@cvs.openbsd.org 2002/12/10 19:47:14 65 - markus@cvs.openbsd.org 2002/12/10 19:47:14
66 [packet.c] 66 [packet.c]
67 static 67 static
68 - markus@cvs.openbsd.org 2002/12/13 10:03:15
69 [channels.c misc.c sshconnect2.c]
70 cleanup debug messages, more useful information for the client user.
68 71
6920021205 7220021205
70 - (djm) PERL-free fixpaths from stuge-openssh-unix-dev@cdy.org 73 - (djm) PERL-free fixpaths from stuge-openssh-unix-dev@cdy.org
@@ -900,4 +903,4 @@
900 save auth method before monitor_reset_key_state(); bugzilla bug #284; 903 save auth method before monitor_reset_key_state(); bugzilla bug #284;
901 ok provos@ 904 ok provos@
902 905
903$Id: ChangeLog,v 1.2533 2002/12/23 02:42:52 mouring Exp $ 906$Id: ChangeLog,v 1.2534 2002/12/23 02:44:36 mouring Exp $
diff --git a/channels.c b/channels.c
index 6ff9e2583..1586ea397 100644
--- a/channels.c
+++ b/channels.c
@@ -39,7 +39,7 @@
39 */ 39 */
40 40
41#include "includes.h" 41#include "includes.h"
42RCSID("$OpenBSD: channels.c,v 1.183 2002/09/17 07:47:02 itojun Exp $"); 42RCSID("$OpenBSD: channels.c,v 1.184 2002/12/13 10:03:15 markus Exp $");
43 43
44#include "ssh.h" 44#include "ssh.h"
45#include "ssh1.h" 45#include "ssh1.h"
@@ -578,7 +578,7 @@ channel_send_open(int id)
578 log("channel_send_open: %d: bad id", id); 578 log("channel_send_open: %d: bad id", id);
579 return; 579 return;
580 } 580 }
581 debug("send channel open %d", id); 581 debug2("channel %d: send open", id);
582 packet_start(SSH2_MSG_CHANNEL_OPEN); 582 packet_start(SSH2_MSG_CHANNEL_OPEN);
583 packet_put_cstring(c->ctype); 583 packet_put_cstring(c->ctype);
584 packet_put_int(c->self); 584 packet_put_int(c->self);
@@ -588,15 +588,15 @@ channel_send_open(int id)
588} 588}
589 589
590void 590void
591channel_request_start(int local_id, char *service, int wantconfirm) 591channel_request_start(int id, char *service, int wantconfirm)
592{ 592{
593 Channel *c = channel_lookup(local_id); 593 Channel *c = channel_lookup(id);
594 594
595 if (c == NULL) { 595 if (c == NULL) {
596 log("channel_request_start: %d: unknown channel id", local_id); 596 log("channel_request_start: %d: unknown channel id", id);
597 return; 597 return;
598 } 598 }
599 debug("channel request %d: %s", local_id, service) ; 599 debug("channel %d: request %s", id, service) ;
600 packet_start(SSH2_MSG_CHANNEL_REQUEST); 600 packet_start(SSH2_MSG_CHANNEL_REQUEST);
601 packet_put_int(c->remote_id); 601 packet_put_int(c->remote_id);
602 packet_put_cstring(service); 602 packet_put_cstring(service);
diff --git a/misc.c b/misc.c
index e9fcef6ca..512fb22fb 100644
--- a/misc.c
+++ b/misc.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: misc.c,v 1.19 2002/03/04 17:27:39 stevesk Exp $"); 26RCSID("$OpenBSD: misc.c,v 1.20 2002/12/13 10:03:15 markus Exp $");
27 27
28#include "misc.h" 28#include "misc.h"
29#include "log.h" 29#include "log.h"
@@ -105,7 +105,7 @@ set_nodelay(int fd)
105 return; 105 return;
106 } 106 }
107 opt = 1; 107 opt = 1;
108 debug("fd %d setting TCP_NODELAY", fd); 108 debug2("fd %d setting TCP_NODELAY", fd);
109 if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &opt, sizeof opt) == -1) 109 if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &opt, sizeof opt) == -1)
110 error("setsockopt TCP_NODELAY: %.100s", strerror(errno)); 110 error("setsockopt TCP_NODELAY: %.100s", strerror(errno));
111} 111}
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"
26RCSID("$OpenBSD: sshconnect2.c,v 1.108 2002/11/21 22:45:31 markus Exp $"); 26RCSID("$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}
276void 276void
277userauth(Authctxt *authctxt, char *authlist) 277userauth(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;
1107static Authmethod * 1107static Authmethod *
1108authmethod_get(char *authlist) 1108authmethod_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 }