comparison cli-auth.c @ 1122:aaf576b27a10

Merge pull request #13 from gazoo74/fix-warnings Fix warnings
author Matt Johnston <matt@ucc.asn.au>
date Thu, 04 Jun 2015 23:08:50 +0800
parents efb7e545a65e
children a8f4dade70e5
comparison
equal deleted inserted replaced
1087:1e486f368ec3 1122:aaf576b27a10
41 /* Send a "none" auth request to get available methods */ 41 /* Send a "none" auth request to get available methods */
42 void cli_auth_getmethods() { 42 void cli_auth_getmethods() {
43 TRACE(("enter cli_auth_getmethods")) 43 TRACE(("enter cli_auth_getmethods"))
44 CHECKCLEARTOWRITE(); 44 CHECKCLEARTOWRITE();
45 buf_putbyte(ses.writepayload, SSH_MSG_USERAUTH_REQUEST); 45 buf_putbyte(ses.writepayload, SSH_MSG_USERAUTH_REQUEST);
46 buf_putstring(ses.writepayload, cli_opts.username, 46 buf_putstring(ses.writepayload, cli_opts.username,
47 strlen(cli_opts.username)); 47 strlen(cli_opts.username));
48 buf_putstring(ses.writepayload, SSH_SERVICE_CONNECTION, 48 buf_putstring(ses.writepayload, SSH_SERVICE_CONNECTION,
49 SSH_SERVICE_CONNECTION_LEN); 49 SSH_SERVICE_CONNECTION_LEN);
50 buf_putstring(ses.writepayload, "none", 4); /* 'none' method */ 50 buf_putstring(ses.writepayload, "none", 4); /* 'none' method */
51 51
52 encrypt_packet(); 52 encrypt_packet();
53 53
73 TRACE(("leave cli_auth_getmethods")) 73 TRACE(("leave cli_auth_getmethods"))
74 } 74 }
75 75
76 void recv_msg_userauth_banner() { 76 void recv_msg_userauth_banner() {
77 77
78 unsigned char* banner = NULL; 78 char* banner = NULL;
79 unsigned int bannerlen; 79 unsigned int bannerlen;
80 unsigned int i, linecount; 80 unsigned int i, linecount;
81 81
82 TRACE(("enter recv_msg_userauth_banner")) 82 TRACE(("enter recv_msg_userauth_banner"))
83 if (ses.authstate.authdone) { 83 if (ses.authstate.authdone) {
149 dropbear_exit("Unexpected userauth packet"); 149 dropbear_exit("Unexpected userauth packet");
150 } 150 }
151 151
152 void recv_msg_userauth_failure() { 152 void recv_msg_userauth_failure() {
153 153
154 unsigned char * methods = NULL; 154 char * methods = NULL;
155 unsigned char * tok = NULL; 155 char * tok = NULL;
156 unsigned int methlen = 0; 156 unsigned int methlen = 0;
157 unsigned int partial = 0; 157 unsigned int partial = 0;
158 unsigned int i = 0; 158 unsigned int i = 0;
159 159
160 TRACE(("<- MSG_USERAUTH_FAILURE")) 160 TRACE(("<- MSG_USERAUTH_FAILURE"))