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 1391002de6cf01e74e74a497c45f7aaef948ccb2..70b0923010115c83af020ee2f82bdc487c11f480 100644 --- a/libffi.spec +++ b/libffi.spec @@ -1,6 +1,6 @@ Name: libffi Version: 3.4.2 -Release: 10 +Release: 11 Summary: A Portable Foreign Function Interface Library License: MIT URL: http://sourceware.org/libffi @@ -19,6 +19,7 @@ Patch7: backport-Robustify-floating-point-comparison-in-test.patch Patch8: backport-Fix-floating-point-compare.patch Patch9: backport-Fix-bugs-in-the-x86-64-and-x32-target-887-889.patch Patch10: backport-Add-the-ABI_ATTR-attribute-to-called-functions-891-8.patch +Patch11: backport-fix-tramp-ensure-file-descriptor-is-closed-on-exec.patch BuildRequires: gcc gcc-c++ dejagnu BuildRequires: make @@ -106,6 +107,9 @@ fi %{_infodir}/libffi.info.gz %changelog +* Fri Aug 8 2025 fuanan - 3.4.2-11 +- backport fix(tramp): ensure file descriptor is closed on exec + * Tue Jul 29 2025 yanglongkang - 3.4.2-10 - fix bugs in the x86-64 and x32 target