1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-28 01:41:48 +03:00

examples: Use ssh_getpass().

This commit is contained in:
Andreas Schneider
2011-01-23 20:08:25 +01:00
parent 50a119dd0a
commit f3685f0f73
2 changed files with 15 additions and 5 deletions

View File

@ -58,7 +58,10 @@ static int auth_callback(const char *prompt, char *buf, size_t len,
*ptr = '\0';
}
} else {
answer = getpass(prompt);
if (ssh_getpass(prompt, buf, len, 0, 0) < 0) {
return -1;
}
return 0;
}
if (answer == NULL) {