smbclient: Use new samba_getpass() function.
authorAndreas Schneider <asn@samba.org>
Thu, 22 Nov 2012 14:33:52 +0000 (15:33 +0100)
committerAndreas Schneider <asn@samba.org>
Mon, 3 Dec 2012 13:35:08 +0000 (14:35 +0100)
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
source3/client/client.c

index f8cc27d63a60944777487a75e0f4b5a0282b5b2c..0e2e07bd71d08d56594d142ff1ed067f4a865d16 100644 (file)
@@ -4357,9 +4357,12 @@ static int cmd_logon(void)
        }
 
        if (!next_token_talloc(ctx, &cmd_ptr,&l_password,NULL)) {
-               char *pass = getpass("Password: ");
-               if (pass) {
-                       l_password = talloc_strdup(ctx,pass);
+               char pwd[256] = {0};
+               int rc;
+
+               rc = samba_getpass("Password: ", pwd, sizeof(pwd), false, false);
+               if (rc == 0) {
+                       l_password = talloc_strdup(ctx, pwd);
                }
        }
        if (!l_password) {