linux: Request no new privileges: https://docs.kernel.org/userspace-api/no_new_privs.html.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user