Commit Graph

3095 Commits (dd6d671b86aff52a9f3eb5d1ff8a0ebd99eb4559)

Author SHA1 Message Date
Jakub Bogusz dd6d671b86 po: update pl.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-07-01 21:32:26 -04:00
Theodore Ts'o 4a1e15a8ba Fix compilation problem when building with --disable-uuid
The MCONFIG.in file used $(LIBUUID) in the definition of DEPLIBBLKID,
when it should have used $(DEPLIBUUID) instead.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-01 17:20:24 -04:00
Theodore Ts'o 4b76dfb123 Update Czech translation of e2fsprogs 2009-07-01 11:02:08 -04:00
Theodore Ts'o 3381a63c54 libuuid: Don't run uuidd if it would fail due to permission problems
Some distributions don't like installing uuidd setuid or setgid.  So
if the setuid or setigid bit is not set with uuidd, and the current
process does not have write access to the UUIDD work directory, don't
try running uuidd, since it won't work properly.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-30 22:36:28 -04:00
Theodore Ts'o 6013bbf596 Do not build and install uuidgen from if the uuid library was disabled.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-30 21:34:08 -04:00
Theodore Ts'o caa6003b64 libuuid, uuidd: Avoid infinite loop while reading from the socket fd
If for some reason the uuidd daemon or the process calling uuidd
exited unexpectely, the read_all() function would end up looping
forever, either in uuidd or in libuuid.  Fix this terminating the loop
if no data can be read after five tries to read from the file
descriptor.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-29 20:03:20 -04:00
Theodore Ts'o 2842bb3188 uuidd: Avoid closing the server socket when calling create_daemon()
In the event that file descriptors 0-2 are closed when uuidd is
started, the server socket could be created as a file descriptor that
will get closed when create_daemon() tries detaching the uuidd daemon
from its controlling tty.   Avoid this case by using dup(2).

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-29 19:32:50 -04:00
Theodore Ts'o e8b9466fc9 libuuid: Make sure fd's 0, 1, and 2 are valid before exec'ing uuidd
When closing all of the file descriptors before starting uuidd, make
sure file descriptors 0, 1, and 2 are reserved by opening /dev/null.
This prevents strange bugs caused by assumptions regarding file
descriptors <= 2 as being special.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-29 19:06:45 -04:00
Theodore Ts'o d9206a3414 Update release notes, version string, etc. for E2fsprogs 1.41.7 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-29 15:12:34 -04:00
Theodore Ts'o 930e28140c Update Czech and Chinese translations from the Translation Project.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-29 15:09:30 -04:00
Theodore Ts'o 427f95f879 logsave: Don't send the ^A and ^B delimiters to the console
Some terminal programs may print wierd characters when they see the
\001 or \002 characters.  So filter them out if the -s option
(skip_mode) is enabled.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-29 15:09:29 -04:00
Theodore Ts'o fa9e841b44 Update e2fsprogs.pot file for 1.41.7 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-29 01:30:30 -04:00
Nic Case 6a8da46d28 libext2fs: ensure validate_entry doesn't read beyond blocksize
ext2fs_validate_entry would read beyond the end of the block to get
dirent->rec_len for certain arguments (like if blocksize ==
final_offset).  This patch adds a check so that doesn't happen, and
changes the types of the arguments to avoid a compiler warning.

Signed-off-by: Nic Case <number9652@yahoo.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-29 01:24:40 -04:00
Eric Sandeen dad0bab204 debugfs: don't try to fclose NULL
do_logdump may jump to errout if fopen(out_file) fails,
but in that case out_file is NULL, and fclose will segfault.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-06-29 01:07:29 -04:00
Theodore Ts'o c510d6f268 badblocks: Make sure the list of bad blocks found is flushed on interrupt
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-29 01:04:02 -04:00
Theodore Ts'o 4001b8a8ff badblocks.8: Alphabetize options in badblocks man page
... to make it easier to find a specific option in the man page.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-29 01:03:27 -04:00
Theodore Ts'o e3dee8c91f badblocks.8: Update description of the -s option in badblocks man page
Addresses-Debian-Bug: #523063

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-29 00:59:35 -04:00
Theodore Ts'o 83bfa27d32 badblocks: Print the currently tested block number when interrupted with ^C
This can be useful for the user who wishes to restart the badblocks
program after interrupting it.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-29 00:52:27 -04:00
Scott James Remnant 39fd3d4f13 configure.in: add --disable-libuuid option
Add an option to switch between the private (in-tree) libuuid and
public (in-system installed) library.  The private version is still
enabled by default.

