added missing patch

This commit is contained in:
kzak 2006-12-14 13:18:16 +00:00
parent 894b42f522
commit c71c6e5c1f
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,19 @@
When you view a file with the more command and run a shell, the file descriptor
for reading the file is leaked to that process.
To test, more any file. Then do !/bin/sh. At the prompt do "ls -l /proc/$$/fd"
and you'll see the leaked fd.
From: Steve Grubb <sgrubb@redhat.com>
--- util-linux-2.13-pre7/text-utils/more.c.cloexec 2006-12-14 14:05:31.000000000 +0100
+++ util-linux-2.13-pre7/text-utils/more.c 2006-12-14 14:04:57.000000000 +0100
@@ -478,6 +478,7 @@
}
if (magic(f, fs))
return((FILE *)NULL);
+ fcntl(fileno(f), F_SETFD, FD_CLOEXEC );
c = Getc(f);
*clearfirst = (c == '\f');
Ungetc (c, f);

View File

@ -235,6 +235,8 @@ Patch257: util-linux-2.13-raw-raw0.patch
Patch258: util-linux-2.13-mkdir_p.patch
# 218915 - fdisk -b 4K
Patch259: util-linux-2.13-fdisk-b-4096.patch
# leaking file descriptor
Patch260: util-linux-2.13-more-CLOEXEC.patch
# When adding patches, please make sure that it is easy to find out what bug # the
# patch fixes.
@ -333,6 +335,7 @@ cp %{SOURCE8} %{SOURCE9} .
%patch257 -p1
%patch258 -p1
%patch259 -p1
%patch260 -p1
%build
unset LINGUAS || :
@ -744,6 +747,7 @@ exit 0
%changelog
* Wed Dec 13 2006 Karel Zak <kzak@redhat.com> 2.13-0.45
- fix leaking file descriptor in the more command (patch by Steve Grubb)
- use ncurses only
- fix #218915 - fdisk -b 4K
- upgrade to -pre7 release