From a15d5f27c81f14b804ccdd5f4eb7602368b8a681 Mon Sep 17 00:00:00 2001 From: Zephyr <12817816+ZephyrTFA@users.noreply.github.com> Date: Sun, 18 Aug 2024 23:50:05 -0400 Subject: [PATCH 1/3] Update src/Tgstation.Server.Host/Security/WindowsSystemIdentity.cs Co-authored-by: Jordan Dominion --- src/Tgstation.Server.Host/Security/WindowsSystemIdentity.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host/Security/WindowsSystemIdentity.cs b/src/Tgstation.Server.Host/Security/WindowsSystemIdentity.cs index 486d8d795c..609f33d2a2 100644 --- a/src/Tgstation.Server.Host/Security/WindowsSystemIdentity.cs +++ b/src/Tgstation.Server.Host/Security/WindowsSystemIdentity.cs @@ -25,7 +25,7 @@ namespace Tgstation.Server.Host.Security public bool CanCreateSymlinks => IsSuperUser; /// - public bool IsSuperUser => IsSuperUser; + public bool IsSuperUser => isAdmin ?? throw new NotSupportedException(); /// /// The for the . From a9545ecc51f7cf8546ffab8c0abf6ad254d04f8a Mon Sep 17 00:00:00 2001 From: Zephyr <12817816+ZephyrTFA@users.noreply.github.com> Date: Sun, 18 Aug 2024 23:50:11 -0400 Subject: [PATCH 2/3] Update src/Tgstation.Server.Host/Components/InstanceManager.cs Co-authored-by: Jordan Dominion --- src/Tgstation.Server.Host/Components/InstanceManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host/Components/InstanceManager.cs b/src/Tgstation.Server.Host/Components/InstanceManager.cs index 73fdf2b857..1adf02d250 100644 --- a/src/Tgstation.Server.Host/Components/InstanceManager.cs +++ b/src/Tgstation.Server.Host/Components/InstanceManager.cs @@ -678,7 +678,7 @@ namespace Tgstation.Server.Host.Components if (!platformIdentifier.IsWindows && systemIdentity.IsSuperUser) { - logger.LogWarning("TGS is being run as the root account. This is not recommended and may prevent launch in a future version."); + logger.LogWarning("TGS is being run as the root account. This is not recommended."); } } From 56bccd6f70e20495395e1d0cb910750e90ed0359 Mon Sep 17 00:00:00 2001 From: Zephyr <12817816+ZephyrTFA@users.noreply.github.com> Date: Sun, 18 Aug 2024 23:51:49 -0400 Subject: [PATCH 3/3] Apply suggestions from code review --- src/Tgstation.Server.Host/Program.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Tgstation.Server.Host/Program.cs b/src/Tgstation.Server.Host/Program.cs index 47988e4d1c..b23633b7df 100644 --- a/src/Tgstation.Server.Host/Program.cs +++ b/src/Tgstation.Server.Host/Program.cs @@ -11,8 +11,6 @@ using Tgstation.Server.Host.Core; using Tgstation.Server.Host.Properties; using Tgstation.Server.Host.System; -using Process = System.Diagnostics.Process; - namespace Tgstation.Server.Host { /// @@ -42,7 +40,7 @@ namespace Tgstation.Server.Host /// Entrypoint for the . /// /// The command line arguments. - /// A resulting in the . + /// A resulting in the . public static async Task Main(string[] args) { // first arg is 100% always the update path, starting it otherwise is solely for debugging purposes