xfreerdp: use login name if no user name was set
If no user name is set with /u:.. use the login name of the current user will be used as user name.
This commit is contained in:
parent
53686e414a
commit
2dca3f3356
@ -913,6 +913,16 @@ BOOL xf_pre_connect(freerdp* instance)
|
||||
freerdp_client_load_addins(channels, instance->settings);
|
||||
freerdp_channels_pre_connect(channels, instance);
|
||||
|
||||
if (!settings->Username)
|
||||
{
|
||||
char *login_name = getlogin();
|
||||
if (login_name)
|
||||
{
|
||||
settings->Username = _strdup(login_name);
|
||||
WLog_INFO(TAG, "No user name set. - Using login name: %s", settings->Username);
|
||||
}
|
||||
}
|
||||
|
||||
if (settings->AuthenticationOnly)
|
||||
{
|
||||
/* Check --authonly has a username and password. */
|
||||
|
Loading…
Reference in New Issue
Block a user