Mercurial > dropbear
comparison cli-authpasswd.c @ 35:0ad5fb979f42
set the isserver flag (oops)
fix password auth for the server
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 29 Jul 2004 02:19:03 +0000 |
parents | f789045062e6 |
children | eee77ac31ccc |
comparison
equal
deleted
inserted
replaced
34:e2a1eaa19f22 | 35:0ad5fb979f42 |
---|---|
1 #include "includes.h" | 1 #include "includes.h" |
2 #include "buffer.h" | 2 #include "buffer.h" |
3 #include "dbutil.h" | 3 #include "dbutil.h" |
4 #include "session.h" | 4 #include "session.h" |
5 #include "ssh.h" | 5 #include "ssh.h" |
6 #include "runopts.h" | |
6 | 7 |
7 int cli_auth_password() { | 8 int cli_auth_password() { |
8 | 9 |
9 char* password = NULL; | 10 char* password = NULL; |
10 TRACE(("enter cli_auth_password")); | 11 TRACE(("enter cli_auth_password")); |
12 CHECKCLEARTOWRITE(); | 13 CHECKCLEARTOWRITE(); |
13 password = getpass("Password: "); | 14 password = getpass("Password: "); |
14 | 15 |
15 buf_putbyte(ses.writepayload, SSH_MSG_USERAUTH_REQUEST); | 16 buf_putbyte(ses.writepayload, SSH_MSG_USERAUTH_REQUEST); |
16 | 17 |
17 buf_putstring(ses.writepayload, ses.authstate.username, | 18 buf_putstring(ses.writepayload, cli_opts.username, |
18 strlen(ses.authstate.username)); | 19 strlen(cli_opts.username)); |
19 | 20 |
20 buf_putstring(ses.writepayload, SSH_SERVICE_CONNECTION, | 21 buf_putstring(ses.writepayload, SSH_SERVICE_CONNECTION, |
21 SSH_SERVICE_CONNECTION_LEN); | 22 SSH_SERVICE_CONNECTION_LEN); |
22 | 23 |
23 buf_putstring(ses.writepayload, AUTH_METHOD_PASSWORD, | 24 buf_putstring(ses.writepayload, AUTH_METHOD_PASSWORD, |