Merge pull request #665 from bmiklautz/issue_629

Fix for #629. Don't show password if --from-stdin is given as argument.
This commit is contained in:
Marc-André Moreau 2012-08-13 05:34:47 -07:00
commit d1777caee6
1 changed files with 3 additions and 4 deletions

View File

@ -27,6 +27,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) {
@ -854,10 +855,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) {