Fix for #629. Don't show password if --from-stdin.

(cherry picked from commit e9af573d58)
This commit is contained in:
Bernhard Miklautz 2012-07-25 12:39:54 +02:00 committed by Bernhard Miklautz
parent efcd396188
commit 1851856eb3

View File

@ -26,6 +26,7 @@
#include <freerdp/utils/print.h>
#include <freerdp/utils/memory.h>
#include <freerdp/utils/args.h>
#include <freerdp/utils/passphrase.h>
void freerdp_parse_hostname(rdpSettings* settings, char* hostname) {
@ -726,10 +727,8 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
}
/* password */
if (NULL == settings->password) {
char input[512];
printf("password: ");
scanf("%511s", input);
settings->password = xstrdup(input);
settings->password = xmalloc(512 * sizeof(char));
freerdp_passphrase_read("password: ", settings->password, 512, settings->from_stdin);
}
/* domain */
if (NULL == settings->domain) {