Re: Incorrect $HOME value when using runas on Windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2021-01-20 at 10:12:57, Mail wrote:
> To reproduce the issue:
> 1. Install git-windows x32 or x64 for all users.
> 2. Install Total Commader or any other file manager that support system
> context menu
> 3. Add user in Windows via msc or settings app and set password. Don't
> forget to disable "User must change password on first login" in case user
> created via msc
> 4. In current user session execute runas.exe /user:NewlyCreatedUser "Path To
> File Manager"
> 5. Right click on empty space in file list and choose Git bash here
> 6. Type `echo $HOME` in bash console and press enter
> 7. The $HOME is `/c/Windows/System32`. Expected `/c/Users/NewlyCreatedUser`
> It seems git for windows uses HOMEPATH that points to system32 in case of
> runas command. Might be using USERPROFILE variable is better.

I'd recommend reporting this to the Git for Windows project[0].  The
setting of $HOME is normally a feature provided automatically by
Unix-like operating systems, and its behavior in the MSYS environment is
controlled by Git for Windows.

[0] https://github.com/git-for-windows/git
-- 
brian m. carlson (he/him or they/them)
Houston, Texas, US

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux