From 85b1b840cbed92a5657e20407fe22dc9e8591af5 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 22 Nov 2012 15:33:52 +0100 Subject: smbclient: Use new samba_getpass() function. Reviewed-by: Jelmer Vernooij --- source3/client/client.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source3/client') diff --git a/source3/client/client.c b/source3/client/client.c index f8cc27d63a..0e2e07bd71 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -4357,9 +4357,12 @@ static int cmd_logon(void) } if (!next_token_talloc(ctx, &cmd_ptr,&l_password,NULL)) { - char *pass = getpass("Password: "); - if (pass) { - l_password = talloc_strdup(ctx,pass); + char pwd[256] = {0}; + int rc; + + rc = samba_getpass("Password: ", pwd, sizeof(pwd), false, false); + if (rc == 0) { + l_password = talloc_strdup(ctx, pwd); } } if (!l_password) { -- cgit