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

index 89b34e4da085f35764517b785da649667e081f70..d31c907d22ddb47fd3bedf7c1a5236bd0f306ffc 100644 (file)
@@ -9395,9 +9395,12 @@ static void usage(void)
        if(use_kerberos && !gotuser) gotpass = True;
 
        while (!gotpass) {
-               p = getpass("Password:");
-               if (p) {
-                       fstrcpy(password, p);
+               char pwd[256] = {0};
+               int rc;
+
+               rc = samba_getpass("Password:", pwd, sizeof(pwd), false, false);
+               if (rc == 0) {
+                       fstrcpy(password, pwd);
                        gotpass = 1;
                }
        }