summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2012-11-23 14:38:14 +0100
committerAndreas Schneider <asn@samba.org>2012-12-03 14:35:10 +0100
commitde1288e13eb132768d22ae8c2f34a5e99bddcb33 (patch)
tree535308eb679d62970ac8c5a13eeec7552a727e24
parent353e83e4ee21e5d7955b79e3d1da046f3d1c96e1 (diff)
downloadsamba-de1288e13eb132768d22ae8c2f34a5e99bddcb33.tar.gz
samba-de1288e13eb132768d22ae8c2f34a5e99bddcb33.tar.bz2
samba-de1288e13eb132768d22ae8c2f34a5e99bddcb33.zip
smbget: Use new samba_getpass() function.
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
-rw-r--r--source3/utils/smbget.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/utils/smbget.c b/source3/utils/smbget.c
index d60a13fd69..207746f5d4 100644
--- a/source3/utils/smbget.c
+++ b/source3/utils/smbget.c
@@ -109,13 +109,12 @@ static void get_auth_data(const char *srv, const char *shr, char *wg, int wglen,
} else if(username) strncpy(un, username, unlen-1);
if(!nonprompt && !password) {
- char *prompt, *pass;
+ char *prompt;
if (asprintf(&prompt, "Password for %s at %s: ", shr, srv) == -1) {
return;
}
- pass = getpass(prompt);
+ (void) samba_getpass(prompt, pw, pwlen, false, false);
free(prompt);
- strncpy(pw, pass, pwlen-1);
} else if(password) strncpy(pw, password, pwlen-1);
if(workgroup)strncpy(wg, workgroup, wglen-1);