From f3685f0f731434d8c94454fc12cebe1b5a0bdbb1 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sun, 23 Jan 2011 20:08:25 +0100 Subject: examples: Use ssh_getpass(). --- examples/sample.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'examples/sample.c') diff --git a/examples/sample.c b/examples/sample.c index 8f86f56..c7fec6c 100644 --- a/examples/sample.c +++ b/examples/sample.c @@ -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) { -- cgit