Signed-off-by: Scott James Remnant <scott@netsplit.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-06-29 00:36:45 -04:00
Eric Sandeen 1b600bfa48 lsattr: exit with a non-zero status on errors
lsattr doesn't return an error if you point it at a file that
doesn't exist.

This is slightly trickier because it can take more than one
file as an arg, but ls seems to report an error if any occurred,
so this does the same, it'll report the last error that was
encountered.

Addresses-RedHat-Bugzilla: #489841
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-06-21 21:46:34 -04:00
Theodore Ts'o 8a48035095 Fix encoding for rec_len in directories for >= 64k blocksize file systems
Previously e2fsprogs interpreted 0 for a rec_len of 65536 (which could
occur if the directory block is completely empty in 64k blocksize
filesystems), while the kernel interpreted 65535 to mean 65536.  The
kernel will accept both to mean 65536, and encodes 65535 to be 65536.
This commit changes e2fsprogs to match.

We add the encoding agreed upon for 128k and 256k filesystems, but we
don't enable support for these larger block sizes, since they haven't
been fully tested.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-21 21:07:38 -04:00
Eric Sandeen 8a6ede8b7a resize2fs: update sb journal backup if journal was moved
This was reported in Fedora, since the livecd creator does
a lot of resizing.

If we've moved the journal blocks during resize (more likely now,
due to the journal being in the middle) the backup blocks in the
superblock don't get updated, and a subsequent e2fsck will find
issues:

e2fsck 1.41.6 (30-May-2009)
Backing up journal inode block information.

Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/mnt/test/img: ***** FILE SYSTEM WAS MODIFIED *****
/mnt/test/img: 11/16000 files (0.0% non-contiguous), 17789/38400 blocks

This can be shown in a simple test:

# dd if=/dev/zero of=img bs=1 count=0 seek=3000M
# mke2fs -t ext4 -F img
# resize2fs img 150M
# e2fsck -f img

