diff options
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/smbget.c | 5 |
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); |