summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2012-11-22 15:33:52 +0100
committerAndreas Schneider <asn@samba.org>2012-12-03 14:35:08 +0100
commit85b1b840cbed92a5657e20407fe22dc9e8591af5 (patch)
treec0a2685eb293a84d2ff0fe04bcaf37f6c2eb2670 /source3/client
parent04c0d4878e3bb28b8ba8116abb0de4527eb96bd6 (diff)
downloadsamba-85b1b840cbed92a5657e20407fe22dc9e8591af5.tar.gz
smbclient: Use new samba_getpass() function.
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index f8cc27d63a..0e2e07bd71 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -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) {