mirror of
https://github.com/clearml/dropbear
synced 2025-04-20 06:05:03 +00:00
Read "y/n" response for fingerprints from /dev/tty directly so that dbclient
will work with scp. --HG-- extra : convert_revision : 1ec067604618a314ad36464920f08c7113d09aa3
This commit is contained in:
parent
37da919b7d
commit
b7dbb29e68
3
CHANGES
3
CHANGES
@ -1,3 +1,6 @@
|
|||||||
|
- Read "y/n" response for fingerprints from /dev/tty directly so that dbclient
|
||||||
|
will work with scp.
|
||||||
|
|
||||||
0.44 - Mon Jan 3 2005
|
0.44 - Mon Jan 3 2005
|
||||||
|
|
||||||
- SECURITY: Fix for PAM auth so that usernames are logged and conversation
|
- SECURITY: Fix for PAM auth so that usernames are logged and conversation
|
||||||
|
12
cli-kex.c
12
cli-kex.c
@ -115,13 +115,23 @@ void recv_msg_kexdh_reply() {
|
|||||||
static void ask_to_confirm(unsigned char* keyblob, unsigned int keybloblen) {
|
static void ask_to_confirm(unsigned char* keyblob, unsigned int keybloblen) {
|
||||||
|
|
||||||
char* fp = NULL;
|
char* fp = NULL;
|
||||||
|
FILE *tty = NULL;
|
||||||
|
char response = 'z';
|
||||||
|
|
||||||
fp = sign_key_fingerprint(keyblob, keybloblen);
|
fp = sign_key_fingerprint(keyblob, keybloblen);
|
||||||
fprintf(stderr, "\nHost '%s' is not in the trusted hosts file.\n(fingerprint %s)\nDo you want to continue connecting? (y/n)\n",
|
fprintf(stderr, "\nHost '%s' is not in the trusted hosts file.\n(fingerprint %s)\nDo you want to continue connecting? (y/n)\n",
|
||||||
cli_opts.remotehost,
|
cli_opts.remotehost,
|
||||||
fp);
|
fp);
|
||||||
|
|
||||||
if (getc(stdin) == 'y') {
|
tty = fopen(_PATH_TTY, "r");
|
||||||
|
if (tty) {
|
||||||
|
response = getc(tty);
|
||||||
|
fclose(tty);
|
||||||
|
} else {
|
||||||
|
response = getc(stdin);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (response == 'y') {
|
||||||
m_free(fp);
|
m_free(fp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user