summaryrefslogtreecommitdiffhomepage
path: root/cli-session.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2006-03-21 16:20:59 +0000
committerMatt Johnston <matt@ucc.asn.au>2006-03-21 16:20:59 +0000
commitf7caf6f5c640cb1756c01184898f176438a3a0c2 (patch)
tree4d32de11b18d5f6296207961b5f25d0949af80c0 /cli-session.c
parente444f0cfe67c71d3f38854f27cefae9aea6c4cd9 (diff)
parent3f49fc5f2ca0ec4adb5cac081f502cbb86702efa (diff)
propagate from branch 'au.asn.ucc.matt.dropbear' (head 0501e6f661b5415eb76f3b312d183c3adfbfb712)
to branch 'au.asn.ucc.matt.dropbear.cli-agent' (head 01038174ec27245b51bd43a66c01ad930880f67b) --HG-- branch : agent-client extra : convert_revision : 12b2f59db65e7339d340e95ac67d6d9ddb193c2b
Diffstat (limited to 'cli-session.c')
-rw-r--r--cli-session.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/cli-session.c b/cli-session.c
index 9112e98..4f1e597 100644
--- a/cli-session.c
+++ b/cli-session.c
@@ -63,9 +63,7 @@ static const packettype cli_packettypes[] = {
{SSH_MSG_CHANNEL_OPEN_CONFIRMATION, recv_msg_channel_open_confirmation},
{SSH_MSG_CHANNEL_OPEN_FAILURE, recv_msg_channel_open_failure},
{SSH_MSG_USERAUTH_BANNER, recv_msg_userauth_banner}, /* client */
-#ifdef ENABLE_CLI_PUBKEY_AUTH
- {SSH_MSG_USERAUTH_PK_OK, recv_msg_userauth_pk_ok}, /* client */
-#endif
+ {SSH_MSG_USERAUTH_SPECIFIC_60, recv_msg_userauth_specific_60}, /* client */
{0, 0} /* End */
};
@@ -81,12 +79,14 @@ static const struct ChanType *cli_chantypes[] = {
void cli_session(int sock, char* remotehost) {
+ seedrandom();
+
crypto_init();
+
common_session_init(sock, remotehost);
chaninitialise(cli_chantypes);
-
/* Set up cli_ses vars */
cli_session_init();
@@ -96,12 +96,8 @@ void cli_session(int sock, char* remotehost) {
/* Exchange identification */
session_identification();
- seedrandom();
-
send_msg_kexinit();
- /* XXX here we do stuff differently */
-
session_loop(cli_sessionloop);
/* Not reached */
@@ -288,7 +284,8 @@ static void cli_remoteclosed() {
}
/* Operates in-place turning dirty (untrusted potentially containing control
- * characters) text into clean text. */
+ * characters) text into clean text.
+ * Note: this is safe only with ascii - other charsets could have problems. */
void cleantext(unsigned char* dirtytext) {
unsigned int i, j;