Add $LIBFFI_TMPDIR environment variable support (#1667620)
This commit is contained in:
parent
e39a9572c0
commit
2c1dc799ce
|
@ -0,0 +1,17 @@
|
||||||
|
Most temp file directories need to be hardened against execution, but
|
||||||
|
libffi needs execute privileges. Add a libffi-specific temp directory
|
||||||
|
that can be set up by sysadmins as needed with suitable permissions.
|
||||||
|
This both ensures that libffi will have a valid temp directory to use
|
||||||
|
as well as preventing attempts to access other directories.
|
||||||
|
|
||||||
|
diff -rup a/src/closures.c b/src/closures.c
|
||||||
|
--- a/src/closures.c 2014-05-11 09:54:19.000000000 -0400
|
||||||
|
+++ b/src/closures.c 2020-04-29 20:50:00.454853909 -0400
|
||||||
|
@@ -362,6 +362,7 @@ static struct
|
||||||
|
const char *arg;
|
||||||
|
int repeat;
|
||||||
|
} open_temp_exec_file_opts[] = {
|
||||||
|
+ { open_temp_exec_file_env, "LIBFFI_TMPDIR", 0 },
|
||||||
|
{ open_temp_exec_file_env, "TMPDIR", 0 },
|
||||||
|
{ open_temp_exec_file_dir, "/tmp", 0 },
|
||||||
|
{ open_temp_exec_file_dir, "/var/tmp", 0 },
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
Name: libffi
|
Name: libffi
|
||||||
Version: 3.1
|
Version: 3.1
|
||||||
Release: 24%{?dist}
|
Release: 25%{?dist}
|
||||||
Summary: A portable foreign function interface library
|
Summary: A portable foreign function interface library
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://sourceware.org/libffi
|
URL: http://sourceware.org/libffi
|
||||||
|
@ -16,6 +16,7 @@ Patch0: libffi-3.1-fix-include-path.patch
|
||||||
Patch1: libffi-3.1-fix-exec-stack.patch
|
Patch1: libffi-3.1-fix-exec-stack.patch
|
||||||
Patch2: libffi-aarch64-rhbz1174037.patch
|
Patch2: libffi-aarch64-rhbz1174037.patch
|
||||||
Patch3: libffi-3.1-aarch64-fix-exec-stack.patch
|
Patch3: libffi-3.1-aarch64-fix-exec-stack.patch
|
||||||
|
Patch4: libffi-3.1-libffi_tmpdir.patch
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
%if %{without bootstrap}
|
%if %{without bootstrap}
|
||||||
|
@ -67,7 +68,7 @@ developing applications that use %{name}.
|
||||||
%patch1 -p1 -b .execstack
|
%patch1 -p1 -b .execstack
|
||||||
%patch2 -p1 -b .aarch64
|
%patch2 -p1 -b .aarch64
|
||||||
%patch3 -p1 -b .aarch64execstack
|
%patch3 -p1 -b .aarch64execstack
|
||||||
|
%patch4 -p1 -b .libffitmpdir
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --disable-static
|
%configure --disable-static
|
||||||
|
@ -120,6 +121,9 @@ rm -rf $RPM_BUILD_ROOT%{_libdir}/libffi-%{version}
|
||||||
%{_infodir}/libffi.info.*
|
%{_infodir}/libffi.info.*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 30 2020 DJ Delorie <idj@redhat.com> - 3.1-25
|
||||||
|
- Add $LIBFFI_TMPDIR environment variable support (#1667620)
|
||||||
|
|
||||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-24
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-24
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue