Skip to content

Commit

Permalink
Fix Issue when multiple simultaneous gsudo versions throw "Unauthoriz…
Browse files Browse the repository at this point in the history
…ed. (Different gsudo.exe?)" #300
  • Loading branch information
gerardog committed Feb 18, 2024
1 parent 2b8d674 commit 8b132b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gsudo/Commands/StatusCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ private static void PrintToConsole(Dictionary<string, object> result)

foreach (string s in result["CacheSessions"] as string[])
{
Console.WriteLine($" {s},");
Console.WriteLine($" {s}");
}

if ((bool)result["IsRedirected"])
Expand Down
3 changes: 2 additions & 1 deletion src/gsudo/Rpc/NamedPipeNameFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ public static string GetPipeName(string allowedSid, int allowedPid, string targe
var s = InputArguments.RunAsSystem ? "_S" : string.Empty;
var admin = !isAdmin ? "_NonAdmin" : string.Empty;

var data = $"allowedSid-{allowedSid}_targetSid-{targetSid}{allowedPid}{s}{ti}{admin}";
var ownExe = GetHash(ProcessHelper.GetOwnExeName());
var data = $"allowedSid-{allowedSid}_targetSid-{targetSid}{allowedPid}{s}{ti}{admin}_{ownExe}";
#if !DEBUG
data = GetHash(data);
#endif
Expand Down

0 comments on commit 8b132b0

Please sign in to comment.