[PATCH 05/16] torture: Use new samba_getpass() in locktest2.
Andreas Schneider
asn at samba.org
Fri Nov 23 08:41:09 MST 2012
Signed-off-by: Andreas Schneider <asn at samba.org>
---
source3/torture/locktest2.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/source3/torture/locktest2.c b/source3/torture/locktest2.c
index aefdcd3..6ab1ed4 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);
}
}
--
1.8.0
More information about the samba-technical
mailing list