diff --git a/expect-5.45-fd-leak.patch b/expect-5.45-fd-leak.patch new file mode 100644 index 0000000..459a1f6 --- /dev/null +++ b/expect-5.45-fd-leak.patch @@ -0,0 +1,12 @@ +diff -up expect5.45/exp_clib.c.orig expect5.45/exp_clib.c +--- expect5.45/exp_command.c.orig 2014-09-04 12:12:21.075837835 +0200 ++++ expect5.45/exp_command.c 2014-09-04 12:13:39.098593465 +0200 +@@ -1161,7 +1161,7 @@ Exp_SpawnObjCmd( + /* if stty finds dev(stderr) != dev(stdout) */ + + /* save error fd while we're setting up new one */ +- errorfd = fcntl(2,F_DUPFD,3); ++ errorfd = fcntl(2,F_DUPFD_CLOEXEC,3); + /* and here is the macro to restore it */ + #define restore_error_fd {close(2);fcntl(errorfd,F_DUPFD,2);} + diff --git a/expect.spec b/expect.spec index 347d7b0..8ce234a 100644 --- a/expect.spec +++ b/expect.spec @@ -5,7 +5,7 @@ Summary: A program-script interaction and testing utility Name: expect Version: %{majorver} -Release: 17%{?dist} +Release: 18%{?dist} License: Public Domain Group: Development/Languages # URL: probably more useful is http://sourceforge.net/projects/expect/ @@ -28,6 +28,8 @@ Patch5: expect-5.45-exp-log-buf-overflow.patch # Patch6: fixes segfaults if Tcl is built with stubs and Expect is used directly # from C program rhbz#1091060 Patch6: expect-5.45-segfault-with-stubs.patch +# Patch7: fixes leaked fd, patch by Matej Mužila, rhbz#1001220 +Patch7: expect-5.45-fd-leak.patch # examples patches # Patch100: changes random function Patch100: expect-5.32.2-random.patch @@ -88,6 +90,7 @@ of expectk. %patch4 -p1 -b .re-memleak %patch5 -p1 -b .exp-log-buf-overflow %patch6 -p1 -b .segfault-with-stubs +%patch7 -p1 -b .fd-leak # examples fixes %patch100 -p1 -b .random %patch101 -p1 -b .mkpasswd-dash @@ -177,6 +180,10 @@ rm -rf "$RPM_BUILD_ROOT" %{_mandir}/man1/tknewsbiff.1* %changelog +* Tue Sep 09 2014 Vitezslav Crhonek - 5.45-18 +- Fix leaked fd (patch by Matej Mužila) + Resolves: #1001220 + * Sat Aug 16 2014 Fedora Release Engineering - 5.45-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild