From 17bcdb52001f4625439c0c6fea2cfe174b63ce08 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 22 Nov 2012 15:39:34 +0100 Subject: torture: Use new samba_getpass() in locktest2. Reviewed-by: Jelmer Vernooij --- source3/torture/locktest2.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/torture/locktest2.c b/source3/torture/locktest2.c index aefdcd3ff2..6ab1ed4fa1 100644 --- a/source3/torture/locktest2.c +++ b/source3/torture/locktest2.c @@ -184,9 +184,12 @@ static struct cli_state *connect_one(char *share) server_n = server; if (!got_pass) { - char *pass = getpass("Password: "); - if (pass) { - fstrcpy(password, pass); + char pwd[256] = {0}; + int rc; + + rc = samba_getpass("Password: ", pwd, sizeof(pwd), false, false); + if (rc == 0) { + fstrcpy(password, pwd); } } -- cgit