mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-07-23 22:15:37 +02:00
Fix USERNAME env variable not set correctly
USERNAME environment variable is set correctly with the remote logged on username.
This commit is contained in:
parent
5c3dc0554f
commit
b72c36c802
@ -591,6 +591,7 @@ do_exec_no_pty(Session *s, const char *command)
|
|||||||
si.lpDesktop = L"winsta0\\default";
|
si.lpDesktop = L"winsta0\\default";
|
||||||
|
|
||||||
SetEnvironmentVariable("USER", s->pw->pw_name);
|
SetEnvironmentVariable("USER", s->pw->pw_name);
|
||||||
|
SetEnvironmentVariable("USERNAME", s->pw->pw_name);
|
||||||
SetEnvironmentVariable("LOGNAME", s->pw->pw_name);
|
SetEnvironmentVariable("LOGNAME", s->pw->pw_name);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1206,7 +1207,7 @@ do_exec_pty(Session *s, const char *command)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
//return 0;
|
//return 0;
|
||||||
return do_exec_pty(s, command);
|
return do_exec_no_pty(s, command);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user