1 diff -Nur rpm-4.0.2.orig/lib/rpminstall.c rpm-4.0.2/lib/rpminstall.c
2 --- rpm-4.0.2.orig/lib/rpminstall.c Sat Feb 10 15:07:16 2001
3 +++ rpm-4.0.2/lib/rpminstall.c Sun Sep 9 00:33:52 2001
5 case RPMCALLBACK_INST_OPEN_FILE:
6 fd = Fopen(filename, "r.ufdio");
7 fd = fdLink(fd, "persist (showProgress)");
9 + int oldfl=Fcntl(fd, F_GETFD, 0);
11 + oldfl |= FD_CLOEXEC; /* scripts shouldn't inherit rpm file descriptor */
12 + Fcntl(fd, F_SETFD, oldfl);
17 case RPMCALLBACK_INST_CLOSE_FILE:
18 diff -Nur rpm-4.0.2.orig/lib/uninstall.c rpm-4.0.2/lib/uninstall.c
19 --- rpm-4.0.2.orig/lib/uninstall.c Mon Jan 22 16:59:13 2001
20 +++ rpm-4.0.2/lib/uninstall.c Sat Sep 8 23:58:22 2001
22 if (Fileno(ts->scriptFd) > STDERR_FILENO) {
23 Fclose (ts->scriptFd);
26 + if (Fileno(out) > STDERR_FILENO)
30 { const char *ipath = rpmExpand("PATH=%{_install_script_path}", NULL);