rpms/util-linux/devel util-linux-2.13-more-CLOEXEC.patch, NONE, 1.1 util-linux.spec, 1.146, 1.147
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Thu Dec 14 13:18:18 UTC 2006
Author: kzak
Update of /cvs/dist/rpms/util-linux/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv11554
Modified Files:
util-linux.spec
Added Files:
util-linux-2.13-more-CLOEXEC.patch
Log Message:
added missing patch
util-linux-2.13-more-CLOEXEC.patch:
more.c | 1 +
1 files changed, 1 insertion(+)
--- NEW FILE util-linux-2.13-more-CLOEXEC.patch ---
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 at 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);
Index: util-linux.spec
===================================================================
RCS file: /cvs/dist/rpms/util-linux/devel/util-linux.spec,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -r1.146 -r1.147
--- util-linux.spec 14 Dec 2006 12:42:01 -0000 1.146
+++ util-linux.spec 14 Dec 2006 13:18:16 -0000 1.147
@@ -235,6 +235,8 @@
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 @@
%patch257 -p1
%patch258 -p1
%patch259 -p1
+%patch260 -p1
%build
unset LINGUAS || :
@@ -744,6 +747,7 @@
%changelog
* Wed Dec 13 2006 Karel Zak <kzak at 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
More information about the fedora-cvs-commits
mailing list