mirror of https://github.com/FreeRDP/FreeRDP
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:
commit
d1777caee6
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue