torture: Use new samba_getpass() in masktest.
authorAndreas Schneider <asn@samba.org>
Thu, 22 Nov 2012 14:46:20 +0000 (15:46 +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/masktest.c

index 58e09822a148fbf3e4bf594699b6201d121b2e06..8332e806db4afe5a45fecc24ff8b2b2a5c9ad9f9 100644 (file)
@@ -198,8 +198,11 @@ static struct cli_state *connect_one(char *share)
        }
 
        if (!got_pass) {
-               char *pass = getpass("Password: ");
-               if (pass) {
+               char pwd[256] = {0};
+               int rc;
+
+               rc = samba_getpass("Password: ", pwd, sizeof(pwd), false, false);
+               if (rc == 0) {
                        fstrcpy(password, pass);
                }
        }