diff --git a/.fossil-settings/ignore-glob b/.fossil-settings/ignore-glob index 98f7ff8..9a70459 100644 --- a/.fossil-settings/ignore-glob +++ b/.fossil-settings/ignore-glob @@ -13,6 +13,8 @@ test/tests scripts/*.o templates/*.ctt test/unit/*.bin +treebird.core +filec.core compile_commands.json build/ obj/ diff --git a/src/main.c b/src/main.c index ee8ccaa..a184dec 100644 --- a/src/main.c +++ b/src/main.c @@ -5,6 +5,9 @@ */ #include "global_perl.h" +#ifdef __OpenBSD__ +# include +#endif #include #include #include "memory.h" @@ -272,6 +275,14 @@ int main(int argc, char **argv, char **env) #endif +#ifdef __OpenBSD__ + if (pledge("stdio rpath inet dns unveil prot_exec", "") == -1) + { + perror("pledge"); + exit(2); + } +#endif + // Global init mstdnt_global_curl_init(); #ifndef CGI_MODE @@ -281,7 +292,6 @@ int main(int argc, char **argv, char **env) } #endif - // Initialize Perl PERL_SYS_INIT3(&argc, &argv, &env); my_perl = perl_alloc();