* Tue Jan 01 2008 Eric Sandeen <esandeen@redhat.com> 1.40.4-1
- New upstream version, drop several now-upstream patches.
This commit is contained in:
parent
6260bb65df
commit
95bee9b790
@ -40,15 +40,15 @@
|
|||||||
If not specified it will be the same file as that given by the
|
If not specified it will be the same file as that given by the
|
||||||
--- e2fsprogs-1.38/misc/blkid.c.etcblkid 2006-03-08 15:02:39.000000000 -0500
|
--- e2fsprogs-1.38/misc/blkid.c.etcblkid 2006-03-08 15:02:39.000000000 -0500
|
||||||
+++ e2fsprogs-1.38/misc/blkid.c 2006-03-08 15:04:19.000000000 -0500
|
+++ e2fsprogs-1.38/misc/blkid.c 2006-03-08 15:04:19.000000000 -0500
|
||||||
@@ -39,7 +39,7 @@
|
@@ -40,7 +40,7 @@ static void usage(int error)
|
||||||
fprintf(out,
|
fprintf(out,
|
||||||
"usage:\t%s [-c <file>] [-hl] [-o format] "
|
"usage:\t%s [-c <file>] [-ghl] [-o format] "
|
||||||
"[-s <tag>] [-t <token>]\n [-v] [-w <file>] [dev ...]\n"
|
"[-s <tag>] [-t <token>]\n [-v] [-w <file>] [dev ...]\n"
|
||||||
- "\t-c\tcache file (default: /etc/blkid.tab, /dev/null = none)\n"
|
- "\t-c\tcache file (default: /etc/blkid.tab, /dev/null = none)\n"
|
||||||
+ "\t-c\tcache file (default: /etc/blkid/blkid.tab, /dev/null = none)\n"
|
+ "\t-c\tcache file (default: /etc/blkid/blkid.tab, /dev/null = none)\n"
|
||||||
"\t-h\tprint this usage message and exit\n"
|
"\t-h\tprint this usage message and exit\n"
|
||||||
|
"\t-g\tgarbage collect the blkid cache\n"
|
||||||
"\t-s\tshow specified tag(s) (default show all tags)\n"
|
"\t-s\tshow specified tag(s) (default show all tags)\n"
|
||||||
"\t-t\tfind device with a specific token (NAME=value pair)\n"
|
|
||||||
--- e2fsprogs-1.38/lib/blkid/Makefile.in.etcblkid 2006-03-08 15:04:56.000000000 -0500
|
--- e2fsprogs-1.38/lib/blkid/Makefile.in.etcblkid 2006-03-08 15:04:56.000000000 -0500
|
||||||
+++ e2fsprogs-1.38/lib/blkid/Makefile.in 2006-03-08 15:05:59.000000000 -0500
|
+++ e2fsprogs-1.38/lib/blkid/Makefile.in 2006-03-08 15:05:59.000000000 -0500
|
||||||
@@ -129,9 +129,10 @@
|
@@ -129,9 +129,10 @@
|
||||||
|
@ -89,13 +89,13 @@
|
|||||||
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
|
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
|
||||||
--- e2fsprogs-1.39/misc/Makefile.in.mkinstalldirs 2006-12-25 23:04:27.000000000 +0100
|
--- e2fsprogs-1.39/misc/Makefile.in.mkinstalldirs 2006-12-25 23:04:27.000000000 +0100
|
||||||
+++ e2fsprogs-1.39/misc/Makefile.in 2006-12-25 23:04:27.000000000 +0100
|
+++ e2fsprogs-1.39/misc/Makefile.in 2006-12-25 23:04:27.000000000 +0100
|
||||||
@@ -223,8 +223,8 @@
|
@@ -246,8 +246,8 @@ filefrag.8: $(DEP_SUBSTITUTE) $(srcdir)/
|
||||||
@$(SUBSTITUTE_UPTIME) $(srcdir)/filefrag.8.in filefrag.8
|
@$(SUBSTITUTE_UPTIME) $(srcdir)/filefrag.8.in filefrag.8
|
||||||
|
|
||||||
installdirs:
|
installdirs:
|
||||||
- @echo " MKINSTALLDIRS $(sbindir) $(root_sbindir) $(bindir) $(man1dir) $(man8dir) $(libdir)"
|
- @echo " MKINSTALLDIRS $(sbindir) $(root_sbindir) $(bindir) $(man1dir) $(man8dir) $(libdir) $(root_sysconfdir)"
|
||||||
- @$(MKINSTALLDIRS) $(DESTDIR)$(sbindir) \
|
- @$(MKINSTALLDIRS) $(DESTDIR)$(sbindir) \
|
||||||
+ @echo " MKDIR_P $(sbindir) $(root_sbindir) $(bindir) $(man1dir) $(man8dir) $(libdir)"
|
+ @echo " MKDIR_P $(sbindir) $(root_sbindir) $(bindir) $(man1dir) $(man8dir) $(libdir) $(root_sysconfdir)"
|
||||||
+ @$(MKDIR_P) $(DESTDIR)$(sbindir) \
|
+ @$(MKDIR_P) $(DESTDIR)$(sbindir) \
|
||||||
$(DESTDIR)$(root_sbindir) $(DESTDIR)$(bindir) \
|
$(DESTDIR)$(root_sbindir) $(DESTDIR)$(bindir) \
|
||||||
$(DESTDIR)$(man1dir) $(DESTDIR)$(man8dir) \
|
$(DESTDIR)$(man1dir) $(DESTDIR)$(man8dir) \
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
From: Theodore Ts'o <tytso@mit.edu>
|
|
||||||
Date: Sun, 23 Sep 2007 13:50:11 +0000 (-0400)
|
|
||||||
Subject: libblkid: Add more magic numbers that might mean there is a FAT filesystem
|
|
||||||
X-Git-Url: http://git.kernel.org/?p=fs%2Fext2%2Fe2fsprogs.git;a=commitdiff_plain;h=846be6db813895c354cc54beaa8fa6aba8d98085
|
|
||||||
|
|
||||||
libblkid: Add more magic numbers that might mean there is a FAT filesystem
|
|
||||||
|
|
||||||
The FAT filesystem doesn't have its superblock with a set of magic
|
|
||||||
strings in a fixed location. Therefore, we must also check for the
|
|
||||||
FAT filesystem if it looks like we have an MBR at the beginning of the
|
|
||||||
partition. We previously checked if the first byte was a jump
|
|
||||||
instruction but that missed some USB disks with only one bootable
|
|
||||||
partition. Now we check for the MBR signature (0x55AA at offset 510)
|
|
||||||
as well as any partition where byte 0 is \351 or \353.
|
|
||||||
|
|
||||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
||||||
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
||||||
---
|
|
||||||
|
|
||||||
diff --git a/lib/blkid/probe.c b/lib/blkid/probe.c
|
|
||||||
index 69a43b0..5c20127 100644
|
|
||||||
--- a/lib/blkid/probe.c
|
|
||||||
+++ b/lib/blkid/probe.c
|
|
||||||
@@ -846,8 +846,9 @@ static struct blkid_magic type_array[] = {
|
|
||||||
{ "vfat", 0, 0x36, 5, "MSDOS", probe_fat },
|
|
||||||
{ "vfat", 0, 0x36, 8, "FAT16 ", probe_fat },
|
|
||||||
{ "vfat", 0, 0x36, 8, "FAT12 ", probe_fat },
|
|
||||||
- { "vfat", 0, 0, 2, "\353\220", probe_fat_nomagic },
|
|
||||||
+ { "vfat", 0, 0, 1, "\353", probe_fat_nomagic },
|
|
||||||
{ "vfat", 0, 0, 1, "\351", probe_fat_nomagic },
|
|
||||||
+ { "vfat", 0, 0x1fe, 2, "\125\252", probe_fat_nomagic },
|
|
||||||
{ "minix", 1, 0x10, 2, "\177\023", 0 },
|
|
||||||
{ "minix", 1, 0x10, 2, "\217\023", 0 },
|
|
||||||
{ "minix", 1, 0x10, 2, "\150\044", 0 },
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
Sent to linux-ext4 list on 25 Sep 2007.
|
|
||||||
|
|
||||||
libblkid: recognize squashfs filesystems
|
|
||||||
|
|
||||||
squashfs has no uuid or labels, so all we need is the magic.
|
|
||||||
|
|
||||||
Addresses-Red-Hat-Bugzilla: #305151
|
|
||||||
|
|
||||||
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
|
|
||||||
|
|
||||||
Index: e2fsprogs-1.40.2/lib/blkid/probe.c
|
|
||||||
===================================================================
|
|
||||||
--- e2fsprogs-1.40.2.orig/lib/blkid/probe.c
|
|
||||||
+++ e2fsprogs-1.40.2/lib/blkid/probe.c
|
|
||||||
@@ -898,6 +898,8 @@ static struct blkid_magic type_array[] =
|
|
||||||
{ "ocfs2", 4, 0, 6, "OCFSV2", probe_ocfs2 },
|
|
||||||
{ "ocfs2", 8, 0, 6, "OCFSV2", probe_ocfs2 },
|
|
||||||
{ "crypt_LUKS", 0, 0, 6, "LUKS\xba\xbe", probe_luks },
|
|
||||||
+ { "squashfs", 0, 0, 4, "sqsh", 0 },
|
|
||||||
+ { "squashfs", 0, 0, 4, "hsqs", 0 },
|
|
||||||
{ NULL, 0, 0, 0, NULL, NULL }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
Index: e2fsprogs-1.40.2/lib/ext2fs/ismounted.c
|
|
||||||
===================================================================
|
|
||||||
--- e2fsprogs-1.40.2.orig/lib/ext2fs/ismounted.c
|
|
||||||
+++ e2fsprogs-1.40.2/lib/ext2fs/ismounted.c
|
|
||||||
@@ -147,7 +147,7 @@ static errcode_t check_mntent_file(const
|
|
||||||
is_root:
|
|
||||||
#define TEST_FILE "/.ismount-test-file"
|
|
||||||
*mount_flags |= EXT2_MF_ISROOT;
|
|
||||||
- fd = open(TEST_FILE, O_RDWR|O_CREAT);
|
|
||||||
+ fd = open(TEST_FILE, O_RDWR|O_CREAT, 0644);
|
|
||||||
if (fd < 0) {
|
|
||||||
if (errno == EROFS)
|
|
||||||
*mount_flags |= EXT2_MF_READONLY;
|
|
@ -1,322 +0,0 @@
|
|||||||
From ee01079a17bfecd17292ccd60058056fb3a8ba6c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Theodore Ts'o <tytso@mit.edu>
|
|
||||||
Date: Fri, 9 Nov 2007 19:01:06 -0500
|
|
||||||
Subject: [PATCH] libext2fs: Add checks to prevent integer overflows passed to malloc()
|
|
||||||
|
|
||||||
This addresses a potential security vulnerability where an untrusted
|
|
||||||
filesystem can be corrupted in such a way that a program using
|
|
||||||
libext2fs will allocate a buffer which is far too small. This can
|
|
||||||
lead to either a crash or potentially a heap-based buffer overflow
|
|
||||||
crash. No known exploits exist, but main concern is where an
|
|
||||||
untrusted user who possesses privileged access in a guest Xen
|
|
||||||
environment could corrupt a filesystem which is then accessed by the
|
|
||||||
pygrub program, running as root in the dom0 host environment, thus
|
|
||||||
allowing the untrusted user to gain privileged access in the host OS.
|
|
||||||
|
|
||||||
Thanks to the McAfee AVERT Research group for reporting this issue.
|
|
||||||
|
|
||||||
Addresses CVE-2007-5497.
|
|
||||||
|
|
||||||
Signed-off-by: Rafal Wojtczuk <rafal_wojtczuk@mcafee.com>
|
|
||||||
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
||||||
---
|
|
||||||
lib/ext2fs/badblocks.c | 2 +-
|
|
||||||
lib/ext2fs/bb_inode.c | 2 +-
|
|
||||||
lib/ext2fs/block.c | 2 +-
|
|
||||||
lib/ext2fs/bmap.c | 2 +-
|
|
||||||
lib/ext2fs/bmove.c | 2 +-
|
|
||||||
lib/ext2fs/brel_ma.c | 3 ++-
|
|
||||||
lib/ext2fs/closefs.c | 3 +--
|
|
||||||
lib/ext2fs/dblist.c | 3 ++-
|
|
||||||
lib/ext2fs/dupfs.c | 2 +-
|
|
||||||
lib/ext2fs/ext2fs.h | 7 +++++++
|
|
||||||
lib/ext2fs/fileio.c | 2 +-
|
|
||||||
lib/ext2fs/icount.c | 3 ++-
|
|
||||||
lib/ext2fs/initialize.c | 2 +-
|
|
||||||
lib/ext2fs/inode.c | 10 +++++-----
|
|
||||||
lib/ext2fs/irel_ma.c | 12 ++++++++----
|
|
||||||
lib/ext2fs/openfs.c | 2 +-
|
|
||||||
lib/ext2fs/res_gdt.c | 2 +-
|
|
||||||
17 files changed, 37 insertions(+), 24 deletions(-)
|
|
||||||
|
|
||||||
Index: e2fsprogs-1.40.2/lib/ext2fs/badblocks.c
|
|
||||||
===================================================================
|
|
||||||
--- e2fsprogs-1.40.2.orig/lib/ext2fs/badblocks.c
|
|
||||||
+++ e2fsprogs-1.40.2/lib/ext2fs/badblocks.c
|
|
||||||
@@ -42,7 +42,7 @@ static errcode_t make_u32_list(int size,
|
|
||||||
bb->magic = EXT2_ET_MAGIC_BADBLOCKS_LIST;
|
|
||||||
bb->size = size ? size : 10;
|
|
||||||
bb->num = num;
|
|
||||||
- retval = ext2fs_get_mem(bb->size * sizeof(blk_t), &bb->list);
|
|
||||||
+ retval = ext2fs_get_array(bb->size, sizeof(blk_t), &bb->list);
|
|
||||||
if (retval) {
|
|
||||||
ext2fs_free_mem(&bb);
|
|
||||||
return retval;
|
|
||||||
Index: e2fsprogs-1.40.2/lib/ext2fs/bb_inode.c
|
|
||||||
===================================================================
|
|
||||||
--- e2fsprogs-1.40.2.orig/lib/ext2fs/bb_inode.c
|
|
||||||
+++ e2fsprogs-1.40.2/lib/ext2fs/bb_inode.c
|
|
||||||
@@ -68,7 +68,7 @@ errcode_t ext2fs_update_bb_inode(ext2_fi
|
|
||||||
rec.bad_block_count = 0;
|
|
||||||
rec.ind_blocks_size = rec.ind_blocks_ptr = 0;
|
|
||||||
rec.max_ind_blocks = 10;
|
|
||||||
- retval = ext2fs_get_mem(rec.max_ind_blocks * sizeof(blk_t),
|
|
||||||
+ retval = ext2fs_get_array(rec.max_ind_blocks, sizeof(blk_t),
|
|
||||||
&rec.ind_blocks);
|
|
||||||
if (retval)
|
|
||||||
return retval;
|
|
||||||
Index: e2fsprogs-1.40.2/lib/ext2fs/block.c
|
|
||||||
===================================================================
|
|
||||||
--- e2fsprogs-1.40.2.orig/lib/ext2fs/block.c
|
|
||||||
+++ e2fsprogs-1.40.2/lib/ext2fs/block.c
|
|
||||||
@@ -313,7 +313,7 @@ errcode_t ext2fs_block_iterate2(ext2_fil
|
|
||||||
if (block_buf) {
|
|
||||||
ctx.ind_buf = block_buf;
|
|
||||||
} else {
|
|
||||||
- retval = ext2fs_get_mem(fs->blocksize * 3, &ctx.ind_buf);
|
|
||||||
+ retval = ext2fs_get_array(3, fs->blocksize, &ctx.ind_buf);
|
|
||||||
if (retval)
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
Index: e2fsprogs-1.40.2/lib/ext2fs/bmap.c
|
|
||||||
===================================================================
|
|
||||||
--- e2fsprogs-1.40.2.orig/lib/ext2fs/bmap.c
|
|
||||||
+++ e2fsprogs-1.40.2/lib/ext2fs/bmap.c
|
|
||||||
@@ -158,7 +158,7 @@ errcode_t ext2fs_bmap(ext2_filsys fs, ex
|
|
||||||
addr_per_block = (blk_t) fs->blocksize >> 2;
|
|
||||||
|
|
||||||
if (!block_buf) {
|
|
||||||
- retval = ext2fs_get_mem(fs->blocksize * 2, &buf);
|
|
||||||
+ retval = ext2fs_get_array(2, fs->blocksize, &buf);
|
|
||||||
if (retval)
|
|
||||||
return retval;
|
|
||||||
block_buf = buf;
|
|
||||||
Index: e2fsprogs-1.40.2/lib/ext2fs/bmove.c
|
|
||||||
===================================================================
|
|
||||||
--- e2fsprogs-1.40.2.orig/lib/ext2fs/bmove.c
|
|
||||||
+++ e2fsprogs-1.40.2/lib/ext2fs/bmove.c
|
|
||||||
@@ -108,7 +108,7 @@ errcode_t ext2fs_move_blocks(ext2_filsys
|
|
||||||
pb.alloc_map = alloc_map ? alloc_map : fs->block_map;
|
|
||||||
pb.flags = flags;
|
|
||||||
|
|
||||||
- retval = ext2fs_get_mem(fs->blocksize * 4, &block_buf);
|
|
||||||
+ retval = ext2fs_get_array(4, fs->blocksize, &block_buf);
|
|
||||||
if (retval)
|
|
||||||
return retval;
|
|
||||||
pb.buf = block_buf + fs->blocksize * 3;
|
|
||||||
Index: e2fsprogs-1.40.2/lib/ext2fs/brel_ma.c
|
|
||||||
===================================================================
|
|
||||||
--- e2fsprogs-1.40.2.orig/lib/ext2fs/brel_ma.c
|
|
||||||
+++ e2fsprogs-1.40.2/lib/ext2fs/brel_ma.c
|
|
||||||
@@ -75,7 +75,8 @@ errcode_t ext2fs_brel_memarray_create(ch
|
|
||||||
|
|
||||||
size = (size_t) (sizeof(struct ext2_block_relocate_entry) *
|
|
||||||
(max_block+1));
|
|
||||||
- retval = ext2fs_get_mem(size, &ma->entries);
|
|
||||||
+ retval = ext2fs_get_array(max_block+1,
|
|
||||||
+ sizeof(struct ext2_block_relocate_entry), &ma->entries);
|
|
||||||
if (retval)
|
|
||||||
goto errout;
|
|
||||||
memset(ma->entries, 0, size);
|
|
||||||
Index: e2fsprogs-1.40.2/lib/ext2fs/closefs.c
|
|
||||||
===================================================================
|
|
||||||
--- e2fsprogs-1.40.2.orig/lib/ext2fs/closefs.c
|
|
||||||
+++ e2fsprogs-1.40.2/lib/ext2fs/closefs.c
|
|
||||||
@@ -226,8 +226,7 @@ errcode_t ext2fs_flush(ext2_filsys fs)
|
|
||||||
retval = ext2fs_get_mem(SUPERBLOCK_SIZE, &super_shadow);
|
|
||||||
if (retval)
|
|
||||||
goto errout;
|
|
||||||
- retval = ext2fs_get_mem((size_t)(fs->blocksize *
|
|
||||||
- fs->desc_blocks),
|
|
||||||
+ retval = ext2fs_get_array(fs->blocksize, fs->desc_blocks,
|
|
||||||
&group_shadow);
|
|
||||||
if (retval)
|
|
||||||
goto errout;
|
|
||||||
Index: e2fsprogs-1.40.2/lib/ext2fs/dblist.c
|
|
||||||
===================================================================
|
|
||||||
--- e2fsprogs-1.40.2.orig/lib/ext2fs/dblist.c
|
|
||||||
+++ e2fsprogs-1.40.2/lib/ext2fs/dblist.c
|
|
||||||
@@ -85,7 +85,8 @@ static errcode_t make_dblist(ext2_filsys
|
|
||||||
}
|
|
||||||
len = (size_t) sizeof(struct ext2_db_entry) * dblist->size;
|
|
||||||
dblist->count = count;
|
|
||||||
- retval = ext2fs_get_mem(len, &dblist->list);
|
|
||||||
+ retval = ext2fs_get_array(dblist->size, sizeof(struct ext2_db_entry),
|
|
||||||
+ &dblist->list);
|
|
||||||
if (retval)
|
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
Index: e2fsprogs-1.40.2/lib/ext2fs/dupfs.c
|
|
||||||
===================================================================
|
|
||||||
--- e2fsprogs-1.40.2.orig/lib/ext2fs/dupfs.c
|
|
||||||
+++ e2fsprogs-1.40.2/lib/ext2fs/dupfs.c
|
|
||||||
@@ -59,7 +59,7 @@ errcode_t ext2fs_dup_handle(ext2_filsys
|
|
||||||
goto errout;
|
|
||||||
memcpy(fs->orig_super, src->orig_super, SUPERBLOCK_SIZE);
|
|
||||||
|
|
||||||
- retval = ext2fs_get_mem((size_t) fs->desc_blocks * fs->blocksize,
|
|
||||||
+ retval = ext2fs_get_array(fs->desc_blocks, fs->blocksize,
|
|
||||||
&fs->group_desc);
|
|
||||||
if (retval)
|
|
||||||
goto errout;
|
|
||||||
Index: e2fsprogs-1.40.2/lib/ext2fs/ext2fs.h
|
|
||||||
===================================================================
|
|
||||||
--- e2fsprogs-1.40.2.orig/lib/ext2fs/ext2fs.h
|
|
||||||
+++ e2fsprogs-1.40.2/lib/ext2fs/ext2fs.h
|
|
||||||
@@ -965,6 +965,7 @@ extern errcode_t ext2fs_write_bb_FILE(ex
|
|
||||||
|
|
||||||
/* inline functions */
|
|
||||||
extern errcode_t ext2fs_get_mem(unsigned long size, void *ptr);
|
|
||||||
+extern errcode_t ext2fs_get_array(unsigned long count, unsigned long size, void *ptr);
|
|
||||||
extern errcode_t ext2fs_free_mem(void *ptr);
|
|
||||||
extern errcode_t ext2fs_resize_mem(unsigned long old_size,
|
|
||||||
unsigned long size, void *ptr);
|
|
||||||
@@ -1018,6 +1019,12 @@ _INLINE_ errcode_t ext2fs_get_mem(unsign
|
|
||||||
memcpy(ptr, &pp, sizeof (pp));
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
+_INLINE_ errcode_t ext2fs_get_array(unsigned long count, unsigned long size, void *ptr)
|
|
||||||
+{
|
|
||||||
+ if (count && (-1UL)/count<size)
|
|
||||||
+ return EXT2_ET_NO_MEMORY; //maybe define EXT2_ET_OVERFLOW ?
|
|
||||||
+ return ext2fs_get_mem(count*size, ptr);
|
|
||||||
+}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Free memory
|
|
||||||
Index: e2fsprogs-1.40.2/lib/ext2fs/fileio.c
|
|
||||||
===================================================================
|
|
||||||
--- e2fsprogs-1.40.2.orig/lib/ext2fs/fileio.c
|
|
||||||
+++ e2fsprogs-1.40.2/lib/ext2fs/fileio.c
|
|
||||||
@@ -65,7 +65,7 @@ errcode_t ext2fs_file_open2(ext2_filsys
|
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
|
|
||||||
- retval = ext2fs_get_mem(fs->blocksize * 3, &file->buf);
|
|
||||||
+ retval = ext2fs_get_array(3, fs->blocksize, &file->buf);
|
|
||||||
if (retval)
|
|
||||||
goto fail;
|
|
||||||
|
|
||||||
Index: e2fsprogs-1.40.2/lib/ext2fs/icount.c
|
|
||||||
===================================================================
|
|
||||||
--- e2fsprogs-1.40.2.orig/lib/ext2fs/icount.c
|
|
||||||
+++ e2fsprogs-1.40.2/lib/ext2fs/icount.c
|
|
||||||
@@ -237,7 +237,8 @@ errcode_t ext2fs_create_icount2(ext2_fil
|
|
||||||
printf("Icount allocated %u entries, %d bytes.\n",
|
|
||||||
icount->size, bytes);
|
|
||||||
#endif
|
|
||||||
- retval = ext2fs_get_mem(bytes, &icount->list);
|
|
||||||
+ retval = ext2fs_get_array(icount->size, sizeof(struct ext2_icount_el),
|
|
||||||
+ &icount->list);
|
|
||||||
if (retval)
|
|
||||||
goto errout;
|
|
||||||
memset(icount->list, 0, bytes);
|
|
||||||
Index: e2fsprogs-1.40.2/lib/ext2fs/initialize.c
|
|
||||||
===================================================================
|
|
||||||
--- e2fsprogs-1.40.2.orig/lib/ext2fs/initialize.c
|
|
||||||
+++ e2fsprogs-1.40.2/lib/ext2fs/initialize.c
|
|
||||||
@@ -349,7 +349,7 @@ ipg_retry:
|
|
||||||
|
|
||||||
ext2fs_free_mem(&buf);
|
|
||||||
|
|
||||||
- retval = ext2fs_get_mem((size_t) fs->desc_blocks * fs->blocksize,
|
|
||||||
+ retval = ext2fs_get_array(fs->desc_blocks, fs->blocksize,
|
|
||||||
&fs->group_desc);
|
|
||||||
if (retval)
|
|
||||||
goto cleanup;
|
|
||||||
Index: e2fsprogs-1.40.2/lib/ext2fs/inode.c
|
|
||||||
===================================================================
|
|
||||||
--- e2fsprogs-1.40.2.orig/lib/ext2fs/inode.c
|
|
||||||
+++ e2fsprogs-1.40.2/lib/ext2fs/inode.c
|
|
||||||
@@ -90,9 +90,9 @@ static errcode_t create_icache(ext2_fils
|
|
||||||
fs->icache->cache_last = -1;
|
|
||||||
fs->icache->cache_size = 4;
|
|
||||||
fs->icache->refcount = 1;
|
|
||||||
- retval = ext2fs_get_mem(sizeof(struct ext2_inode_cache_ent)
|
|
||||||
- * fs->icache->cache_size,
|
|
||||||
- &fs->icache->cache);
|
|
||||||
+ retval = ext2fs_get_array(fs->icache->cache_size,
|
|
||||||
+ sizeof(struct ext2_inode_cache_ent),
|
|
||||||
+ &fs->icache->cache);
|
|
||||||
if (retval) {
|
|
||||||
ext2fs_free_mem(&fs->icache->buffer);
|
|
||||||
ext2fs_free_mem(&fs->icache);
|
|
||||||
@@ -146,8 +146,8 @@ errcode_t ext2fs_open_inode_scan(ext2_fi
|
|
||||||
group_desc[scan->current_group].bg_inode_table;
|
|
||||||
scan->inodes_left = EXT2_INODES_PER_GROUP(scan->fs->super);
|
|
||||||
scan->blocks_left = scan->fs->inode_blocks_per_group;
|
|
||||||
- retval = ext2fs_get_mem((size_t) (scan->inode_buffer_blocks *
|
|
||||||
- fs->blocksize),
|
|
||||||
+ retval = ext2fs_get_array(scan->inode_buffer_blocks,
|
|
||||||
+ fs->blocksize,
|
|
||||||
&scan->inode_buffer);
|
|
||||||
scan->done_group = 0;
|
|
||||||
scan->done_group_data = 0;
|
|
||||||
Index: e2fsprogs-1.40.2/lib/ext2fs/irel_ma.c
|
|
||||||
===================================================================
|
|
||||||
--- e2fsprogs-1.40.2.orig/lib/ext2fs/irel_ma.c
|
|
||||||
+++ e2fsprogs-1.40.2/lib/ext2fs/irel_ma.c
|
|
||||||
@@ -90,21 +90,24 @@ errcode_t ext2fs_irel_memarray_create(ch
|
|
||||||
irel->priv_data = ma;
|
|
||||||
|
|
||||||
size = (size_t) (sizeof(ext2_ino_t) * (max_inode+1));
|
|
||||||
- retval = ext2fs_get_mem(size, &ma->orig_map);
|
|
||||||
+ retval = ext2fs_get_array(max_inode+1, sizeof(ext2_ino_t),
|
|
||||||
+ &ma->orig_map);
|
|
||||||
if (retval)
|
|
||||||
goto errout;
|
|
||||||
memset(ma->orig_map, 0, size);
|
|
||||||
|
|
||||||
size = (size_t) (sizeof(struct ext2_inode_relocate_entry) *
|
|
||||||
(max_inode+1));
|
|
||||||
- retval = ext2fs_get_mem(size, &ma->entries);
|
|
||||||
+ retval = ext2fs_get_array((max_inode+1,
|
|
||||||
+ sizeof(struct ext2_inode_relocate_entry), &ma->entries);
|
|
||||||
if (retval)
|
|
||||||
goto errout;
|
|
||||||
memset(ma->entries, 0, size);
|
|
||||||
|
|
||||||
size = (size_t) (sizeof(struct inode_reference_entry) *
|
|
||||||
(max_inode+1));
|
|
||||||
- retval = ext2fs_get_mem(size, &ma->ref_entries);
|
|
||||||
+ retval = ext2fs_get_mem(max_inode+1,
|
|
||||||
+ sizeof(struct inode_reference_entry), &ma->ref_entries);
|
|
||||||
if (retval)
|
|
||||||
goto errout;
|
|
||||||
memset(ma->ref_entries, 0, size);
|
|
||||||
@@ -249,7 +252,8 @@ static errcode_t ima_add_ref(ext2_irel i
|
|
||||||
if (ref_ent->refs == 0) {
|
|
||||||
size = (size_t) ((sizeof(struct ext2_inode_reference) *
|
|
||||||
ent->max_refs));
|
|
||||||
- retval = ext2fs_get_mem(size, &ref_ent->refs);
|
|
||||||
+ retval = ext2fs_get_array(ent->max_refs,
|
|
||||||
+ sizeof(struct ext2_inode_reference), &ref_ent->refs);
|
|
||||||
if (retval)
|
|
||||||
return retval;
|
|
||||||
memset(ref_ent->refs, 0, size);
|
|
||||||
Index: e2fsprogs-1.40.2/lib/ext2fs/openfs.c
|
|
||||||
===================================================================
|
|
||||||
--- e2fsprogs-1.40.2.orig/lib/ext2fs/openfs.c
|
|
||||||
+++ e2fsprogs-1.40.2/lib/ext2fs/openfs.c
|
|
||||||
@@ -276,7 +276,7 @@ errcode_t ext2fs_open2(const char *name,
|
|
||||||
blocks_per_group);
|
|
||||||
fs->desc_blocks = ext2fs_div_ceil(fs->group_desc_count,
|
|
||||||
EXT2_DESC_PER_BLOCK(fs->super));
|
|
||||||
- retval = ext2fs_get_mem(fs->desc_blocks * fs->blocksize,
|
|
||||||
+ retval = ext2fs_get_array(fs->desc_blocks, fs->blocksize,
|
|
||||||
&fs->group_desc);
|
|
||||||
if (retval)
|
|
||||||
goto cleanup;
|
|
||||||
Index: e2fsprogs-1.40.2/lib/ext2fs/res_gdt.c
|
|
||||||
===================================================================
|
|
||||||
--- e2fsprogs-1.40.2.orig/lib/ext2fs/res_gdt.c
|
|
||||||
+++ e2fsprogs-1.40.2/lib/ext2fs/res_gdt.c
|
|
||||||
@@ -73,7 +73,7 @@ errcode_t ext2fs_create_resize_inode(ext
|
|
||||||
|
|
||||||
sb = fs->super;
|
|
||||||
|
|
||||||
- retval = ext2fs_get_mem(2 * fs->blocksize, &dindir_buf);
|
|
||||||
+ retval = ext2fs_get_array(2, fs->blocksize, &dindir_buf);
|
|
||||||
if (retval)
|
|
||||||
goto out_free;
|
|
||||||
gdt_buf = (__u32 *)((char *)dindir_buf + fs->blocksize);
|
|
@ -1,35 +0,0 @@
|
|||||||
From db9097caca17401313c0dc840b4ae683e5b5c1df Mon Sep 17 00:00:00 2001
|
|
||||||
From: Eric Sandeen <sandeen@redhat.com>
|
|
||||||
Date: Tue, 17 Jul 2007 20:40:25 -0500
|
|
||||||
Subject: [PATCH] Fix big-endian byte-swapping bug in ext2fs_swap_inode_full()
|
|
||||||
|
|
||||||
We need to set t->i_file_acl before we test it in
|
|
||||||
ext2fs_inode_data_blocks()
|
|
||||||
|
|
||||||
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
|
|
||||||
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
||||||
---
|
|
||||||
lib/ext2fs/swapfs.c | 2 +-
|
|
||||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/ext2fs/swapfs.c b/lib/ext2fs/swapfs.c
|
|
||||||
index a40caa9..6576c59 100644
|
|
||||||
--- a/lib/ext2fs/swapfs.c
|
|
||||||
+++ b/lib/ext2fs/swapfs.c
|
|
||||||
@@ -150,6 +150,7 @@ void ext2fs_swap_inode_full(ext2_filsys fs, struct ext2_inode_large *t,
|
|
||||||
t->i_dtime = ext2fs_swab32(f->i_dtime);
|
|
||||||
t->i_gid = ext2fs_swab16(f->i_gid);
|
|
||||||
t->i_links_count = ext2fs_swab16(f->i_links_count);
|
|
||||||
+ t->i_file_acl = ext2fs_swab32(f->i_file_acl);
|
|
||||||
if (hostorder)
|
|
||||||
has_data_blocks = ext2fs_inode_data_blocks(fs,
|
|
||||||
(struct ext2_inode *) f);
|
|
||||||
@@ -158,7 +159,6 @@ void ext2fs_swap_inode_full(ext2_filsys fs, struct ext2_inode_large *t,
|
|
||||||
has_data_blocks = ext2fs_inode_data_blocks(fs,
|
|
||||||
(struct ext2_inode *) t);
|
|
||||||
t->i_flags = ext2fs_swab32(f->i_flags);
|
|
||||||
- t->i_file_acl = ext2fs_swab32(f->i_file_acl);
|
|
||||||
t->i_dir_acl = ext2fs_swab32(f->i_dir_acl);
|
|
||||||
if (!islnk || has_data_blocks ) {
|
|
||||||
for (i = 0; i < EXT2_N_BLOCKS; i++)
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
|||||||
Index: e2fsprogs-1.40.2/misc/badblocks.c
|
|
||||||
===================================================================
|
|
||||||
--- e2fsprogs-1.40.2.orig/misc/badblocks.c
|
|
||||||
+++ e2fsprogs-1.40.2/misc/badblocks.c
|
|
||||||
@@ -992,7 +992,7 @@ int main (int argc, char ** argv)
|
|
||||||
last_block = strtoul (argv[optind], &tmp, 0);
|
|
||||||
printf("last_block = %d (%s)\n", last_block, argv[optind]);
|
|
||||||
if (*tmp || errno ||
|
|
||||||
- (last_block == ULONG_MAX && errno == ERANGE)) {
|
|
||||||
+ (last_block == UINT_MAX && errno == ERANGE)) {
|
|
||||||
com_err (program_name, 0, _("invalid blocks count - %s"),
|
|
||||||
argv[optind]);
|
|
||||||
exit (1);
|
|
||||||
@@ -1005,7 +1005,7 @@ int main (int argc, char ** argv)
|
|
||||||
from_count = strtoul (argv[optind], &tmp, 0);
|
|
||||||
printf("from_count = %d\n", from_count);
|
|
||||||
if (*tmp || errno ||
|
|
||||||
- (from_count == ULONG_MAX && errno == ERANGE)) {
|
|
||||||
+ (from_count == UINT_MAX && errno == ERANGE)) {
|
|
||||||
com_err (program_name, 0, _("invalid starting block - %s"),
|
|
||||||
argv[optind]);
|
|
||||||
exit (1);
|
|
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
Summary: Utilities for managing the second and third extended (ext2/ext3) filesystems
|
Summary: Utilities for managing the second and third extended (ext2/ext3) filesystems
|
||||||
Name: e2fsprogs
|
Name: e2fsprogs
|
||||||
Version: 1.40.2
|
Version: 1.40.4
|
||||||
Release: 15%{?dist}
|
Release: 1%{?dist}
|
||||||
# License based on upstream-modified COPYING file,
|
# License based on upstream-modified COPYING file,
|
||||||
# which clearly states "V2" intent.
|
# which clearly states "V2" intent.
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
@ -15,12 +15,6 @@ Source2: blkid_types-wrapper.h
|
|||||||
Patch34: e2fsprogs-1.39-blkid-devmapper.patch
|
Patch34: e2fsprogs-1.39-blkid-devmapper.patch
|
||||||
Patch36: e2fsprogs-1.38-etcblkid.patch
|
Patch36: e2fsprogs-1.38-etcblkid.patch
|
||||||
Patch62: e2fsprogs-1.39-mkinstalldirs.patch
|
Patch62: e2fsprogs-1.39-mkinstalldirs.patch
|
||||||
Patch63: e2fsprogs-1.40.2-warning-fixes.patch
|
|
||||||
Patch64: e2fsprogs-1.40.2-swapfs.patch
|
|
||||||
Patch65: e2fsprogs-1.40.2-fix-open-create-modes.patch
|
|
||||||
Patch67: e2fsprogs-1.40.2-blkid-FAT-magic-not-on-strict-position.patch
|
|
||||||
Patch68: e2fsprogs-1.40.2-blkid-squashfs.patch
|
|
||||||
Patch69: e2fsprogs-1.40.2-integer-overflows.patch
|
|
||||||
|
|
||||||
Url: http://e2fsprogs.sourceforge.net/
|
Url: http://e2fsprogs.sourceforge.net/
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
@ -86,18 +80,6 @@ also want to install e2fsprogs.
|
|||||||
%patch36 -p1 -b .etcblkid
|
%patch36 -p1 -b .etcblkid
|
||||||
# Fix for newer autoconf (#220715)
|
# Fix for newer autoconf (#220715)
|
||||||
%patch62 -p1 -b .mkinstalldirs
|
%patch62 -p1 -b .mkinstalldirs
|
||||||
# Fix type warning in badblocks
|
|
||||||
%patch63 -p1 -b .warnings
|
|
||||||
# Fix ext2fs_swap_inode_full() on bigendian boxes
|
|
||||||
%patch64 -p1 -b .swapfs
|
|
||||||
# fix one open("foo", O_CREAT) caller with no mode
|
|
||||||
%patch65 -p1 -b .creatmode
|
|
||||||
# fix fat probe when there is a real MBR
|
|
||||||
%patch67 -p1 -b .blkid-fat
|
|
||||||
# detect squashfs in libblkid (#305151)
|
|
||||||
%patch68 -p1 -b .blkid-squashfs
|
|
||||||
# prevent integer overflows (#414591 / CVE-2007-5497)
|
|
||||||
%patch69 -p1 -b .overflows
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
aclocal
|
aclocal
|
||||||
@ -258,6 +240,9 @@ exit 0
|
|||||||
%{_mandir}/man3/uuid_unparse.3*
|
%{_mandir}/man3/uuid_unparse.3*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jan 01 2008 Eric Sandeen <esandeen@redhat.com> 1.40.4-1
|
||||||
|
- New upstream version, drop several now-upstream patches.
|
||||||
|
|
||||||
* Tue Jan 01 2008 Eric Sandeen <esandeen@redhat.com> 1.40.2-15
|
* Tue Jan 01 2008 Eric Sandeen <esandeen@redhat.com> 1.40.2-15
|
||||||
- Drop resize_inode removal patch from tune2fs; ostensibly was
|
- Drop resize_inode removal patch from tune2fs; ostensibly was
|
||||||
for old kernels which could not mount, but seems to be fine.
|
for old kernels which could not mount, but seems to be fine.
|
||||||
|
Loading…
Reference in New Issue
Block a user