[PATCH 03/16] smbclient: Use new samba_getpass() function.
Andreas Schneider
asn at samba.org
Tue Nov 27 04:23:43 MST 2012
Signed-off-by: Andreas Schneider <asn at samba.org>
---
source3/client/client.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/source3/client/client.c b/source3/client/client.c
index f8cc27d..0e2e07b 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) {
--
1.8.0
More information about the samba-technical
mailing list