gerardog/gsudo

Issue: Wrong SID when using cached token

Starmania opened this issue · 1 comments

Issue Description

When you cached a token (e.g. the one of system) and you gsudo an another time, arguments like --ti, -u, none won't be respected and you still run as system.

Steps to Reproduce

gsudo config CacheMode Auto
gsudo "cmd /c whoami"
gsudo -s "cmd /c whoami"

Screenshots

image

Potential place to look at

  • var serviceLocation = await ServiceHelper.FindAnyServiceFast().ConfigureAwait(false);
    if (serviceLocation == null)
    {
    var serviceHandle = ServiceHelper.StartService(callingPid, singleUse: InputArguments.KillCache);
    serviceLocation = await ServiceHelper.WaitForNewService(callingPid).ConfigureAwait(false);
    }

Context:

  • Windows version:
    • Win10 21H2 - French
  • gsudo version:

I've released a fix in v2.4.2. Please give it a try. Thank you for reporting.