linux/usr
Jesper Juhl 96aebafa63 gen_init_cpio: Avoid race between call to stat() and call to open()
In usr/gen_init_cpio.c::cpio_mkfile() a call to stat() is made based on
pathname, subsequently the file is open()'ed and then the value of the
initial stat() call is used to allocate a buffer. This is not safe since
the file may change between the call to stat() and the call to open().
Safer to just open() the file and then do fstat() using the filedescriptor
returned by open.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-29 15:06:54 +01:00
..
.gitignore gitignore usr/initramfs_data.cpio.bz2 and usr/initramfs_data.cpio.lzma 2009-09-20 12:27:42 +02:00
gen_init_cpio.c gen_init_cpio: Avoid race between call to stat() and call to open() 2010-12-29 15:06:54 +01:00
initramfs_data.S initramfs: Fix initramfs size for 32-bit arches 2010-10-31 06:35:14 -07:00
Kconfig Kconfig: delete duplicate word 2010-08-23 15:35:15 +02:00
Makefile initramfs: generalize initramfs_data.xxx.S variants 2010-09-29 16:28:59 +02:00