X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;ds=sidebyside;f=rpm-scripts-closefds.patch;h=6be392ec7792856753674b5bbf1d6909a4e4d0dd;hb=bdac93ae5c511c361c946514bfb82be326aa7296;hp=a3b72d890330903aaaa3ee659dd2789f0ada9fb1;hpb=5b0f0ac9a55211821b0778001221c01854a2e4d2;p=packages%2Frpm.git diff --git a/rpm-scripts-closefds.patch b/rpm-scripts-closefds.patch index a3b72d8..6be392e 100644 --- a/rpm-scripts-closefds.patch +++ b/rpm-scripts-closefds.patch @@ -1,19 +1,28 @@ ---- rpm-4.1/lib/rpminstall.c.wiget Mon Sep 16 21:06:08 2002 -+++ rpm-4.1/lib/rpminstall.c Thu Sep 19 00:03:36 2002 -@@ -126,8 +126,15 @@ - xx = Fclose(fd); +--- rpm-4.16.0/lib/rpminstall.c.orig 2020-05-28 12:04:25.040136702 +0200 ++++ rpm-4.16.0/lib/rpminstall.c 2020-10-03 09:46:49.369707250 +0200 +@@ -4,6 +4,8 @@ + + #include "system.h" + ++#include ++ + #include + #include + #include /* rpmReadPackageFile, vercmp etc */ +@@ -114,8 +116,15 @@ + Fclose(fd); fd = NULL; } - } else + } else { -+ int oldfl; - fd = fdLink(fd, "persist (showProgress)"); ++ long oldfl; + fd = fdLink(fd); + oldfl=Fcntl(fd, F_GETFD, 0); + if(oldfl >= 0) { + oldfl |= FD_CLOEXEC; /* scripts shouldn't inherit rpm file descriptor */ -+ Fcntl(fd, F_SETFD, oldfl); ++ Fcntl(fd, F_SETFD, (void*)oldfl); + } + } - /*@=type@*/ - return fd; - /*@notreached@*/ break; + return (void *)fd; + break; +