(thanks to the Fedora reporter Mads Kiilerich for the testcase!
https://bugzilla.redhat.com/show_bug.cgi?id=506105#c2)

So, update the backup journal in the superblock before resize2fs exits.

Addresses-RedHat-Bugzilla: #505339

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-18 07:47:54 -04:00
Eric Sandeen 827c188711 libext2fs: initialize large inodes for journal & resize
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>
2009-06-17 19:49:00 -04:00
Eric Sandeen 125a367806 libext2fs: write only core inode in update_path()
The ext2_extent_handle only has a struct ext2_inode allocated on
it, and the same amount copied into it in that same function,
but in update_path() we're possibly writing out more than that -
for example 256 bytes, from that address.  This causes uninitialized
memory to get  written to disk, overwriting the parts of the
inode past the osd2 member (the end of the smaller structure).

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-17 18:49:01 -04:00
Theodore Ts'o 1acde2b277 dumpe2fs, tune2fs: fix miscellaneous memory leaks
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-15 03:55:10 -04:00
Theodore Ts'o 6e9761c2c0 debugfs: Fix miscellaneous memory leaks
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-15 03:54:59 -04:00
Theodore Ts'o e2ca097fc6 resize2fs: fix miscellaneous memory leaks
Fix various memory leaks which were discovered using valgrind.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-15 03:54:31 -04:00
Theodore Ts'o 23f75f6efa e2fsck: fix miscellaneous memory leaks
Fix various miscellaneous memory leaks which were discovered using valgrind.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-15 03:54:06 -04:00
Theodore Ts'o 7b59b4a8ee libext2fs: Fix memory leak in the extents handling function
Each time an extent handle is opened and closed, if the inode has an
extent tree which does not fit in the inode's i_block structure, a
filesystem block buffer was not getting released.  Since e2fsck opens
an extent handle for every inode using extents, this can translate to
a very large amount of memory getting lost.

Thanks to Henrik 'Mauritz' Johnson for discovering and pointing out
this leak, which he ran into while running the "rdump" command in
debugfs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-15 01:34:43 -04:00
Theodore Ts'o 58d29ed48a tests: Add --valgrind-leakcheck option to the test_script program
Add an option which runs valgrind with the appropriate options for
finding memory leaks.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-15 01:33:26 -04:00
Theodore Ts'o 3b5126de44 badblocks: Remove 4096 blocksize limit
There is no need to prohibit the use of block sizes larger than 4k in
the badblocks program.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-02 09:31:24 -04:00
Theodore Ts'o 1384cc64b5 Fix spelling mistake in the man page for chattr
Addresses-Debian-Bug: #531385

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-02 09:02:39 -04:00
Theodore Ts'o e78968f7a4 filefrag: Fix error checking for the fiemap ioctl
Thanks to Peng Tao for reporting this problem.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-02 08:45:22 -04:00
Theodore Ts'o d17ad1234d Update release notes, version string, etc. for E2fsprogs 1.41.6 release 2009-05-30 13:56:31 -04:00
Theodore Ts'o 5301393005 Update translation file for 1.41.6 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-05-30 13:50:07 -04:00
Theodore Ts'o 337079375e Update lib/xt2fs/Makefile.in using "make depend" 2009-05-30 13:46:19 -04:00
Theodore Ts'o 4f858546e1 Update man pages to include ext4 in the synposis, instead of just "ext2/ext3"
The e2fsprogs programs have historically just said that they operate
on ext2 and ext3 file system in their man pages.  Update them to say
that they also operate on ext4 file systems.

Addresses-Launchpad-bug: #381854

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-05-30 12:34:28 -04:00
Theodore Ts'o 683f755eec debian: Update control file to remove lintian warnings
* Update debian policy standards 3.8.1
* Expand short and extended descriptions
* Remove duplicated section and priority fields in the binary packages
* Remove empty depends: header

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-05-30 11:29:41 -04:00
Theodore Ts'o aec2906581 debian: update e2fslibs.symbol file to add ext2fs_extent_open2@Base
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-05-30 10:22:12 -04:00
Theodore Ts'o 751fded373 debain: Remove unneeded lintian override 2009-05-30 09:44:06 -04:00
Theodore Ts'o fb41c41a4b Remove unused legacy .hgtags file from top-level directory
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-05-30 00:40:29 -04:00
Theodore Ts'o 93aa024699 mke2fs.8: Fix man page to use hyphens instead of minus signs for options
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-05-30 00:15:22 -04:00
Theodore Ts'o 3a09e969e1 Update config.guess and config.sub to the latest (2009-04-17) version
Addresses-Debian-Bug: #528330

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-05-29 22:22:23 -04:00
Theodore Ts'o 470e737a87 libext2fs: Move test code for csum.c inline instead of in a separate file
Move the test code which is used to build the tst_csum progam from
tst_csum into csum.c under an #ifdef DEBUG to simplify things and to
avoid compile problems caused by not having a prototype for
ext2fs_group_desc_csum().

Addresses-Sourceforge-Bug: #2484331

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-05-29 11:01:22 -04:00
Theodore Ts'o 86522281f8 libext2fs: Add an explicit error code for missing mtab file
To reduce user confusion, if the /etc/mtab file is missing
ext2fs_check_mount_point and ext2fs_check_if_mounted will return a
new, explicit error code to indicate this case.

Addresses-Debian-Bug: #527859

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-05-29 00:11:52 -04:00
Theodore Ts'o 606638906a e2fsck: Go back to the original superblock if the backup sb is invalid
In the case where the block group descriptors appear corrupt, e2fsck
will try to use the backup superblock.  However, it could be that the
backup superblock itself is completely corrupted, in which e2fsck
should go back to the original superblock instead of refusing to fix
the file system.

Addresses-Debian-Bug: #516820

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-05-28 23:40:18 -04:00
Theodore Ts'o 6dce532867 debugfs: Add -a option to close_filesys command
Add an -a option to the close_filesys command which writes any changes
to the superblock or block group descriptors to all of the backup
superblock locations.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-05-28 22:03:33 -04:00
Theodore Ts'o b6bb99feb9 e2fsck: if i_file_acl_hi is non-zero, fix it and don't abort e2fsck -p
Ext3 filesystems don't care if i_file_acl_hi is non-zero in some
inode, and newer kernels should ignore this field (although 2.6.29 and
older kernels will not).  So e2fsck should fix this without aborting
an e2fsck preen operation.

Addresses-Debian-Bug: #526524

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-05-28 17:05:40 -04:00
number9652 84b239aea4 libext2fs: add ext2fs_extent_open2
The patch below adds a function, ext2fs_extent_open2(), that behaves
as ext2fs_extent_open(), but will use the user-supplied inode
structure when opening an extent instead of reading the inode from
disk.  It also changes several of the calls to extent_open() to use
this enhancement.

Signed-off-by: Nic Case <number9652@yahoo.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-05-28 16:33:38 -04:00
Ken Chen 9facd076ae Add empty function for init_resource_track() and print_resource_track()
in the case of ! defined RESOURCE_TRACK, so that we can clean up #ifdef
throughout e2fsck source.

Signed-off-by: Ken Chen <kenchen@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-05-28 09:55:10 -04:00