diff --git a/backport-fix-tramp-ensure-file-descriptor-is-closed-on-exec.patch b/backport-fix-tramp-ensure-file-descriptor-is-closed-on-exec.patch new file mode 100644 index 0000000000000000000000000000000000000000..4168ad5ebc3f7bf3b0ed6bc4e689cf8d5bfc1717 --- /dev/null +++ b/backport-fix-tramp-ensure-file-descriptor-is-closed-on-exec.patch @@ -0,0 +1,23 @@ +From 60671187688ae3b295ab0e1dd77a8d6dd7a805a2 Mon Sep 17 00:00:00 2001 +From: Anthony Green +Date: Fri, 11 Jul 2025 03:17:18 -0400 +Subject: [PATCH] fix(tramp): ensure file descriptor is closed on exec. Thanks + to Florian Weimer. + +c# Please enter the commit message for your changes. Lines starting +--- + src/tramp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/tramp.c b/src/tramp.c +index 8ec084868..31180efb6 100644 +--- a/src/tramp.c ++++ b/src/tramp.c +@@ -236,7 +236,7 @@ ffi_tramp_get_libffi (void) + if (!found) + return 0; + +- tramp_globals.fd = open (file, O_RDONLY); ++ tramp_globals.fd = open (file, O_RDONLY | O_CLOEXEC); + if (tramp_globals.fd == -1) + return 0; diff --git a/libffi.spec b/libffi.spec index e73d2eaa9513da6ca91e063028f6f21d3827c431..6c654965ece719f4ba6d41ee456a95b4205f9a89 100644 --- a/libffi.spec +++ b/libffi.spec @@ -1,6 +1,6 @@ Name: libffi Version: 3.4.4 -Release: 6 +Release: 7 Summary: A Portable Foreign Function Interface Library License: MIT URL: http://sourceware.org/libffi @@ -16,6 +16,7 @@ Patch4: backport-Fix-floating-point-compare.patch Patch5: libffi-Add-sw64-architecture.patch Patch6: backport-Fix-bugs-in-the-x86-64-and-x32-target-887-889.patch Patch7: backport-Add-the-ABI_ATTR-attribute-to-called-functions-891-8.patch +Patch8: backport-fix-tramp-ensure-file-descriptor-is-closed-on-exec.patch BuildRequires: gcc gcc-c++ dejagnu BuildRequires: make @@ -103,6 +104,9 @@ fi %{_infodir}/libffi.info.gz %changelog +* Fri Aug 8 2025 fuanan - 3.4.4-7 +- backport fix(tramp): ensure file descriptor is closed on exec + * Tue Jul 29 2025 yanglongkang - 3.4.4-6 - fix bugs in the x86-64 and x32 target