mirror of
https://github.com/Leonmmcoset/cleonos.git
synced 2026-04-21 18:44:01 +00:00
Stage 18
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
static clks_bool clks_user_shell_ready = CLKS_FALSE;
|
||||
static clks_bool clks_user_shell_exec_requested_flag = CLKS_FALSE;
|
||||
static clks_bool clks_user_shell_exec_enabled = CLKS_FALSE;
|
||||
static u64 clks_user_launch_attempt_count = 0ULL;
|
||||
static u64 clks_user_launch_success_count = 0ULL;
|
||||
static u64 clks_user_launch_fail_count = 0ULL;
|
||||
@@ -82,6 +83,7 @@ clks_bool clks_userland_init(void) {
|
||||
|
||||
clks_user_shell_ready = CLKS_FALSE;
|
||||
clks_user_shell_exec_requested_flag = CLKS_FALSE;
|
||||
clks_user_shell_exec_enabled = CLKS_FALSE;
|
||||
clks_user_launch_attempt_count = 0ULL;
|
||||
clks_user_launch_success_count = 0ULL;
|
||||
clks_user_launch_fail_count = 0ULL;
|
||||
@@ -103,12 +105,14 @@ clks_bool clks_userland_init(void) {
|
||||
return CLKS_FALSE;
|
||||
}
|
||||
|
||||
(void)clks_userland_request_shell_exec();
|
||||
clks_log(CLKS_LOG_INFO, "USER", "USER SHELL EXEC DISABLED (KERNEL SHELL MODE)");
|
||||
return CLKS_TRUE;
|
||||
}
|
||||
|
||||
void clks_userland_tick(u64 tick) {
|
||||
if (clks_user_shell_ready == CLKS_FALSE || clks_user_shell_exec_requested_flag == CLKS_TRUE) {
|
||||
if (clks_user_shell_exec_enabled == CLKS_FALSE ||
|
||||
clks_user_shell_ready == CLKS_FALSE ||
|
||||
clks_user_shell_exec_requested_flag == CLKS_TRUE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -138,4 +142,4 @@ u64 clks_userland_launch_success(void) {
|
||||
|
||||
u64 clks_userland_launch_failures(void) {
|
||||
return clks_user_launch_fail_count;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user