linux: Request no new privileges: https://docs.kernel.org/userspace-api/no_new_privs.html.
All checks were successful
Build Tilde Friends / Build-Docs (push) Successful in 2m34s
Build Tilde Friends / Build-All (push) Successful in 10m7s

This commit is contained in:
2025-12-17 19:05:43 -05:00
parent 03a32ca371
commit abe16dcf66

View File

@@ -2055,6 +2055,13 @@ void tf_run_thread_start(const char* zip_path)
#else
int main(int argc, char* argv[])
{
#if defined(__linux__)
if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) != 0)
{
tf_printf("Unable to set no new privileges flag: %s\n", strerror(errno));
return EXIT_FAILURE;
}
#endif
setvbuf(stdout, NULL, _IONBF, 0);
_startup(argc, argv);
ares_library_init(0);