Author:ptrace Comitter:ptrace Date:2026-05-01 17:18:01 UTC

Introduced a mechanism, that prevents running the search server with disabled sandbox features in non-development environments

diff --git a/src/search/main.jai b/src/search/main.jai index 1bab525..81e3799 100644 --- a/src/search/main.jai +++ b/src/search/main.jai @@ -137,10 +137,8 @@ SECCOMP_ENABLED         :: true; SECCOMP_ARMED           :: true; LANDLOCK_ENABLED        :: true; DEVELOPER_FORCED :: false; #if IS_DEVELOPER || DEVELOPER_FORCED { #if IS_DEVELOPER {     FP_SOCKET_RELOAD :: "/tmp/ptracedev_search.sock\0"; } else {     FP_SOCKET_RELOAD :: "/run/ptracedev/search.sock\0"; @@ -163,9 +161,13 @@ main :: () {         context.allocator = UA.get_unmapping_allocator();     }     #if !SECURITY_MODULE_ENABLED defer {     #if !SECURITY_MODULE_ENABLED {         for 0..9 log_error("-- SECURITY MODULE IS DISABLED! --");         exit(99);         if !is_dev_machine() then exit(99);         defer {             for 0..9 log_error("-- SECURITY MODULE IS DISABLED! --");             exit(99);         }     } @@ -388,6 +390,12 @@ Options STR_END; is_dev_machine :: () -> bool {     shl_dev := to_string(getenv("SHL_DEVELOPER"));     if shl_dev && shl_dev == "true" return true;     return false; } handler_server :: (signal: int) #c_call {     push_context {         log("Received interrupt signal.");