Blame SOURCES/libffi-3.1-libffi_tmpdir.patch

408e44
Most temp file directories need to be hardened against execution, but
408e44
libffi needs execute privileges.  Add a libffi-specific temp directory
408e44
that can be set up by sysadmins as needed with suitable permissions.
408e44
This both ensures that libffi will have a valid temp directory to use
408e44
as well as preventing attempts to access other directories.
408e44
408e44
diff -rup a/src/closures.c b/src/closures.c
408e44
--- a/src/closures.c	2014-05-11 09:54:19.000000000 -0400
408e44
+++ b/src/closures.c	2020-04-29 20:50:00.454853909 -0400
408e44
@@ -362,6 +362,7 @@ static struct
408e44
   const char *arg;
408e44
   int repeat;
408e44
 } open_temp_exec_file_opts[] = {
408e44
+  { open_temp_exec_file_env, "LIBFFI_TMPDIR", 0 },
408e44
   { open_temp_exec_file_env, "TMPDIR", 0 },
408e44
   { open_temp_exec_file_dir, "/tmp", 0 },
408e44
   { open_temp_exec_file_dir, "/var/tmp", 0 },