summaryrefslogtreecommitdiff
path: root/lib/ext2fs/res_gdt.c
AgeCommit message (Collapse)AuthorFilesLines
2011-09-18Shorten compile commands run by the build systemTheodore Ts'o1-0/+1
The DEFS line in MCONFIG had gotten so long that it exceeded 4k, and this was starting to cause some tools heartburn. It also made "make V=1" almost useless, since trying to following the individual commands run by make was lost in the noise of all of the defines. So fix this by putting the configure-generated defines in lib/config.h and the directory pathnames to lib/dirpaths.h. In addition, clean up some vestigal defines in configure.in and in the Makefiles to further shorten the cc command lines. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-07-05e2fsck, libext2fs: support for bigalloc file systems with a blocksize of 1024Theodore Ts'o1-3/+12
Filesystems with a blocksize of 1024 have the superblock starting at block #1. However, the first data block in the superblock is 0 to simplify the cluster calculations. So we must compensate for this in a number of places, mostly in the ext2fs library, but also in e2fsck. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-06-11misc: clean up compiler warningsAndreas Dilger1-1/+1
Fix several types of compiler warnings (unused variables/labels), uninitialized variables, etc that are hit with gcc -Wall. Signed-off-by: Andreas Dilger <adilger@whamcloud.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2010-06-13libext2fs: More random 64-bit fixes, lots of block_iterate3Valerie Aurora Henson1-0/+1
Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-05-17libe2p, libext2fs: Update file copyright permission states to match COPYINGTheodore Ts'o1-2/+2
The top-level COPYING file states that the e2p and ext2fs libraries are available under the LGPLv2. The files were incorrectly labelled. Alex Thomas/Luster has been consulted wrt to the ext3_extents.h file; the rest of the files were primarily authored by Theodore Ts'o. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-17libext2fs: initialize large inodes for journal & resizeEric Sandeen1-1/+1
I noticed that neither the journal nor resize inodes have i_extra_isize set post-mkfs; while this isn't likely to be a big problem, I think the below patch tidies it up. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-08-27Remove trailing whitespace for the entire source treeTheodore Ts'o1-1/+1
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-04-17Add support for the HUGE_FILE featureTheodore Ts'o1-5/+3
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-04-06libext2fs: Fix resize inode creation with non-standard s_first_data_blockTheodore Ts'o1-2/+3
Thanks to Max Lindner (lokimuh) for pointing this out. I'm playing around a bit with ext2 and multi-user encryption and I need space for my key management. So I set s_first_data_block to 4000 or something like that. This way mke2fs segfaults when executing ext2fs_create_resize_inode() because blk_t goal = 3 + sb->s_reserved_gdt_blocks + fs->desc_blocks + fs->inode_blocks_per_group; will produce a integer underrun later and segfault then in the ext2fs_test_bit assembler inline function. when exchanging 3 with 2 + sb->s_first_data_block, mke2fs does not segfault. I'm not 100% sure if thats the correct way dealing with this issue but I think its a proper solution. Addresses-Sourceforge-Bug: #1935847 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-05libext2fs: Add checks to prevent integer overflows passed to malloc()Theodore Ts'o1-1/+1
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>
2005-12-10Fix various gcc -Wall complaints.Theodore Ts'o1-2/+2
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-09-24Add fs->now to override time(0) in libext2fsTheodore Ts'o1-2/+2
If fs->now is non-zero, use that as the time instead of the system time when setting various filesystem fields (last modified time, last write time, etc.) Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-01-27Create the resize inode is created even if the s_reserved_gdt_blocks isTheodore Ts'o1-2/+0
zero; e2fsck will now complain and recreate the resize inode if i_links_count is zero or if it is not a regular file.
2005-01-06Fix resize inode handling on big endian systems, by adding new routinesTheodore Ts'o1-4/+4
that read/write indirect blocks, byte swapping them if necessary.
2004-12-23Clean up resize inode routines in ext2fs library. We no longer printTheodore Ts'o1-3/+13
any debugging statements from within library code (always a bad idea), and ext2fs_create_resize_inode() will return a proper error code if the resize inode is corrupt, instead of returning -1.
2004-12-15sparse.c (ext2fs_list_backups, ext2fs_bg_has_super),Theodore Ts'o1-2/+38
res_gdt.c (list_backups), closefs.c (ext2fs_bg_has_super), ext2fs.h: Move ext2fs_list_backups() to res_gdt.c, and ext2fs_bg_has_super() back to closefs.c. There's no reason for the new file, since list_backups() isn't being used by any other functions, and can be made static, and all users of the ext2fs filesystem will have to call ext2fs_close() anyway.
2004-12-15Add support for on-line resizing ala the resize inode. This patchTheodore Ts'o1-0/+176
is taken from Fedora Core 3's e2fsprogs 1.35-11.2.src.rpm's e2fsprogs-resize.patch.