torture: Use new samba_getpass() in locktest2.
authorAndreas Schneider <asn@samba.org>
Thu, 22 Nov 2012 14:39:34 +0000 (15:39 +0100)
committerAndreas Schneider <asn@samba.org>
Mon, 3 Dec 2012 13:35:09 +0000 (14:35 +0100)
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
source3/torture/locktest2.c

index aefdcd3..6ab1ed4 100644 (file)
@@ -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);
                }
        }