<<
path:
root/public/blog.git/html/src/search/sec_landlock.jai
blob: 67e7c742c5b22fece3fff862e0d80d457f95a37c
[raw]
[clear marker]
3sec_landlock_init :: () {
4 #if !LANDLOCK_ENABLED {
5 log_error("LANDLOCK IS DISABLED!");
6 if !is_dev_machine() then exit(99);
10 new_context := context;
11 new_context.logger = my_logger;
13 push_context,defer_pop new_context;
15 version := landlock_is_version_equal_or_higher(DESIRED_VERSION, true);
17 log_error("Warning: Your version of landlock is too old.");
20 rules := landlock_all_rules();
21 ok, ll_fd := landlock_create_ruleset(*rules);
24 ok = landlock_lock_privileges();
27 ok = landlock_restrict_self(ll_fd);
40my_logger :: #bake_arguments base_logger(prefix="Landlock");