gsudo
gsudo copied to clipboard
Issue: More than one instance of gsudo won't load in Windows Terminal when elevating as someone else.
I want to start an elevated CMD, Powershell or Powershell 7 Tab in Windows Terminal. First elevated Tab works fine, regardless if its cmd, Powershell or Powershell 7. Second elevated tab throws timeout exception.
Steps to Reproduce
Created a profile within Windows Terminal- gsudo cmd.exe
- gsudo powershell.exe
- gsudo pwsh.exe
Screenshots
Context:
- Windows version: Windows 10 21H2 Buidl 19044.1826
- gsudo version: 1.3.0 settings.txt
Ok. I see this happening only when invoking user is not admin, and you enter other user credentials.
This is what the debug window shows for the service.
To be honest I am not sure when I will have time to address this! I hope soon.
On the meantime I may suggest you open regular WT tabs, then write gsudo, and press enter, to elevate it in place. It should support many tabs, although showing many UAC popups.
Just for the info, it worked on my old laptop with gsudo 1.02 installed
Gotcha. Fixed the issue (0d99418).
Nonetheless there is still a problem with the cache not working as desired on this scenario.
To make the new process use the elevated user environment vars (as requested in #113, (which should be relevant when elevating as someone else) it is using the attached mode. In this mode, the cache is locked until the current attached elevation ends. So opening simultaneous tabs will ask for credentials several times, but opening sequential tabs (closing the former first) will result in cache success. Nonetheless I think that one deserves a new ticket.
Do you want to test the fix? 😉
https://ci.appveyor.com/project/gerardog/gsudo/builds/44183555/artifacts
The cache should also be fixed, at the cost of starting another background gsudo service, on attached mode.
Will try it tomorrow when i get time. Friday is calling now
Thanks for the fix. Tried it today and it worked.