diff options
Diffstat (limited to 'source/utils/net_ads.c')
-rw-r--r-- | source/utils/net_ads.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source/utils/net_ads.c b/source/utils/net_ads.c index d4dfbb6a2b5..71217b5137b 100644 --- a/source/utils/net_ads.c +++ b/source/utils/net_ads.c @@ -244,14 +244,11 @@ retry_connect: retry: if (!opt_password && need_password && !opt_machine_pass) { - char *prompt = NULL; - asprintf(&prompt,"%s's password: ", opt_user_name); - if (!prompt) { + opt_password = net_prompt_pass(opt_user_name); + if (!opt_password) { ads_destroy(&ads); return ADS_ERROR(LDAP_NO_MEMORY); } - opt_password = getpass(prompt); - free(prompt); } if (opt_password) { |