Read the password from stdin if -p - is sent

This commit is contained in:
Shea Levy 2011-09-08 01:32:08 -04:00
parent c8a1c59271
commit f03b2e227a

View File

@ -727,6 +727,11 @@ int main(int argc, char* argv[])
if (freerdp_parse_args(instance->settings, argc, argv,
xf_process_plugin_args, chanman, xf_process_ui_args, NULL) < 0)
return 1;
if (strcmp("-", instance->settings->password) == 0)
{
fgets(instance->settings->password, 512-1, stdin);
*(instance->settings->password + strlen(instance->settings->password) - 1) = '\0';
}
data = (struct thread_data*) xzalloc(sizeof(struct thread_data));
data->instance = instance;