aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn/KernelWatchdog.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS_TheReturn/KernelWatchdog.cs')
-rw-r--r--ShiftOS_TheReturn/KernelWatchdog.cs28
1 files changed, 0 insertions, 28 deletions
diff --git a/ShiftOS_TheReturn/KernelWatchdog.cs b/ShiftOS_TheReturn/KernelWatchdog.cs
index 0608c46..ec4ee45 100644
--- a/ShiftOS_TheReturn/KernelWatchdog.cs
+++ b/ShiftOS_TheReturn/KernelWatchdog.cs
@@ -66,38 +66,10 @@ namespace ShiftOS.Engine
}
}
- public static bool IsSafe(TerminalBackend.TerminalCommand cmd)
- {
- if (!cmd.RequiresElevation)
- return true;
- else
- {
- if (SaveSystem.CurrentUser.Permissions == Objects.UserPermissions.Root)
- return true;
- else
- return false;
- }
- }
-
static string regularUsername = ""; //put regular username in here later
- public static void EnterKernelMode()
- {
- regularUsername = SaveSystem.CurrentUser.Username; // k for now put user's username in here for the time being
- SaveSystem.CurrentUser = SaveSystem.Users.FirstOrDefault(x => x.Username == "root"); // now their username is root
-
- }
-
- public static void LeaveKernelMode()
- {
- var user = SaveSystem.Users.FirstOrDefault(x => x.Username == regularUsername); //finds username
- if (user == null)
- throw new Exception("User not in root mode."); // fuck this means the user isnt root quick throw error
- SaveSystem.CurrentUser = user;
- }
-
//determines if you can disconnect from mud if there are no applications that currently need to
internal static bool CanRunOffline(Type method)
{